-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement pools #79
Implement pools #79
Conversation
… return of pool to machine.
Add pool test
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
…maasapi into add-allocation-pools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thank you.
Just a few small things to tweak. Main issue is to add controller tests.
I will get the rest of these done either tonight or tomorrow. I also found a bug I need to fix where a nil Pool returns nil instead of an empty map. I'll fix that too. Thank you for reviewing! |
Fixed Pool method to return nil if non-existent. Fixed schema type in return of pool to machine. Added pool_test Fixed most of the issues requested in PR#79. There are few left. Committing now and performing an interactive rebase to squash commits.
had a production impacting issue occur today so likely won't get back to this until tomorrow. It's at the top of my non-prod list of things to do though. |
…end to pull PR and assist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed some new commits. Thank you.
We need a TestPools() similar to TestZones() in controller_test.go
Also, some imports need moving.
I understand. Those commits were not meant to be checked yet. Sorry. My IDE is responsible for the imports. I'll fix all of that up. I am hoping to have this done today provided I'm able to fix the test bug I exposed. I'm also going to rebase/squash all the commits. When that is done then you'll know I'm finished and ready for full review. |
… data to include pool objects. General bugfixes and removal of test output.
author Jim Conner <snafu.x@gmail.com> 1559884909 -0700 committer Jim Conner <snafu.x@gmail.com> 1560547939 -0700 Implement pools Fixed Pool method to return nil if non-existent. Fixed schema type in return of pool to machine. Added pool_test Fixed most of the issues requested in PR#79. There are few left.
This PR is ready for final review and merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just one small correction. Then you can merge by typing
as a comment
Signed-off-by: Jim Conner <snafu.x@gmail.com>
|
Hmm, the merge macro seems to not work...? |
I don't think it'll work for you. The bot wants someone from the team to do it. |
Makes sense! Thank you again @mitechie (Rick) |
So this broke LXD's MAAS support as any attempt to create a device without the
|
One of the failing code paths is when CreateDevice is called on a machine, this in turns calls CreateDevice on the controller, neither of those pass a pool (not needed as there is a parent), the response coming from MAAS similarly doesn't include a pool (it's nil) and it being nil causes a validation failure. |
This seems to indicate that CreateDevice on a machine isn't tested or was never tested against an actual MAAS server as I can't see any way this would ever work. |
Good catch! I don't have time today to look into it, but I'll try and dig in tomorrow. |
@stgraber I will take a look and make sure everything works. We have a few maas implementations so if I can find time, I'll do some more testing. |
Added support for pools. Still really new to Go so constructive assistance appreciated.