Metering doesn't anymore respect the l3 agent binding

Bug #1257354 reported by Sylvain Afchain
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
neutron
Expired
Medium
Unassigned

Bug Description

Since the old L3 mixin has been moved as a service plugin, the metering service plugin doesn't respect anymore the l3 agent binding. So instead of using the cast rpc method it uses the fanout_cast method.

Tags: metering
Changed in neutron:
assignee: nobody → Sylvain Afchain (sylvain-afchain)
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/60016

Changed in neutron:
status: New → In Progress
Revision history for this message
Koteswara Rao Kelam (koti-kelam) wrote :

Hi

I am using openstack havana and ML2 is the default plugin.
I mentioned following line in neutron.conf and restarted the neutron server but still the "neutron meter-label-xxx" commands are not listed in neutron --help.

service_plugins = neutron.services.metering.metering_plugin.MeteringPlugin

In server log, I can see that the MeteringPlugin is loaded successfully.

2014-03-12 07:03:40.405 5342 INFO neutron.manager [-] Loading Plugin: neutron.services.metering. metering_plugin.MeteringPlugin
2014-03-12 07:03:40.432 5342 DEBUG amqp [-] Start from server, version: 0.9, properties: {u'information': u'Licensed under the MPL. See http://www.rabbitmq.com/', u'product': u'RabbitMQ', u'copyright': u'Copyright (C) 2007-2011 VMware, Inc.', u'capabilities': {u'exchange_exchange_bindings': True, u'consumer_cancel_notify': True, u'publisher_confirms': True, u'basic.nack': True}, u'platform': u'Erlang/OTP', u'version': u'2.7.1'}, mechanisms: [u'PLAIN', u'AMQPLAIN'], locales: [u'en_US'] _start /usr/lib/python2.7/dist-packages/amqp/ connection.py:706
2014-03-12 07:03:40.433 5342 DEBUG amqp [-] Open OK! _open_ok /usr/lib/python2.7/dist-packages/ amqp/connection.py:592
2014-03-12 07:03:40.433 5342 DEBUG amqp [-] using channel_id: 1 __init__ /usr/lib/python2.7/dist- packages/amqp/channel.py:70
2014-03-12 07:03:40.434 5342 DEBUG amqp [-] Channel open _open_ok /usr/lib/python2.7/dist- packages/amqp/channel.py:420
2014-03-12 07:03:40.434 5342 INFO neutron.openstack.common.rpc.common [-] Connected to AMQP server on 127.0.0.1:5672
2014-03-12 07:03:40.436 5342 DEBUG neutron.manager [-] Successfully loaded METERING plugin. Description: METERING _load_service_plugins /usr/lib/python2.7/dist-packages/neutron/manager.py: 189

Please help.
Thanks in advance
Koteswar

tags: added: icehouse-backport-potential metering
Changed in neutron:
importance: Undecided → High
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to neutron (master)

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

commit 901d676b8bcbb3e731ba44a4e574e9ae998f486e
Author: Sylvain Afchain <email address hidden>
Date: Tue Jan 7 10:36:58 2014 +0100

    Fix Metering doesn't respect the l3 agent binding

    This patch fix the issue by changing the call to
    find the plugin which handles the l3 which is now
    the l3_router service plugin instead of the old mixin.

    Also change the unit tests to use the l3 service plugin
    instead of the l3 mixin and refactor the rpc callbacks
    part.

    Co-Authored-By: Ala Rezmerita <email address hidden>
    Closes-bug: #1257354
    Change-Id: Ide26f825005fa63cd3fcc75fa91fffb947e0be7a

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
status: Fix Committed → Confirmed
Revision history for this message
Cedric Brandily (cbrandily) wrote :
Download full text (7.7 KiB)

It seems the bug is not solved or reopened

neutron router-list
+--------------------------------------+---------+-----------------------------------------------------------------------------+
| id | name | external_gateway_info |
+--------------------------------------+---------+-----------------------------------------------------------------------------+
| 6023a4a3-64a0-49cf-b9e9-79e29b858ee6 | router1 | {"network_id": "f32be4d9-7137-4e33-b4c0-1462b8ee4155", "enable_snat": true} |
| 6dc3ea9f-e6eb-44f8-af23-aec5cfb0f651 | router2 | null |
+--------------------------------------+---------+-----------------------------------------------------------------------------+

