Server update timestamp not changed when networks are added or removed

Bug #1143466 reported by Hua Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Russell Bryant

Bug Description

As the following recreate scenario shows, a server's "updated" timestamp is not being change when a network is added. This same problem occurs when a network is removed. As a result, the server is not returned as being changed when using the "changes-since" parameter to collect all server changes since a particular time.

I am using OpenStack Grizzly with quantum.

[root@node1 ˜]# nova show TTY_LINUX_TEST
+-------------------------------------+----------------------------------------------------------+
| Property | Value |
+-------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-SRV-ATTR:host | node1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | node1 |
| OS-EXT-SRV-ATTR:instance_name | instance-000000cb |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | None |
| OS-EXT-STS:vm_state | active |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2013-02-21T15:19:13Z |
| flavor | m1.tiny (1) |
| hostId | 4d86eac0d9f375223c54f8b1712c2f4238f072db86afc6ef9cdb1096 |
| id | 1e928526-a106-4971-beb7-73ade9dbd239 |
| image | MyBackup_backup (b9a92225-3951-4cf5-8e80-2800c73df77e) |
| key_name | None |
| metadata | {} |
| name | TTY_LINUX_TEST |
| network1 network | |
| progress | 0 |
| security_groups | [{u'name': u'default'}] |
| status | ACTIVE |
| tenant_id | aef72eee4db84e84b3dc8f507d2a9e63 |
| updated | 2013-02-21T15:19:46Z |
| user_id | e6de9232200b4597b9f230a9dd126bf8 |
+-------------------------------------+----------------------------------------------------------+
[root@node1 ˜]#
[root@node1 ˜]# quantum net-list
+--------------------------------------+----------+--------------------------------------------------+
| id | name | subnets |
+--------------------------------------+----------+--------------------------------------------------+
| d26101d5-5c11-470b-babc-6e2564965d29 | network1 | 8eaedfc9-2f7e-410e-b2a9-9e02be9ca020 10.0.1.0/24 |
+--------------------------------------+----------+--------------------------------------------------+
[root@node1 ˜]# nova add-fixed-ip TTY_LINUX_TEST d26101d5-5c11-470b-babc-6e2564965d29
[root@node1 ˜]# nova show TTY_LINUX_TEST
+-------------------------------------+----------------------------------------------------------+
| Property | Value |
+-------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-SRV-ATTR:host | node1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | node1 |
| OS-EXT-SRV-ATTR:instance_name | instance-000000cb |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | None |
| OS-EXT-STS:vm_state | active |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2013-02-21T15:19:13Z |
| flavor | m1.tiny (1) |
| hostId | 4d86eac0d9f375223c54f8b1712c2f4238f072db86afc6ef9cdb1096 |
| id | 1e928526-a106-4971-beb7-73ade9dbd239 |
| image | MyBackup_backup (b9a92225-3951-4cf5-8e80-2800c73df77e) |
| key_name | None |
| metadata | {} |
| name | TTY_LINUX_TEST |
| network1 network | 10.0.1.4 |
| progress | 0 |
| security_groups | [{u'name': u'default'}] |
| status | ACTIVE |
| tenant_id | aef72eee4db84e84b3dc8f507d2a9e63 |
| updated | 2013-02-21T15:19:46Z |
| user_id | e6de9232200b4597b9f230a9dd126bf8 |
+-------------------------------------+----------------------------------------------------------+

Revision history for this message
Vish Ishaya (vishvananda) wrote :

An easy fix for this would be to simply update the instance in the add-fixed-ip remove-fixed-ip code path.

Changed in nova:
status: New → Confirmed
importance: Undecided → Low
milestone: none → grizzly-rc1
tags: added: low-hanging-fruit
Changed in nova:
assignee: nobody → Russell Bryant (russellb)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/23501

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/23501
Committed: http://github.com/openstack/nova/commit/5d83d23cb7f7e95fedbd339405d93bc3841049ea
Submitter: Jenkins
Branch: master

commit 5d83d23cb7f7e95fedbd339405d93bc3841049ea
Author: Russell Bryant <email address hidden>
Date: Mon Mar 4 20:35:27 2013 -0500

    Bump instance updated_at on network change.

    Update add-fixed-ip and remove-fixed-ip code paths to update the
    updated_at field of the instance, since from the user's perspective
    through the API, they have made a change to the instance's
    configuration. In that case, it makes sense to expect that the
    updated_at field gets changed.

    Fix bug 1143466.

    Change-Id: Icfd7d0b1b556795d94a22c1719727f8c9fc744f0

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.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.