Can't PUT tag on network

Bug #1555686 reported by Hirofumi Ichihara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Hirofumi Ichihara

Bug Description

Tag update fails.

$ neutron net-create test-network
$ neutron tag-add --resource-type network --resource test-network --tag test-tag
Request Failed: internal server error while processing your request.
Neutron server returns request_ids: ['req-ccb9c3ec-6cdc-4638-b096-32e082b56bdc']

Error log:

2016-03-10 15:33:52.744 ERROR neutron.api.v2.resource [req-ccb9c3ec-6cdc-4638-b096-32e082b56bdc demo 83ff410076214c88ad045e59e9e9e95f] update failed
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource Traceback (most recent call last):
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 84, in resource
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource result = method(request=request, **args)
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/extensions/tag.py", line 104, in update
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource return self.plugin.update_tag(request.context, parent, parent_id, id)
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_log/helpers.py", line 46, in wrapper
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource return method(*args, **kwargs)
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/services/tag/tag_plugin.py", line 99, in update_tag
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource context.session.add(tag_db)
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 490, in __exit__
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource self.rollback()
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource compat.reraise(exc_type, exc_value, exc_tb)
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 487, in __exit__
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource self.commit()
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 392, in commit
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource self._prepare_impl()
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 372, in _prepare_impl
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource self.session.flush()
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2019, in flush
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource self._flush(objects)
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2046, in _flush
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource self.dispatch.before_flush(self, flush_context, objects)
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/event/attr.py", line 218, in __call__
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource fn(*args, **kw)
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/services/timestamp/timestamp_db.py", line 74, in update_timestamp
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource obj.standard_attr.updated_at = timeutils.utcnow()
2016-03-10 15:33:52.744 TRACE neutron.api.v2.resource AttributeError: 'NoneType' object has no attribute 'updated_at'

Tags: api
Changed in neutron:
assignee: nobody → Hirofumi Ichihara (ichihara-hirofumi)
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/291259

Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → High
tags: added: api
Changed in neutron:
milestone: none → mitaka-rc1
Changed in neutron:
assignee: Hirofumi Ichihara (ichihara-hirofumi) → Armando Migliaccio (armando-migliaccio)
Changed in neutron:
assignee: Armando Migliaccio (armando-migliaccio) → Hirofumi Ichihara (ichihara-hirofumi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit dc68662a0be831b66fc50d6bca7a8f1d70351200
Author: Hirofumi Ichihara <email address hidden>
Date: Fri Mar 11 00:49:06 2016 +0900

    Fix PUT tag failure

    This patch fix failure putting tag on network.
    Timestamp causes the issue because it try to update 'updated_at'
    of tag which doesn't have the attribute.

    Change-Id: Iad088bbaf4b05a25153964ed30762b70fc8b3318
    Closes-Bug: #1555686

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0rc1

This issue was fixed in the openstack/neutron 8.0.0.0rc1 release candidate.

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.