neutron l3-agent-list-hosting-router router1
+--------------------------------------+------+----------------+-------+
| id | host | admin_state_up | alive |
+--------------------------------------+------+----------------+-------+
| b0715219-2590-409c-b7fd-310402568ab0 | ubu1 | True | :-) |
+--------------------------------------+------+----------------+-------+

neutron l3-agent-list-hosting-router router2
+--------------------------------------+------+----------------+-------+
| id | host | admin_state_up | alive |
+--------------------------------------+------+----------------+-------+
| 1683098b-52b5-4586-bfa8-d9fcd310c421 | ubu2 | True | :-) |
+--------------------------------------+------+----------------+-------+

neutron meter-label-create my-label
Created a new metering_label:
+-------------+--------------------------------------+
| Field | Value |
+-------------+--------------------------------------+
| description | |
| id | 4a03480a-99b4-4a63-ac5d-56638f0d0be3 |
| name | my-label |
| tenant_id | ebb0c275da254f239f7061e968ca3aa4 |
+-------------+--------------------------------------+

neutron meter-label-rule-create my-label 10.0.0.1/32

On ubu1: OK ==> L3 agent configured correctly router1 namespace iptables [1]
On ubu2: KO ==> L3 agent tries to configure router1 !! [2]

[1]
...
-A neutron-meter-FORWARD -j neutron-meter-r-4a03480a-99b
-A neutron-meter-l-4a03480a-99b
-A neutron-meter-r-4a03480a-99b -d 10.0.0.1/32 -i qg-ea54680b-05 -j neutron-meter-l-4a03480a-99b

[2]
2014-06-02 19:33:06.432 DEBUG neutron.agent.linux.utils [req-724685c2-1d01-4904-88a2-9ca63daac421 None None] Running command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qrouter-6023a4a3-64a0-49cf-b9e9-79e29b858ee6', 'iptables-save', '-c'] from (pid=6206) create_process /opt/stack/neutron/neutron/agent/linux/utils.py:48
2014-06-02 19:33:06.536 ERROR neutron.agent.linux.utils [req-724685c2-1d01-4904-88a2-9ca63daac421 None None]
Command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qrouter-6023a4a3-64a0-49cf-b9e9-79e29b858ee...

Read more...

Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

Decreasing importance and removing assignee since there was no activity for the last several months

Changed in neutron:
assignee: Sylvain Afchain (sylvain-afchain) → nobody
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/158154

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/icehouse)

Reviewed: https://review.openstack.org/158154
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e390b13d98bab576d29d967e9bed221bab79b667
Submitter: Jenkins
Branch: stable/icehouse

commit e390b13d98bab576d29d967e9bed221bab79b667
Author: Sylvain Afchain <email address hidden>
Date: Tue Jan 7 10:36:58 2014 +0100

    Fix Metering doesn't respect the l3 agent binding

    This patch fix the issue by changing the call to
    find the plugin which handles the l3 which is now
    the l3_router service plugin instead of the old mixin.

    Also change the unit tests to use the l3 service plugin
    instead of the l3 mixin and refactor the rpc callbacks
    part.

    Co-Authored-By: Ala Rezmerita <email address hidden>
    Closes-bug: #1257354

    Change-Id: Ide26f825005fa63cd3fcc75fa91fffb947e0be7a
    (cherry picked from commit 901d676b8bcbb3e731ba44a4e574e9ae998f486e)

tags: added: in-stable-icehouse
Revision history for this message
Ryan Moats (rmoats) wrote :

Removing icehouse project, and marking incomplete to start the 60 day cleanup timer - if still valid, please change the status and take ownership

no longer affects: neutron/icehouse
Changed in neutron:
status: Confirmed → Incomplete
Alan Pevec (apevec)
tags: removed: icehouse-backport-potential in-stable-icehouse
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.