← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1252749] Re: flat network and config drive = no ip

 

After all i noticed that even with that ip, i can't build any network.

Instead I will use config drive with flat_injected and
injected_network_template.

Can someone please close this bug?



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

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

Title:
  flat network and config drive = no ip

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  I'm not sure if this is really a bug or some missconfiguration from my
  side.

  My configuration:

  flat networking with neutron created with:

  neutron net-create default_net --shared --provider:network_type flat
  --provider:physical_network default_physnet

  neutron subnet-create default_net 10.210.0.0/16 --name default_subnet
  --no-gateway --host-route destination=0.0.0.0/0,nexthop=10.210.0.1
  --allocation-pool start=10.210.25.150,end=10.210.25.244
  --dns_nameservers list=true 10.210.10.1 10.210.10.2 --disable-dhcp

  In nova.conf I have config drive enabled.

  After machine boot, the config drive is attached, but the metadata
  from ec2/latest/ contains local-ipv4: None, so there is no ip for
  cloud-init.

  I had to change this in order to fix it in my case:
  /usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py

  ## replace
     inst_md = instance_metadata.InstanceMetadata(instance,
                  content=files, extra_md=extra_md, network_info=network_info)
  ## with
     inst_md = instance_metadata.InstanceMetadata(instance, address=network_info[0]['network']['subnets'][0]['ips'][0]['address'],
                  content=files, extra_md=extra_md, network_info=network_info)

  I didn't see in  /usr/lib/python2.6/site-
  packages/nova/api/metadata/base.py how is the address from
  network_info extracted.

  Full info from network_info variable:

  VIF({
    'ovs_interfaceid': u'70e5f94b-3ec0-4aa7-bca9-ef1b38bf6bac',
    'network': Network({
      'bridge': 'br-int',
      'subnets': [
        Subnet({
          'ips': [
            FixedIP({
              'meta': {
                
              },
              'version': 4,
              'type': 'fixed',
              'floating_ips': [
                
              ],
              'address': u'10.210.25.157'
            })
          ],
          'version': 4,
          'meta': {
            
          },
          'dns': [
            IP({
              'meta': {
                
              },
              'version': 4,
              'type': 'dns',
              'address': u'10.210.10.1'
            }),
            IP({
              'meta': {
                
              },
              'version': 4,
              'type': 'dns',
              'address': u'10.210.10.2'
            })
          ],
          'routes': [
            
          ],
          'cidr': u'10.210.0.0/16',
          'gateway': IP({
            'meta': {
              
            },
            'version': None,
            'type': 'gateway',
            'address': None
          })
        })
      ],
      'meta': {
        'injected': False,
        'tenant_id': u'cf36834c5ed243ada60a1348f83ccf81'
      },
      'id': u'658978a0-0bdf-465e-869c-2236c3e5b2a6',
      'label': u'default_net'
    }),
    'devname': u'tap70e5f94b-3e',
    'qbh_params': None,
    'meta': {
      
    },
    'address': u'fa:16:3e:0f:78:33',
    'type': u'ovs',
    'id': u'70e5f94b-3ec0-4aa7-bca9-ef1b38bf6bac',
    'qbg_params': None
  })

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