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
Allocate Ironic port when node exists and has no port allocated. #817
Conversation
/assign @stbenjam |
Hi @s3rj1k. Thanks for your PR. I'm waiting for a metal3-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
cc: @dhellmann Can you please also look at this, thanks. |
I was under impression that we always create a port before inspection, otherwise e.g. Redfish inspection would not work. |
@dtantsur We allocate port only when node was not created before, for existing node we expect that port was created. |
/ok-to-test |
/test-integration |
@dtantsur All tests are green :) |
@stbenjam @dhellmann @dtantsur Are we safe to merge? |
@s3rj1k can you describe what the actual change is in the first patch? Git makes the diff really hard to interpret but after going through it as closely as I can using a visual diff tool, I was unable it find any change in logic. It looks like a straight refactor (although arguably an improvement in readability). The commit message only says that something was broken and is now fixed but I can't figure out what. What's the actual code path that is different? |
@zaneb Yea, its a diff mess So basically I am introducing doing this
Old case code is mostly unchanged in { ... }, this fixes an issue with forced introspection, before, because of complicated flow logic it was hard to spot.
in before PR never gets executed |
@zaneb Did you get a chance to look at this again? |
I'm not following how that code fails to get executed: AFAICT the logic is the same after the patch, only the line numbers change: There's no difference. On closer inspection (no pun intended) there does appear to be a bug here though: I'm pretty sure I meant to put a return statement after |
@zaneb, so I've removed first part of PR, currently it only deals with Ironic port creation, hoping this would help in getting this merged. |
/test-integration |
@dtantsur Can you please take a look at this PR, hopefully approve it :) |
I opened #840 to fix this.
Sounds good to me, but this leaves only the part I don't understand well enough to review. |
I've highlighted @dtantsur on rebased PR, I think he could help with Ironic internals |
4537026
to
fd3b303
Compare
/test-integration |
@zaneb Can you please take another look, PR is rebased |
/retest |
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 correct, but expensive.
/test-integration |
/recheck |
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 remain worried about the extra overhead of this on every reconcile, but it doesn't seem avoidable.
/approve
Signed-off-by: s3rj1k <evasive.gyron@gmail.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: s3rj1k, 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 |
Signed-off-by: s3rj1k <evasive.gyron@gmail.com>
/test-integration |
/lgtm |
This PR fixes issues below:
When node has no allocated port to it, Ironic returns this error
IPMI address part is just wrong, BMC creds are checked in Registering state and are validated, also they where validated manually just in case.
After checking sources that return this error in: https://github.com/openstack/ironic-inspector/blob/stable/victoria/ironic_inspector/introspect.py#L102-L119
We can clearly see that this error is indeed because of not allocated port to node (no MAC), this also is verified by this unix pipe magic for specified host.