From ee2dd66c9c2350d9c4aa4ae535daed7e8d72dfb3 Mon Sep 17 00:00:00 2001 From: Arathi Date: Wed, 26 Sep 2012 11:04:20 +0530 Subject: Updated code to update attach_time of a volume while detaching While detaching volume from an instance, attach_time of the volume is not updated. This task updates volume['attach_time'] to NONE at detach_volume. Also modified the default value of XML attribute volume['attach_time'] '-' to ''(a 0 length string) to maintain consistency with existing code. Fixes bug: 1056122 Change-Id: If56ceda6caab80fb803fcf194ed1dfb18808ec3a --- nova/db/sqlalchemy/api.py | 1 + 1 file changed, 1 insertion(+) (limited to 'nova/db') diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 3798cade8..39f1f8be0 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -2981,6 +2981,7 @@ def volume_detached(context, volume_id): volume_ref['mountpoint'] = None volume_ref['attach_status'] = 'detached' volume_ref['instance_uuid'] = None + volume_ref['attach_time'] = None volume_ref.save(session=session) -- cgit