get_dhcp_port() RPC is no longer used

Bug #1314534 reported by Darragh O'Reilly
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Assaf Muller

Bug Description

get_dhcp_port() is not being used after https://review.openstack.org/#/c/79282/4

It and its unit tests should probably be removed sometime in the future.

tags: added: l3-ipam-dhcp
Revision history for this message
Wei Wang (damon-devops) wrote :

The patch Change-Id: I639bcf93725c4969d1011d2d20491d461ccfdbed has been merged.

Changed in neutron:
assignee: nobody → Wei Wang (damon-devops)
Revision history for this message
Wei Wang (damon-devops) wrote :

"neutron.agent.dhcp_agent.DhcpPluginApi.get_dhcp_port()" used to be used in "neutron.agent.linux.dhcp.DeviceManager.update()", but after this patch's merge(https://review.openstack.org/#/c/79282/4), we can delete it.

Changed in neutron:
status: New → In Progress
Revision history for this message
Wei Wang (damon-devops) wrote :

Need to be cleaned:

neutron.agent.dhcp_agent.DhcpPluginApi.get_dhcp_port,
neutron.tests.unit.test_dhcp_agent.TestDhcpPluginApiProxy.test_get_dhcp_port,
neutron.tests.unit.test_dhcp_agent.TestDhcpPluginApiProxy.test_get_dhcp_port_none.

Revision history for this message
Wei Wang (damon-devops) wrote :

Oh, I'm confused in which get_dhcp_port() called in "self.plugin.get_dhcp_port" in the previous neutron/agent/linux/dhcp.py. Can any body explain to me?

Revision history for this message
Darragh O'Reilly (darragh-oreilly) wrote :

I'm not sure about the process for removing a call from the RPC API. It probably depends on whether the server or the agents get upgraded first.
If the server is upgraded first, then it would need to be backward compatible with the agents from the previous release. So if this change is merged in Juno, then the server side code should not be removed until K.

The unused code is here:

