Просмотр исходного кода

Refresh volume while waiting for attach

Nuwan Goonasekera 5 лет назад
Родитель
Сommit
f67859ac1a
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      cloudbridge/providers/aws/resources.py

+ 1 - 0
cloudbridge/providers/aws/resources.py

@@ -502,6 +502,7 @@ class AWSVolume(BaseVolume):
                     wait=tenacity.wait_fixed(5),
                     wait=tenacity.wait_fixed(5),
                     reraise=True)
                     reraise=True)
     def _wait_till_volume_attached(self, instance_id):
     def _wait_till_volume_attached(self, instance_id):
+        self.refresh()
         if not self.attachments.instance_id == instance_id:
         if not self.attachments.instance_id == instance_id:
             raise Exception(f"Volume {self.id} is not yet attached to"
             raise Exception(f"Volume {self.id} is not yet attached to"
                             f"instance {instance_id}")
                             f"instance {instance_id}")