Bug #30478
closedKexec does not handle NEW/OLD discovered IP
Description
1
19h
Finally got around to updating to Foreman 2.1 and discovered a new behavior.
If you use the Discovery ISO, and boot using the DHCP option, the system will get a DHCP IP like say 192.168.0.100, and then connect to the smart proxy and discover (Success) as normal.
However, if you then go to Discovered Hosts, do all the setup of that system, including setting the “final” IP address you want on the system after being built like say 192.168.0.200, and then click submit to kick off the kexec and start the build. It will FAIL.
What I am seeing in the logs is that Foreman 2.1 seems to be doing is trying to kexec the FINAL IP of the system, not the current IP. This used to work correctly and Foreman would send the kexec to the current IP of the discovered host.
2020-07-22T14:40:05 [W|app|2b782eb3] Unable to perform kexec on mac005056abcxxx (https://mysmarproxy.mydomain.com:9090/discovery/192.168.0.200): 500 Internal Server Error
2020-07-22T14:40:05 [W|app|2b782eb3] Unable to kexec
Also seeing foreman-proxy sending the discovery client power request to the wrong IP.
Started PUT /discovery/NEW IP/power/kexec
Finished PUT /discovery/NEW IP/power/kexec with 500
instead of what it should be doing
Started PUT /discovery/CURRENT IP/power/kexec
Finished PUT /discovery/CURRENT IP/power/kexec with 200
If you select MANUAL network setup when booting the Discovery ISO, and use the same IP as the final IP then it works fine, because the system is currently at the final IP so the kexec attempt works.
This is a definite CHANGE in behavior from previous versions, and it makes the DHCP option on the Foreman Discovery ISO unable to be used at all.
I have verified this behavior changed from our other Foreman 1.20 environment.
Updated by vi won over 4 years ago
- Subject changed from When using Foreman Discovery + DHCP, the kexec is attempted on the NEW IP in the host record instead of the CURRENT IP from the discovered host to When using Foreman Discovery + DHCP in Foreman 2.1, the kexec is attempted on the NEW IP in the host record instead of the CURRENT IP from the discovered host
- Found in Releases 2.1.0 added
Updated by Tomer Brisker over 4 years ago
- Project changed from Foreman to Discovery
Updated by Lukas Zapletal over 4 years ago
- Related to Bug #28330: Reboot/kexec is ussed against new (reserved) IP address added
Updated by Lukas Zapletal over 4 years ago
- Triaged changed from No to Yes
This bug was fixes in 16.0.1 discovery version as part of #28330
What version do you have again?
Updated by The Foreman Bot over 4 years ago
- Status changed from New to Ready For Testing
- Assignee set to Lukas Zapletal
- Pull request https://github.com/theforeman/foreman_discovery/pull/506 added
Updated by Lukas Zapletal over 4 years ago
- Subject changed from When using Foreman Discovery + DHCP in Foreman 2.1, the kexec is attempted on the NEW IP in the host record instead of the CURRENT IP from the discovered host to Kexec does not handle NEW/OLD discovered IP
- Bugzilla link set to 1848291
It was broken for both reboot and kexec methods actually. The fix is ready.
Updated by Lukas Zapletal over 4 years ago
- Related to Bug #30836: Nil pointer exception on unused_ip discovery call added
Updated by The Foreman Bot over 4 years ago
- Fixed in Releases Discovery Plugin 16.0 added
Updated by Lukas Zapletal over 4 years ago
- Status changed from Ready For Testing to Resolved
Updated by Lukas Zapletal over 4 years ago
- Fixed in Releases deleted (
Discovery Plugin 16.0)
Updated by Lukas Zapletal about 4 years ago
- Related to Bug #30958: Argument error when refresh facts fails added