vagrant@devstack:/opt/stack/neutron$ grep -r get_dhcp_port\( neutron/
neutron/db/dhcp_rpc_base.py: def get_dhcp_port(self, context, **kwargs):
neutron/agent/dhcp_agent.py: def get_dhcp_port(self, network_id, device_id):
neutron/tests/unit/test_dhcp_agent.py: def test_get_dhcp_port(self):
neutron/tests/unit/test_dhcp_agent.py: retval = self.proxy.get_dhcp_port('netid', 'devid')
neutron/tests/unit/test_dhcp_agent.py: self.assertIsNone(self.proxy.get_dhcp_port('netid', 'devid'))
neutron/tests/unit/test_db_rpc_base.py: retval = self.callbacks.get_dhcp_port(mock.Mock(),

Changed in neutron:
importance: Undecided → Low
Assaf Muller (amuller)
Changed in neutron:
assignee: Wei Wang (damon-devops) → Assaf Muller (amuller)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
assignee: Assaf Muller (amuller) → Russell Bryant (russellb)
Assaf Muller (amuller)
Changed in neutron:
assignee: Russell Bryant (russellb) → Assaf Muller (amuller)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/187345
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=b48bccc60e4fd552d7b127376f41810b61e0ba9d
Submitter: Jenkins
Branch: master

commit b48bccc60e4fd552d7b127376f41810b61e0ba9d
Author: Assaf Muller <email address hidden>
Date: Mon Jun 1 17:05:56 2015 -0400

    Remove get_dhcp_port RPC method

    This method was last used in Icehouse. I think we can safely
    remove all of its code and tests. Icehouse to Liberty rolling
    upgrades are in no way expected to work so I just bumped
    the RPC version and removed all traces of the code.

    Change-Id: Ia545c5be7da80c919ad5bae6074bc1cc3aa89fa0
    Closes-Bug: #1314534

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (feature/pecan)

Fix proposed to branch: feature/pecan
Review: https://review.openstack.org/196701

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (feature/pecan)

Change abandoned by Kyle Mestery (<email address hidden>) on branch: feature/pecan
Review: https://review.openstack.org/196701
Reason: This is lacking the functional fix [1], so I'll propose a new merge commit which includes that one.

[1] https://review.openstack.org/#/c/196711/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (feature/pecan)

Fix proposed to branch: feature/pecan
Review: https://review.openstack.org/196920

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (feature/pecan)
Download full text (171.5 KiB)

Reviewed: https://review.openstack.org/196920
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7f759c077f8f860c13db92d2ea6b353ef6b70900
Submitter: Jenkins
Branch: feature/pecan

commit 8123144fadd7c5d5e6e56a76ea860512619a2cf6
Author: Moshe Levi <email address hidden>
Date: Sun Jun 28 14:37:14 2015 +0300

    Fix Consolidate sriov agent and driver code

    This patch add mising __init to mech_sriov/mech_driver/
    and update the setup.cfg to the new agent entrypoint

    Trivial Fix

    Change-Id: I53a527081feb78472f496675bbb3c5121d38a14a

commit 8942fccf02e6e179d47582fdb2792a1ca972da21
Author: Assaf Muller <email address hidden>
Date: Mon Jun 29 11:38:51 2015 -0400

    Remove failing SafeFixture tests

    The fixtures 1.3 release attempted to fix the fixtures resource
    leak issue, but failed to do so completely. Our own SafeFixture
    is still needed: The 1.3 release broke our SafeFixture tests,
    but not the usage of SafeFixture itself. This patch removes
    those failing tests for now to unbreak the gate. Jakub reported
    a bug on fixtures 1.3:
    https://bugs.launchpad.net/python-fixtures/+bug/1469759

    We will continue to use SafeFixture until that bug is fixed
    in fixtures, at which point we will be able to require
    fixtures > 1.3.

    Change-Id: I59457c3bb198ff86d5ad55a1e623d008f0034b8f
    Closes-Bug: #1469734

commit 71dffb0a2c1720cd8233a329d32958a0160dd6f5
Author: Kevin Benton <email address hidden>
Date: Mon Jun 29 08:27:41 2015 +0000

    Revert "Removed test_lib module"

    This reverts commit 9a6536de6e1a7fe9b2552adc142e254426b82b6f.

    We pulled all of the plugins out of the tree, many of which still inherit
    from neutron test classes. This change then stated that we no longer
    support testing other plugins. I think this is a bit premature and should
    have been discussed under the subject
    "Neutron plugins can't use neutron plugin unit tests" or something
    similar.

    Change-Id: I68318589f010b731574ea3bfa8df98492bab31fc

commit b20fd81dbd497e058384a0af065dd0f1fdc4c728
Author: Jakub Libosvar <email address hidden>
Date: Fri Jun 5 14:32:51 2015 +0000

    Refactor NetcatTester class

    Following capabilities were added:
       - used transport protocol is passed as a constant instead of bool
       - src port for testing was added
       - connection can be established explicitly
       - change constructor parameters of NetcatTester

    As a part of removing bool for protocol definition
    get_free_namespace_port() was also modified to match the behavior.

    Change-Id: Id2ec322e7f731c05a3754a65411c9a5d8b258126

commit 83e37980dcd0b2bad6d64dd2cb23bcd2891cafca
Author: jingliuqing <email address hidden>
Date: Sat Jun 27 13:41:54 2015 +0800

    Use REST rather than ReST

    Change-Id: I06c9deaab58c5ec13bfeec39fb8fd4b1fe21f42d

commit 1b60df85ba3ad442c2e4e7e52538e1b9a1bf9378
Author: Kevin Benton <email address hidden>
Date: Thu Jun 25 18:34:38 2015 -0700

    Add a double-mock guard to the base test case

    Use mock to patch mock with a check to prevent multiple active
    patches to the...

tags: added: in-feature-pecan
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-1 → 7.0.0
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.