diff options
| author | Arathi <arathi_darshanam@persistent.co.in> | 2012-09-26 11:04:20 +0530 |
|---|---|---|
| committer | Arathi <arathi_darshanam@persistent.co.in> | 2012-09-26 14:22:16 +0530 |
| commit | ee2dd66c9c2350d9c4aa4ae535daed7e8d72dfb3 (patch) | |
| tree | d6453952386b02f28454f6769ab8650d2aba9266 /nova/db | |
| parent | c367fa5e4a5e4712bde9fc319ae6c2f4f2add606 (diff) | |
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
Diffstat (limited to 'nova/db')
| -rw-r--r-- | nova/db/sqlalchemy/api.py | 1 |
1 files changed, 1 insertions, 0 deletions
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) |
