Skip to content

Commit

Permalink
fix(disk): sets default retries=20 for polling disk status
Browse files Browse the repository at this point in the history
This commit addresses the 'Disk cannot be deleted as it is bound to a deployment' error.
It increases the default retries for polling disk status to change to available, introducing
a total of 20 retries with 5-second intervals. This modification aims ensure a more thorough
check before attempting disk deletion.
  • Loading branch information
RomilShah authored and pallabpain committed Jan 25, 2024
1 parent 1d81a82 commit 35fa0f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion riocli/disk/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def delete_object(self, client: Client, obj: typing.Any) -> typing.Any:
volume_instance = client.get_volume_instance(obj.internalDeploymentGUID)
volume_instance.destroy_volume_instance()

def _poll_till_available(self, client: Client, obj: typing.Any, sleep_interval=5, retries=10):
def _poll_till_available(self, client: Client, obj: typing.Any, sleep_interval=5, retries=20):
dep_guid = obj.internalDeploymentGUID
deployment = client.get_deployment(deployment_id=dep_guid)

Expand Down

0 comments on commit 35fa0f4

Please sign in to comment.