Removing Cinder and moving to Neutron ** Also affects: neutron Importance: Undecided Status: New
** No longer affects: cinder -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1460786 Title: Primary and secondary DNS servers get swapped Status in OpenStack Neutron (virtual network service): New Bug description: This defect is related to Neutron component. When a network is created with DNS server ip addresses, they get swapped if primary DNS is greater than secondary DNS (from sorted list perspective). When 8.8.8.8 is entered as primary DNS and 7.7.7.7 is entered as secondary DNS : From : /usr/lib/python2.7/site- packages/neutron/db/db_base_plugin_v2.py def _create_subnet_from_implicit_pool(self, context, subnet): pdb.set_trace() s = subnet['subnet'] self._validate_subnet(context, s) tenant_id = self._get_tenant_id_for_create(context, s) id = s.get('id', uuidutils.generate_uuid()) detail = ipam.SpecificSubnetRequest(tenant_id, id, s['cidr']) with context.session.begin(subtransactions=True): network = self._get_network(context, s["network_id"]) self._validate_subnet_cidr(context, network, s['cidr']) subnet = self._save_subnet(context, network, self._make_subnet_args(context, network.shared, detail, s), s['dns_nameservers'], s['host_routes'], s['allocation_pools']) if network.external: self._update_router_gw_ports(context, subnet['id'], subnet['network_id']) return self._make_subnet_dict(subnet) subnet variable before _save_subnet is invoked : (8.8.8.8 and 7.7.7.7) (Pdb) p subnet {u'subnet': {'host_routes': <object object at 0x7fd428331400>, 'prefixlen': <object object at 0x7fd428331400>, 'name': '', u'enable_dhcp': False, u'network_id': u'e8d3b629-b2e3-484c-84a3-c015e3dd082d', 'tenant_id': u'c4af4f17fb5d413c9f9a7bcda537c621', u'dns_nameservers': [u'8.8.8.8', u'7.7.7.7'], 'ipv6_ra_mode': <object object at 0x7fd428331400>, u'allocation_pools': [{u'start': u'1.1.0.1', u'end': u'1.1.1.0'}, {u'start': u'1.1.1.2', u'end': u'1.1.15.254'}], u'gateway_ip': u'1.1.1.1', u'ip_version': 4, 'ipv6_address_mode': <object object at 0x7fd428331400>, u'cidr': '1.1.0.0/20', 'subnetpool_id': <object object at 0x7fd428331400>}} (Pdb) After invoking _save_subnet, (Pdb) p subnet['dns_nameservers'] [<neutron.db.models_v2.DNSNameServer[object at 4217b90] {address=u'7.7.7.7', subnet_id=u'dd999140-7d9b-4361-b507-4505ebd42bb0'}>, <neutron.db.models_v2.DNSNameServer[object at 4217c10] {address=u'8.8.8.8', subnet_id=u'dd999140-7d9b-4361-b507-4505ebd42bb0'}>] The order of ip addresses is swapped from 8.8.8.8 and 7.7.7.7 to 7.7.7.7 and 8.8.8.8. When network details are retrieved and presented, since the order is changed, primary and secondary DNS ips are swapped. This does not happen when 7.7.7.7 is entered as primary and 8.8.8.8 is entered as secondary. To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1460786/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp