If subnet is created with DHCP enabled, Port UUID generated is an incorrect UUID (not a 32 bit hexadecimal string)

Bug #1334240 reported by Priyanka Chopra
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenContrail
New
Undecided
Atul Moghe

Bug Description

Problem Statement :
While creating a network and subnet from OpenStack UI , if we enable DHCP, Port UUID generated is in incorrect UUID(not a 32 bit hexadecimal string) because of which the port creation fails.

Proposed Fix:
To resolve this the check for 32 bit hexadecimal needs to be removed.

For reference below is a snippet from OpenStack explicitly creates a device id that combines host and network ids

https://github.com/openstack/neutron/blob/master/neutron/agent/linux/dhcp.py

def get_device_id(self, network):
        """Return a unique DHCP device ID for this host on the network."""
        # There could be more than one dhcp server per network, so create
        # a device id that combines host and network ids
        return commonutils.get_dhcp_agent_device_id(network.id, self.conf.host)

http://code.metager.de/source/xref/OpenStack/quantum/neutron/common/utils.py
in utils.py

def get_dhcp_agent_device_id(network_id, host):
 # Split host so as to always use only the hostname and
 # not the domain name. This will guarantee consistentcy
 # whether a local hostname or an fqdn is passed in.
   local_hostname = host.split('.')[0]
   host_uuid = uuid.uuid5(uuid.NAMESPACE_DNS, str(local_hostname))
   return 'dhcp%s-%s' % (host_uuid, network_id)

Tags: config
summary: - If subnet is enabled with DHCP enabled, Port UUID generated is an
+ If subnet is created with DHCP enabled, Port UUID generated is an
incorrect UUID (not a 32 bit hexadecimal string)
Atul Moghe (moghea)
Changed in opencontrail:
assignee: nobody → Atul Moghe (moghea)
tags: added: config
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.