Security_Group FirewallDriver default=None cause L2 agent to fail

Bug #1296957 reported by Irena Berezovsky
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Irena Berezovsky

Bug Description

Default value for FirewallDriver set to None in security_group_rpc.py.
L2Agent fails when using default value with following error:

/opt/stack/neutron/neutron/agent/securitygroups_rpc.py:129
2014-03-07 08:15:09.120 31995 CRITICAL neutron [req-63f8e61b-9b71-4178-95b9-ab070a4e3b26 None] 'NoneType' object has no attribute 'rpartition'
2014-03-07 08:15:09.120 31995 TRACE neutron Traceback (most recent call last):
2014-03-07 08:15:09.120 31995 TRACE neutron File "/usr/local/bin/neutron-linuxbridge-agent", line 10, in <module>
2014-03-07 08:15:09.120 31995 TRACE neutron sys.exit(main())
2014-03-07 08:15:09.120 31995 TRACE neutron File "/opt/stack/neutron/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 987, in main
2014-03-07 08:15:09.120 31995 TRACE neutron root_helper)
2014-03-07 08:15:09.120 31995 TRACE neutron File "/opt/stack/neutron/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 787, in __init__
2014-03-07 08:15:09.120 31995 TRACE neutron self.init_firewall()
2014-03-07 08:15:09.120 31995 TRACE neutron File "/opt/stack/neutron/neutron/agent/securitygroups_rpc.py", line 130, in init_firewall
2014-03-07 08:15:09.120 31995 TRACE neutron self.firewall = importutils.import_object(firewall_driver)
2014-03-07 08:15:09.120 31995 TRACE neutron File "/opt/stack/neutron/neutron/openstack/common/importutils.py", line 38, in import_object
2014-03-07 08:15:09.120 31995 TRACE neutron return import_class(import_str)(*args, **kwargs)
2014-03-07 08:15:09.120 31995 TRACE neutron File "/opt/stack/neutron/neutron/openstack/common/importutils.py", line 26, in import_class
2014-03-07 08:15:09.120 31995 TRACE neutron mod_str, _sep, class_str = import_str.rpartition('.')
2014-03-07 08:15:09.120 31995 TRACE neutron AttributeError: 'NoneType' object has no attribute 'rpartition'
2014-03-07 08:15:09.120 31995 TRACE neutron

This can be fixed by setting default firewall_driver = neutron.agent.firewall.NoopFirewallDriver or verification on L2 Agent start-up for firewall_driver is not being None.

Nachi Ueno (nati-ueno)
Changed in neutron:
status: New → Confirmed
importance: Undecided → Medium
Changed in neutron:
assignee: nobody → Irena Berezovsky (irenab)
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/82729

Changed in neutron:
status: Confirmed → In Progress
tags: added: icehouse-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 5c6ff449bbd7386f0f3e41efc524024434f325df
Author: Irena Berezovsky <email address hidden>
Date: Tue Mar 25 09:30:17 2014 +0200

    Add L2 Agent side handling for non consistent security_group settings

    Add setting of the firewall_driver to NoopDriver when firewall_driver is None and
    add warning if driver combination is not valid.
    Modify is_valid_driver_combination to verify default settings: enable_security_group (True) and firewall_driver (None).

    Change-Id: I841f9cf96ac6ee2ad17a4e8908d6c8a96f368cca
    Closes-Bug: #1296957

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
milestone: none → icehouse-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/86012

Thierry Carrez (ttx)
tags: removed: icehouse-rc-potential
Revision history for this message
Robert Kukura (rkukura) wrote :

I think the intent was that enable_security_group only apply in the server, and control whether the SG API is enabled. The firewall_driver was intended to only apply in the agent. Not sure why these are being used together, but I think it might make sense to back out the above patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (milestone-proposed)

Reviewed: https://review.openstack.org/86012
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3ac434d8a6c3370181ce2ea1d334da2cfc85629d
Submitter: Jenkins
Branch: milestone-proposed

commit 3ac434d8a6c3370181ce2ea1d334da2cfc85629d
Author: Irena Berezovsky <email address hidden>
Date: Tue Mar 25 09:30:17 2014 +0200

    Add L2 Agent side handling for non consistent security_group settings

    Add setting of the firewall_driver to NoopDriver when firewall_driver is None and
    add warning if driver combination is not valid.
    Modify is_valid_driver_combination to verify default settings: enable_security_group (True) and firewall_driver (None).

    Change-Id: I841f9cf96ac6ee2ad17a4e8908d6c8a96f368cca
    Closes-Bug: #1296957
    (cherry picked from commit 5c6ff449bbd7386f0f3e41efc524024434f325df)

Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-rc2 → 2014.1
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.