AttributeError: 'NoneType' object has no attribute 'port_security_enabled

Bug #1694420 reported by Eduardo Gonzalez on 2017-05-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ihar Hrachyshka
neutron (Ubuntu)

Bug Description

Hi, I'm seeing in kolla gates failing with this error:
AttributeError: 'NoneType' object has no attribute 'port_security_enabled'

Instances fail to deploy while retrieving the port in openvswitch_agent.

I think may be related to this recent change

2017-05-30 10:05:23.865 7 ERROR neutron.agent.rpc [req-3d80325e-9430-46d2-ace7-b5a6ad358d77 - - - - -] Failed to get details for device c22edc09-6451-4b78-9160-399fd549314e
2017-05-30 10:05:23.865 7 ERROR neutron.agent.rpc Traceback (most recent call last):
2017-05-30 10:05:23.865 7 ERROR neutron.agent.rpc File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/agent/", line 219, in get_devices_details_list_and_failed_devices
2017-05-30 10:05:23.865 7 ERROR neutron.agent.rpc self.get_device_details(context, device, agent_id, host))
2017-05-30 10:05:23.865 7 ERROR neutron.agent.rpc File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/agent/", line 257, in get_device_details
2017-05-30 10:05:23.865 7 ERROR neutron.agent.rpc 'port_security_enabled':,
2017-05-30 10:05:23.865 7 ERROR neutron.agent.rpc AttributeError: 'NoneType' object has no attribute 'port_security_enabled'
2017-05-30 10:05:23.865 7 ERROR neutron.agent.rpc


Source code from master
Distributions affected: centos, ubuntu, oraclelinux


Eduardo Gonzalez (egonzalez90) wrote :

Tested locally out of the gates and fails with the same error

description: updated

I reproduced the issue. When "port_security" isn't set to extension_drivers and then we boot VM, the issue occurred.

tags: added: sg-fw
Changed in neutron:
status: New → Confirmed
importance: Undecided → Critical
Steven Dake (sdake) wrote :

Hey folks,

Hate to rush upstream, however, kolla's upstream gates are completely blocked because of this regression. Anything you can do to prioritize a revert or a resolution would be appreciated.


I'm not sure the cause of issue. I tried to revert is referred on Bug Description but the issue occurs again. I put importance Critical so I believe neutron team can solve the issue soon.

As pointed out in #2, a kolla-side fix would be to add the 'port_security' to the list of extension_drivers list for ML2 like in [1]. It's good practice to have this extension enabled.


Any reason why the Kolla project does not have this extension enabled by default?

Changed in neutron:
assignee: nobody → Armando Migliaccio (armando-migliaccio)

How is the kolla gate blocked? I see failures only on non-voting jobs. Where they flipped because of this issue?

Changed in neutron:
importance: Critical → Low
importance: Low → High

Fix proposed to branch: master

Changed in neutron:
assignee: Armando Migliaccio (armando-migliaccio) → Kevin Benton (kevinbenton)
status: Confirmed → In Progress
Eduardo Gonzalez (egonzalez90) wrote :

Armando, asked in neutron IRC, but didn't get an answer. Is supported enabling port_security in active deployments with existing networks? As far I know was not possible to do that in the past (around kilo). Not sure if in current master is supported.
If port_security can be enabled without manually touching the database as in the past, enabling port_security by default is an option (tested and fix the issue).
But if is not possible, that would be a blocker for enabling it by default as will break current deployments and upgrades.

At this moment we only enable port_security when designate or tacker are deployed as they need that feature.
Enable for all cases by default is just one liner change , but I'm concerned on the upgrade procedure or issue it may cause as commented before.


Changed in neutron:
assignee: Kevin Benton (kevinbenton) → Ihar Hrachyshka (ihar-hrachyshka)

Eduardo, yes, enabling it post installation is possible now with,n,z (fixed since Liberty).

Eduardo Gonzalez (egonzalez90) wrote :

Ihar, opened another bug for port_security on existing networks

DHCP does not work in old networks until neutron subnet-update --disable-dhcp and another --enable-dhcp is done.


Submitter: Jenkins
Branch: master

commit 94a882babe7210cdec0029f4796f2e1b83df116b
Author: Jeffrey Zhang <email address hidden>
Date: Sun Jun 4 09:01:49 2017 +0800

    Enable port_security in gate to fix the neutron broken

    Revert this when neutron bug[0] is fixed.


    Change-Id: Id9f84608826351b9675cd6a6f2a183e91ce33bf6
    Partial-Bug: #1694420

Changed in kolla-ansible:
importance: Undecided → Critical

As only kolla-ansible is affected by this issue, so removing non affecting deliverable kolla from the project affecting list for this bug.

no longer affects: kolla
Changed in kolla-ansible:
importance: Critical → High
status: New → Confirmed

Submitter: Jenkins
Branch: master

commit 817f39e49599c3308b5d619163a2426269633067
Author: Kevin Benton <email address hidden>
Date: Tue May 30 21:38:45 2017 -0700

    Provide fallback for disabled port security extension

    The push notification logic always assumed the port security object
    would exist but it is not present on the port when the extension is
    disabled. This defaults it to true like the server side code.[1]


    Change-Id: Ice89ad9dd486ad5fcac534ef5f7d8aae3b6b0f97
    Closes-Bug: #1694420

Changed in neutron:
status: In Progress → Fix Released
Changed in kolla-ansible:
assignee: nobody → Eduardo Gonzalez (egonzalez90)
status: Confirmed → In Progress
milestone: none → pike-2
tags: added: neutron-proactive-backport-potential
Changed in kolla-ansible:
milestone: pike-2 → pike-3

It's Pike only, not a backport material.

tags: removed: neutron-proactive-backport-potential

Change abandoned by Eduardo Gonzalez (<email address hidden>) on branch: master

no longer affects: kolla-ansible
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package neutron - 2:11.0.0~b2-0ubuntu2

neutron (2:11.0.0~b2-0ubuntu2) artful; urgency=medium

  * d/p/bug1694420.patch: Cherry pick fix to resolve issues in deployments
    where the port-security driver is not enabled (LP: #1694420).

 -- James Page <email address hidden> Wed, 21 Jun 2017 14:23:01 +0100

Changed in neutron (Ubuntu):
status: New → Fix Released

This issue was fixed in the openstack/kolla-ansible development milestone.

This issue was fixed in the openstack/neutron development milestone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers