-
Notifications
You must be signed in to change notification settings - Fork 254
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
ironic provisioner de-duplicate image options #750
Conversation
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 right to me. I don't know what sort of unit test coverage there is for getUpdateOptsForNode()
that might need to be changed or expanded, but these changes look fine.
p.host.HardwareProfile())) | ||
} | ||
|
||
func (p *ironicProvisioner) getImageUpdateOptsForNode(ironicNode *nodes.Node, imageData *metal3v1alpha1.Image) (updates nodes.UpdateOpts, err error) { | ||
// image_source | ||
var op nodes.UpdateOp | ||
if _, ok := ironicNode.InstanceInfo["image_source"]; !ok { |
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.
At some point we probably want this check to compare the value, not just see if there is one. That should be another PR, though, since it has bigger implications.
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.
I have a patch for this but it needs tests: zaneb@ed324ac
Feel free to borrow.
Thanks for the quick review - the test coverage looks OK to me, I could change that to refer to the new function explicitly - but I was thinking the fact that the existing tests all pass was a reasonable way to show that I hadn't broken things with the refactoring :) |
/test-integration |
/retitle ironic provisioner de-duplicate image options |
@dhellmann any more updates needed before we can merge this one? /cc @zaneb |
I'm happy with these changes. I'll give @zaneb a chance to review them, too. /approve |
Ok I fixed the
Unless folks feel strongly otherwise I'll push follow-up PRs for those, since it's not strictly related to the image instance_info de-duplication I wanted to do before adding the live-iso code? |
/test-integration |
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.
/approve
p.host.HardwareProfile())) | ||
} | ||
|
||
func (p *ironicProvisioner) getImageUpdateOptsForNode(ironicNode *nodes.Node, imageData *metal3v1alpha1.Image) (updates nodes.UpdateOpts, err error) { | ||
// image_source | ||
var op nodes.UpdateOp | ||
if _, ok := ironicNode.InstanceInfo["image_source"]; !ok { |
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.
I have a patch for this but it needs tests: zaneb@ed324ac
Feel free to borrow.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dhellmann, hardys, zaneb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test-integration |
/lgtm |
This aims to de-duplicate the code where ironic image settings are managed, so that new code planned for the LiveImage enhancement don't need to be added in two places