incorrect dhcp port for IPv4 subnet

Bug #1531377 reported by shihanzhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DragonFlow
Fix Released
High
Eyal Leshem

Bug Description

Now the default value of config option 'use_centralized_ipv6_DHCP' is True, when we create a IPv4 subnet, it will directly use first IP address in allocation_pools, but I think we should check if the subnet is IPv6, the codes as below:

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

        Returns the dhcp server ip address if configured
        """
        if subnet['enable_dhcp']:
            if cfg.CONF.df.use_centralized_ipv6_DHCP:
                return subnet['allocation_pools'][0]['start']
            else:
                dhcp_port = self._create_dhcp_server_port(context, subnet)
                return self._get_ip_from_port(dhcp_port)
        return None

Changed in dragonflow:
assignee: nobody → shihanzhang (shihanzhang)
Li Ma (nick-ma-z)
Changed in dragonflow:
importance: Undecided → Low
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/273371

Changed in dragonflow:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on dragonflow (master)

Change abandoned by shihanzhang (<email address hidden>) on branch: master
Review: https://review.openstack.org/273371
Reason: agree

Revision history for this message
Omer Anson (omer-anson) wrote :

This bug has to be verified - It is possible we no longer need the code causing this bug.

Changed in dragonflow:
importance: Low → High
status: In Progress → Incomplete
Omer Anson (omer-anson)
Changed in dragonflow:
assignee: shihanzhang (shihanzhang) → nobody
assignee: nobody → Eyal Leshem (leyal)
Changed in dragonflow:
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to dragonflow (master)

Reviewed: https://review.openstack.org/503965
Committed: https://git.openstack.org/cgit/openstack/dragonflow/commit/?id=8619ce71c54a7e0986eb375d1fa32599e49b7362
Submitter: Zuul
Branch: master

commit 8619ce71c54a7e0986eb375d1fa32599e49b7362
Author: Eyal Leshem <email address hidden>
Date: Wed Sep 6 14:22:45 2017 +0300

    DHCP port per network

    Until this patch dhcp_port created per subnet
    This patch change this behaviour to - one port per network

    For full details see :
    https://github.com/openstack/dragonflow/blob/master/doc/source/specs/dhcp_port_per_network.rst

    Change-Id: I25c6a6876945c9e6ee10887e8900564692455258
    Closes-Bug: #1725983
    Closes-Bug: #1531377

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.