VolumeAttachment cannot be updated

Bug #1269686 reported by Liang Chen
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Pavlo Shchelokovskyy

Bug Description

Our current logic for UpdateReplace is to create the replacement before the existing/backup resource is deleted. That works most of time as long as the replacement can be created while the backup resource still exists. But the UpdateReplace logic fails when it comes to a resource like VolumeAttachment where a volume cannot be attached again before it's detached from its previous mount point.

Revision history for this message
Zane Bitter (zaneb) wrote :

Yeah, UpdateReplace seems to be not the right thing to do for that resource. Unfortunately it breaks most of the rules of a good resource model in order to avoid a circular dependency when a volume's availability zone is determined by doing Fn::GetAtt on the server.

The AWS docs are silent on the question of what VolumeAttachment does on update, but it seems like we should allow in-place updates of the properties.

(As an aside, this is one of those things that will probably never _really_ work, because it requires the server to unmount the volume before detaching it in order to be safe.)

Changed in heat:
assignee: nobody → Pavlo Shchelokovskyy (pshchelo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
tags: added: icehouse-rc-potential
Revision history for this message
Steve Baker (steve-stevebaker) wrote :

In theory a SoftwareDeployment with actions=[SUSPEND, DELETE] could trigger some unmounting config. A working example of this would be very helpful.

Changed in heat:
milestone: none → icehouse-rc2
importance: Undecided → Medium
tags: removed: icehouse-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/72681
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=d2b9b90777abe073b59cd8a4a7279f7dc3e18d00
Submitter: Jenkins
Branch: master

commit d2b9b90777abe073b59cd8a4a7279f7dc3e18d00
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Mon Feb 3 16:04:06 2014 +0200

    Add handle_update to VolumeAttachment

    Updates for volume attachments were handled in UpdateReplace manner,
    which fails when in need to attach new volume to the same mount
    (or attach the same volume to different mount on the same server,
    or attaching the same volume to different server).

    This patch makes all properties of VolumeAttachment
    to be update_allowed, adds necessary handle_update logic
    and fixes VolumeDetachTask to reliably detach old volume
    so that new one can be immediately attached.

    Closes-Bug: #1269686
    Closes-Bug: #1251439
    Change-Id: I0aee64036bf8125f76e7f427716412a326ff5eef

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/85905

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/86461

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (milestone-proposed)

Reviewed: https://review.openstack.org/86461
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=db9545ea9ee8770ae693b0920e6211a74a056a20
Submitter: Jenkins
Branch: milestone-proposed

commit db9545ea9ee8770ae693b0920e6211a74a056a20
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Mon Feb 3 16:04:06 2014 +0200

    Add handle_update to VolumeAttachment

    Updates for volume attachments were handled in UpdateReplace manner,
    which fails when in need to attach new volume to the same mount
    (or attach the same volume to different mount on the same server,
    or attaching the same volume to different server).

    This patch makes all properties of VolumeAttachment
    to be update_allowed, adds necessary handle_update logic
    and fixes VolumeDetachTask to reliably detach old volume
    so that new one can be immediately attached.

    Change-Id: Id81a53a34b5bb2dfbc9425b91be0d02539fe2456
    Closes-Bug: #1269686
    Closes-Bug: #1251439

Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-rc2 → 2014.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.