← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 879526] Re: Instance fails to allocate the correct IP address after receiving two

 

** Changed in: nova
       Status: Incomplete => 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/879526

Title:
  Instance fails to allocate the correct IP address after receiving two

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  One of my users created an instance which failed to allocate the
  correct IP address.

  Digging a little further I have noticed that two IP addresses were
  passed to the instance. The first IP in the list was assigned to the
  instance in the database and dnsmasq's dhcp server allocated the
  second IP address.

  The instance was created using euca2ools.

  Message on nova-compute (pretty printed):

  2011-10-21 12:03:16,040 DEBUG nova.compute.manager [-] instance network_info: |
  [   [   {   u'bridge': u'br100',
              u'bridge_interface': u'eth0',
              u'cidr': u'172.16.60.0/24',
              u'cidr_v6': None,
              u'id': 1,
              u'injected': False,
              u'multi_host': False,
              u'vlan': None},
          {   u'broadcast': u'172.16.60.255',
              u'dhcp_server': u'172.16.60.1',
              u'dns': [u'8.8.8.8'],
              u'gateway': u'172.16.60.1',
              u'ips': [   {   u'enabled': u'1',
                              u'ip': u'172.16.60.3',
                              u'netmask': u'255.255.255.0'},
                          {   u'enabled': u'1',
                              u'ip': u'172.16.60.34',
                              u'netmask': u'255.255.255.0'}],
              u'label': u'nova',
              u'mac': u'02:16:3e:30:f0:58',
              u'rxtx_cap': 0,
              u'should_create_bridge': True,
              u'should_create_vlan': False,
              u'vif_uuid': u'44445a69-e155-4927-9f8f-52010cbbb0c4'}]]
  | from (pid=28045) _run_instance /usr/lib/python2.7/dist-packages/nova/compute/manager.py:394

  /var/lib/nova/networks/nova-br100.conf:

  02:16:3e:30:f0:58,server-2502.novalocal,172.16.60.34

  $ euca-describe-instances i-000009c6
  RESERVATION     r-2f81m0s5      user_project   default
  INSTANCE        i-000009c6      ami-00000002    172.16.60.3      172.16.60.3      running user (user_project, ankaa)    0              m1.large 2011-10-20T15:55:36Z    nova    aki-00000001    ami-00000000

  mysql> select count(*) from fixed_ips where address = "172.16.60.3" or address = "172.16.60.34" and instance_id <> NULL;
  +----------+
  | count(*) |
  +----------+
  |        1 |
  +----------+
  1 row in set (0.00 sec)

  mysql> select instance_id from fixed_ips where address = "172.16.60.3" or address = "172.16.60.34" and instance_id <> NULL;
  +-------------+
  | instance_id |
  +-------------+
  |        2502 |
  +-------------+
  1 row in set (0.00 sec)

  mysql> select count(*) from fixed_ips where instance_id = 2502;
  +----------+
  | count(*) |
  +----------+
  |        1 |
  +----------+
  1 row in set (0.00 sec)

  mysql> select address from fixed_ips where instance_id = 2502;
  +-------------+
  |  address    |
  +-------------+
  | 172.16.60.3 |
  +-------------+
  1 row in set (0.00 sec)

  /var/log/syslog:

  Oct 21 12:35:51 nova dnsmasq-dhcp[31614]: DHCPDISCOVER(br100) 172.16.60.34 02:16:3e:30:f0:58 
  Oct 21 12:35:51 nova dnsmasq-dhcp[31614]: DHCPOFFER(br100) 172.16.60.34 02:16:3e:30:f0:58 
  Oct 21 12:35:51 nova dnsmasq-dhcp[31614]: DHCPREQUEST(br100) 172.16.60.34 02:16:3e:30:f0:58 
  Oct 21 12:35:51 nova dnsmasq-dhcp[31614]: DHCPACK(br100) 172.16.60.34 02:16:3e:30:f0:58 server-2502
  Oct 21 12:37:52 nova dnsmasq-dhcp[31614]: DHCPDISCOVER(br100) 172.16.60.34 02:16:3e:30:f0:58 
  Oct 21 12:37:52 nova dnsmasq-dhcp[31614]: DHCPOFFER(br100) 172.16.60.34 02:16:3e:30:f0:58 
  Oct 21 12:37:52 nova dnsmasq-dhcp[31614]: DHCPREQUEST(br100) 172.16.60.34 02:16:3e:30:f0:58 
  Oct 21 12:37:52 nova dnsmasq-dhcp[31614]: DHCPACK(br100) 172.16.60.34 02:16:3e:30:f0:58 server-2502
  Oct 21 12:39:34 nova dnsmasq-dhcp[31614]: DHCPRELEASE(br100) 172.16.60.3 02:16:3e:30:f0:58 unknown lease
  Oct 21 12:39:35 nova dnsmasq-dhcp[31614]: DHCPRELEASE(br100) 172.16.60.34 02:16:3e:30:f0:58

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