IPv6 data missing from latest/metadata info

Bug #1702475 reported by Jeroen van Bemmel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Medium
Unassigned

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

Tags: metadata
Revision history for this message
Jeroen van Bemmel (jvb127) wrote :

Somewhat related to https://bugs.launchpad.net/nova/+bug/1679641 ( same theme )

Matt Riedemann (mriedem)
tags: added: metadata
Revision history for this message
Sean Dague (sdague) wrote :

@jeroen - can you convert this into a Gerrit Review as you seem to have the code all here.

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/486753

Changed in nova:
assignee: nobody → Jeroen van Bemmel (jvb127)
status: Confirmed → In Progress
Revision history for this message
Jeroen van Bemmel (jvb127) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.openstack.org/486753

Matt Riedemann (mriedem)
Changed in nova:
status: In Progress → Confirmed
assignee: Jeroen van Bemmel (jvb127) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.