notification is not generated for neutron dhcp-agent-network-add and dhcp-agent-network-remove commands

Bug #1317008 reported by Maruti Kamat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Wishlist
Maruti Kamat

Bug Description

notification_driver is configured in neutron.conf as shown below.

notification_driver = neutron.openstack.common.notifier.log_notifier

default_notification_level = INFO

notification_topics = notifications

When an administrator wants to associate a particular network to a given dhcp agent, then he/she has to execute the below command.

neutron dhcp-agent-network-add

as shown in the below example.

root@preetictl:~# neutron agent-list
+--------------------------------------+--------------------+----------+-------+----------------+
| id | agent_type | host | alive | admin_state_up |
+--------------------------------------+--------------------+----------+-------+----------------+
| 1d7de23f-318b-42ce-af0b-4bf359bf43ba | L3 agent | preetinn | :-) | True |
| 3e6e04f3-9dd2-412a-a5e4-cc7d1fb3ef5a | DHCP agent | preetinn | :-) | True |
| 7c771b8c-d3ed-47f5-a211-f7106590d021 | Open vSwitch agent | preetinn | :-) | True |
| 9c136918-6dc7-4ded-b3bc-e5ddf5d8c8b3 | Metering agent | preetinn | :-) | True |
| e5032227-7bf0-4be3-9abe-b97e5f9872ba | Open vSwitch agent | preeticn | :-) | True |
| ef17dd6d-99cd-4f23-84d6-e051e3769592 | Metadata agent | preetinn | :-) | True |
+--------------------------------------+--------------------+----------+-------+----------------+

root@preetictl:~# neutron net-list
+--------------------------------------+----------------+----------------------------------------------------+
| id | name | subnets |
+--------------------------------------+----------------+----------------------------------------------------+
| ab83913b-a66d-428d-96cd-269d7de1d3f3 | net1 | |
+--------------------------------------+----------------+----------------------------------------------------+

root@preetictl:~# neutron dhcp-agent-network-add 3e6e04f3-9dd2-412a-a5e4-cc7d1fb3ef5a ab83913b-a66d-428d-96cd-269d7de1d3f3
Added network ab83913b-a66d-428d-96cd-269d7de1d3f3 to DHCP agent

After this operation is successful, a notification is NOT generated although the notification_driver is configured.

Similarly, neutron dhcp-agent-network-remove also does not generate notification.

Maruti Kamat (marutik)
Changed in neutron:
assignee: nobody → Maruti Kamat (maruti-kamat)
Changed in neutron:
importance: Undecided → Low
Maruti Kamat (marutik)
Changed in neutron:
status: New → In Progress
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/98330

Changed in neutron:
importance: Low → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit c37b243ee482643229867b739d83e4df2bfbda4c
Author: Maruti <email address hidden>
Date: Fri Jun 6 01:30:51 2014 -0700

    Fixed audit notifications for dhcp-agent-network

    dhcp-agent-network-add and dhcp-agent-network-remove do not
    generate audit notifications which are used for security
    compliance.
    CRUD operations of core network resources are handled by
    neutron/api/v2/base.py. In base.py, each of create(), update(),
    delete() methods makes calls to oslo.messaging.Notifier.info()
    to generate these notifications.
    In the proposed fix, it is fixed in a similar fashion in
    extensions/dhcpagentscheduler.py inside create() and delete()
    methods by introducing info() method calls inside them.

    Change-Id: Ia23b981b2fbe739d22ebaa7bb0975fb9e39f881b
    Closes-Bug: 1317008

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-3 → 2014.2
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.