Diff comments:

> diff --git 
> a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker 
> b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
> index e5ab016..a5eb744 100755
> --- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
> +++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
> @@ -674,7 +675,21 @@ def kill_openstack_server(test_uuid: str):
>          session=sess,
>          region_name=os.environ["OS_REGION_NAME"],
>      )
> -    for instance in nova.servers.list():
> +    nova_servers = None
> +    nova_retry_seconds = 10
> +    nova_retry_attempts = 10
> +    while not nova_servers:
> +        for attempt in range(nova_retry_attempts):
> +            try:
> +                nova_servers = nova.servers.list()
> +                break
> +            except InternalServerError:
> +                logging.info(
> +                    f"Failed to list nova servers, retrying in 
> {nova_retry_seconds} seconds, attempt {attempt+1}/{nova_retry_attempts+1}"

Am I blind or are we not actually waiting for nova_retry_seconds after this?

> +                )
> +        else:
> +            return
> +    for instance in nova_servers:
>          if test_uuid in instance.name:
>              try:
>                  instance.delete()


-- 
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/477574
Your team Canonical's Ubuntu QA is requested to review the proposed merge of 
~andersson123/autopkgtest-cloud:worker-nova-client-robustness into 
autopkgtest-cloud:master.


-- 
Mailing list: https://launchpad.net/~canonical-ubuntu-qa
Post to     : canonical-ubuntu-qa@lists.launchpad.net
Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa
More help   : https://help.launchpad.net/ListHelp

Reply via email to