← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1456064] [NEW] VMWare instance missing ip address when using config drive

 

Public bug reported:

Because of race bug: https://bugs.launchpad.net/nova/+bug/1249065
http://status.openstack.org/elastic-recheck/index.html#1249065

When vmware driver using config drive, the IP address maybe not get
injected, because of the missing of instance  nw_info cache.

Here is related code in nova vmware driver, and config drive codes:

https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vmops.py#L671
        inst_md = instance_metadata.InstanceMetadata(instance,
                                                     content=injected_files,
                                                     extra_md=extra_md)

https://github.com/openstack/nova/blob/master/nova/api/metadata/base.py#L146
        # get network info, and the rendered network template
        if network_info is None:
            network_info = instance.info_cache.network_info

in vmwareapi/vmop.py, the network_info is not passed to the instance metadata api, so metadata api will use instance.info_cache.network_info as the network info. But when instance.info_cache.network_info is missing, the network info will be empty, too.
This is why sometimes, VMWare instances can not get IP address injected when using config drive.

** Affects: nova
     Importance: Undecided
     Assignee: Feng Xi Yan (yanfengxi)
         Status: Confirmed

** Changed in: nova
     Assignee: (unassigned) => Feng Xi Yan (yanfengxi)

** Changed in: nova
       Status: New => Confirmed

** Description changed:

  Because of race bug: https://bugs.launchpad.net/nova/+bug/1249065
  http://status.openstack.org/elastic-recheck/index.html#1249065
  
  When vmware driver using config drive, the IP address maybe not get
  injected, because of the missing of instance  nw_info cache.
  
  Here is related code in nova vmware driver, and config drive codes:
  
  https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vmops.py#L671
-         inst_md = instance_metadata.InstanceMetadata(instance,
-                                                      content=injected_files,
-                                                      extra_md=extra_md)
- 
+         inst_md = instance_metadata.InstanceMetadata(instance,
+                                                      content=injected_files,
+                                extra_md=extra_md)
  
  https://github.com/openstack/nova/blob/master/nova/api/metadata/base.py#L146
-         # get network info, and the rendered network template
-         if network_info is None:
-             network_info = instance.info_cache.network_info
+         # get network info, and the rendered network template
+         if network_info is None:
+             network_info = instance.info_cache.network_info
  
  in vmwareapi/vmop.py, the network_info is not passed to the instance metadata api, so metadata api will use instance.info_cache.network_info as the network info. But when instance.info_cache.network_info is missing, the network info will be empty, too.
  This is why sometimes, VMWare instances can not get IP address injected when using config drive.

** Description changed:

  Because of race bug: https://bugs.launchpad.net/nova/+bug/1249065
  http://status.openstack.org/elastic-recheck/index.html#1249065
  
  When vmware driver using config drive, the IP address maybe not get
  injected, because of the missing of instance  nw_info cache.
  
  Here is related code in nova vmware driver, and config drive codes:
  
  https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vmops.py#L671
-         inst_md = instance_metadata.InstanceMetadata(instance,
-                                                      content=injected_files,
-                                extra_md=extra_md)
+         inst_md = instance_metadata.InstanceMetadata(instance,
+                                                      content=injected_files,
+                                                      extra_md=extra_md)
  
  https://github.com/openstack/nova/blob/master/nova/api/metadata/base.py#L146
          # get network info, and the rendered network template
          if network_info is None:
              network_info = instance.info_cache.network_info
  
  in vmwareapi/vmop.py, the network_info is not passed to the instance metadata api, so metadata api will use instance.info_cache.network_info as the network info. But when instance.info_cache.network_info is missing, the network info will be empty, too.
  This is why sometimes, VMWare instances can not get IP address injected when using config drive.

-- 
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/1456064

Title:
  VMWare instance missing ip address when using config drive

Status in OpenStack Compute (Nova):
  Confirmed

Bug description:
  Because of race bug: https://bugs.launchpad.net/nova/+bug/1249065
  http://status.openstack.org/elastic-recheck/index.html#1249065

  When vmware driver using config drive, the IP address maybe not get
  injected, because of the missing of instance  nw_info cache.

  Here is related code in nova vmware driver, and config drive codes:

  https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vmops.py#L671
          inst_md = instance_metadata.InstanceMetadata(instance,
                                                       content=injected_files,
                                                       extra_md=extra_md)

  https://github.com/openstack/nova/blob/master/nova/api/metadata/base.py#L146
          # get network info, and the rendered network template
          if network_info is None:
              network_info = instance.info_cache.network_info

  in vmwareapi/vmop.py, the network_info is not passed to the instance metadata api, so metadata api will use instance.info_cache.network_info as the network info. But when instance.info_cache.network_info is missing, the network info will be empty, too.
  This is why sometimes, VMWare instances can not get IP address injected when using config drive.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1456064/+subscriptions


Follow ups

References