Bug in subnet create command

Bug #1615351 reported by Yuli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DragonFlow
Fix Released
High
Yuli

Bug Description

Hello

In the latest version (devstack master branch) we have the following bug when creating the subnet:

   File "/opt/stack/dragonflow/dragonflow/neutron/plugin.py", line 319, in create_subnet
     dhcp_address = self._get_ip_from_port(dhcp_port)
   File "/opt/stack/dragonflow/dragonflow/neutron/plugin.py", line 933, in _get_ip_from_port
     for fixed_ip in port['fixed_ips']:
 TypeError: string indices must be integers, not str

Running stack;sh failes because of this.

Here is a command that fails:
neutron --os-cloud devstack-admin --os-region RegionOne subnet-create --tenant-id e1cce8f30f5141d2944b09af09c77776 --ip_version 4 --gateway 10.1.0.1 --name private-subnet a44eaef1-4f16-40dd-9319-8d2343771b45 10.1.0.0/24

Revision history for this message
Yuli (stremovsky) wrote :

Problem is with DHCP port.

When creating subnet _handle_create_subnet_dhcp() function
returns DHCP address as a string and does not create a new port.

   def _handle_create_subnet_dhcp(self, context, subnet):
        """Create the dhcp configration for the subnet

        Returns the dhcp server port if configured
        """
        if subnet['enable_dhcp']:
            if cfg.CONF.df.use_centralized_ipv6_DHCP:
              return subnet['allocation_pools'][0]['start']

The last command returns IP in ipv4 format.

Changed in dragonflow:
importance: Undecided → High
assignee: nobody → Yuli (stremovsky)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to dragonflow (master)

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

Changed in dragonflow:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to dragonflow (master)

Reviewed: https://review.openstack.org/358604
Committed: https://git.openstack.org/cgit/openstack/dragonflow/commit/?id=bb151bdb1f0c0d97b2ec9ac207f9e049d5fe22f4
Submitter: Jenkins
Branch: master

commit bb151bdb1f0c0d97b2ec9ac207f9e049d5fe22f4
Author: yuli <email address hidden>
Date: Mon Aug 22 15:33:01 2016 +0300

    Fix bug with handling of dhcp address

    Closes-bug: #1615351
    Change-Id: I61d27c06b4407627202f50ba8271e56f81e5bd00

Changed in dragonflow:
status: In Progress → Fix Released
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.