-
Notifications
You must be signed in to change notification settings - Fork 242
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
Obtaing the ip address of the guest and update address cache #3935
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -935,10 +935,11 @@ def _get_address(): | |
|
||
ipaddr = utils_misc.wait_for(_get_address, timeout, step=interval) | ||
if not ipaddr: | ||
# Read guest address via serial console and update VM address | ||
# cache to avoid get out-dated address. | ||
utils_net.update_mac_ip_address(self, timeout) | ||
ipaddr = self.get_address(nic_index, ip_version) | ||
# obatining ip address from virsh-net-dhcp-leases command | ||
mac = self.get_mac_address(nic_index).lower() | ||
ipaddr = utils_net.obtain_guest_ip_from_dhcp_leases(mac) | ||
# updating cache with the latest ip address value | ||
self.address_cache[mac] = ipaddr | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @TasmiyaNalatwad Could you please help redesign this part? Because of the current usage let all the releated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @yanglei-rh there is patch already shared by @luckyh #3989 to revert this patch, Which would unblock your tests. Also i will share the new patch with the approach we had discussed in above comments soon. Thank you. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it, thanks a lot. |
||
msg = "Found/Verified IP %s for VM %s NIC %s" % (ipaddr, self.name, nic_index) | ||
LOG.debug(msg) | ||
return ipaddr | ||
|
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.
The function "utils_net.update_mac_ip_address" is trying to do serial login (create session and login) and then update the mac_ip_address in address.cache but as there is no ip address, the connection to serial console fails and following function self.get_address also fails.
Hence removing this approach and trying to get the ip address from virsh-net-dhcp-leases command