Public bug reported: When a virtual machine is rescheduled and fails eith some storage exception, getting an error that 'NetworkInfo' object has no attribute 'wait' instead of actual storage issue
In nova/compute/manager https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L2088 is actually throwing above exception because , network_info is a 'NetworkInfoAsyncWrapper' object in first time deploy case and 'NetworkInfo' object in a reschedule case, so during reschedule it is throwing 'wait' attribute is not there. def _build_networks_for_instance(self, context, instance, requested_networks, security_groups): # If we're here from a reschedule the network may already be allocated. if strutils.bool_from_string( instance.system_metadata.get('network_allocated', 'False')): # NOTE(alex_xu): The network_allocated is True means the network # resource already allocated at previous scheduling, and the # network setup is cleanup at previous. After rescheduling, the # network resource need setup on the new host. self.network_api.setup_instance_network_on_host( context, instance, instance.host) return self.network_api.get_instance_nw_info(context, instance) -------- this block gets called for reschedule case which returns NetworkInfo object if not self.is_neutron_security_groups: security_groups = [] macs = self.driver.macs_for_instance(instance) dhcp_options = self.driver.dhcp_options_for_instance(instance) network_info = self._allocate_network(context, instance, requested_networks, macs, security_groups, dhcp_options) ----------------- this block is called for deploy on first host which returns NetworkInfoAsyncWrapper which has wait. return network_info ** Affects: nova Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1636109 Title: Reschedule of a virtual machine fails with 'NetworkInfo' object has no 'wait' Status in OpenStack Compute (nova): New Bug description: When a virtual machine is rescheduled and fails eith some storage exception, getting an error that 'NetworkInfo' object has no attribute 'wait' instead of actual storage issue In nova/compute/manager https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L2088 is actually throwing above exception because , network_info is a 'NetworkInfoAsyncWrapper' object in first time deploy case and 'NetworkInfo' object in a reschedule case, so during reschedule it is throwing 'wait' attribute is not there. def _build_networks_for_instance(self, context, instance, requested_networks, security_groups): # If we're here from a reschedule the network may already be allocated. if strutils.bool_from_string( instance.system_metadata.get('network_allocated', 'False')): # NOTE(alex_xu): The network_allocated is True means the network # resource already allocated at previous scheduling, and the # network setup is cleanup at previous. After rescheduling, the # network resource need setup on the new host. self.network_api.setup_instance_network_on_host( context, instance, instance.host) return self.network_api.get_instance_nw_info(context, instance) -------- this block gets called for reschedule case which returns NetworkInfo object if not self.is_neutron_security_groups: security_groups = [] macs = self.driver.macs_for_instance(instance) dhcp_options = self.driver.dhcp_options_for_instance(instance) network_info = self._allocate_network(context, instance, requested_networks, macs, security_groups, dhcp_options) ----------------- this block is called for deploy on first host which returns NetworkInfoAsyncWrapper which has wait. return network_info To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1636109/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

