I have two stacks: myData
and myWorker
. The worker uses the data. I get errors when deleting the worker. The errors complain that his attachment to the data is still active.
myData
is long lived and contains myVolume
, an AWS::EC2::Volume
.
myWorker
exists only occasionally and contains myServer
and myMountPoint
, an AWS::EC2::Instance
and an AWS::EC2::VolumeAttachment
.
This doesn't work out. delete-stack
on myWorker
reports:
DELETE_FAILED Volume detachment between volume-id vol-XXXX and instance-id i-YYYY at device /dev/sdX is in busy state
That seems reasonable. The sequence is probably:
create myWorker
create myServer
create myMountPoint
... later ...
delete-stack myWorker
delete myMountPoint
delete myServer
In which case the server is still running and probably using the mount point.
But that seems unlikely.
create myWorker
create myServer
create myMountPoint
start up myServer
mount that mount point
start services including disk mounting
... later ...
delete-stack myWorker
stop up myServer
stop services & unmount disk
delete myMountPoint
delete myServer
So, help? Where is this sequence actually documented, and how can I fix this?