← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1702475] [NEW] IPv6 data missing from latest/metadata info

 

Public bug reported:

When querying the latest/metadata API, IPv4 data ( local-ipv4 and
public-ipv4 ) are available but ipv6 data is not.

3 lines to be added:

/usr/lib/python2.7/site-packages/nova/api/metadata/base.py
        fixed_ips = self.ip_info['fixed_ips']
        fixed_ip = fixed_ips and fixed_ips[0] or ''

        # JvB added
        fixed_ip6s = self.ip_info['fixed_ip6s']
        fixed_ip6 = fixed_ip6s and fixed_ip6s[0] or ''

        fmt_sgroups = [x['name'] for x in self.security_groups]

        meta_data = {
            'ami-id': self.instance.ec2_ids.ami_id,
            'ami-launch-index': self.instance.launch_index,
            'ami-manifest-path': 'FIXME',
            'instance-id': self.instance.ec2_ids.instance_id,
            'hostname': hostname,
            'local-ipv4': fixed_ip or self.address,
            'local-ipv6': fixed_ip6 or '',  # JvB added
            'reservation-id': self.instance.reservation_id,
            'security-groups': fmt_sgroups}

It would be useful to have the subnet mask info available as well, but
this would involve more changes and perhaps some discussion about naming
conventions

** 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/1702475

Title:
  IPv6 data missing from latest/metadata info

Status in OpenStack Compute (nova):
  New

Bug description:
  When querying the latest/metadata API, IPv4 data ( local-ipv4 and
  public-ipv4 ) are available but ipv6 data is not.

  3 lines to be added:

  /usr/lib/python2.7/site-packages/nova/api/metadata/base.py
          fixed_ips = self.ip_info['fixed_ips']
          fixed_ip = fixed_ips and fixed_ips[0] or ''

          # JvB added
          fixed_ip6s = self.ip_info['fixed_ip6s']
          fixed_ip6 = fixed_ip6s and fixed_ip6s[0] or ''

          fmt_sgroups = [x['name'] for x in self.security_groups]

          meta_data = {
              'ami-id': self.instance.ec2_ids.ami_id,
              'ami-launch-index': self.instance.launch_index,
              'ami-manifest-path': 'FIXME',
              'instance-id': self.instance.ec2_ids.instance_id,
              'hostname': hostname,
              'local-ipv4': fixed_ip or self.address,
              'local-ipv6': fixed_ip6 or '',  # JvB added
              'reservation-id': self.instance.reservation_id,
              'security-groups': fmt_sgroups}

  It would be useful to have the subnet mask info available as well, but
  this would involve more changes and perhaps some discussion about
  naming conventions

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