Skip to content

Commit

Permalink
Suggest running check when we cannot get the volume.
Browse files Browse the repository at this point in the history
  • Loading branch information
benhamad committed Feb 25, 2018
1 parent 96b5d76 commit d67c0f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixops/backends/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def create_after(self, resources, defn):
def attach_volume(self, device, volume_id):
volume = nixops.ec2_utils.get_volume_by_id(self.connect(), volume_id)
if not volume:
raise Exception("volume {0} doesn't exist".format(volume_id))
raise Exception("volume {0} doesn't exist, run check to update the state of the volume".format(volume_id))
if volume.status == "in-use" and \
self.vm_id != volume.attach_data.instance_id and \
self.depl.logger.confirm("volume ‘{0}’ is in use by instance ‘{1}’, "
Expand Down

0 comments on commit d67c0f0

Please sign in to comment.