azure
azure copied to clipboard
azure.azcollection.azure_rm_galleryimageversion module times out if gallery image version creation takes more than 10 minutes
SUMMARY
azure.azcollection.azure_rm_galleryimageversion module times out if gallery image version creation takes more than 10 minutes
From the code:
i = 0
while response['properties']['provisioningState'] == 'Creating':
time.sleep(60)
response = self.get_resource()
i = i + 1
if i == 10:
self.fail("Create or Updating encountered an exception, wait 10 minutes when the status is still 'creating'")
Ref Link: https://github.com/ansible-collections/azure/blob/dev/plugins/modules/azure_rm_galleryimageversion.py#L863
It looks like the module waits for 10mins to check if the image version was successfully created or not. However, I recently ran into an issue where the creation process roughly takes about 15 minutes, because of which I end up with the following error message:
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Create or Updating encountered an exception, wait 10 minutes when the status is still 'creating'"}
It would be nice to have a timeout field that users can specify themselves than have a hardcoded value of 10minutes.
ISSUE TYPE
- Bug Report
COMPONENT NAME
azure.azcollection.azure_rm_galleryimageversion
ANSIBLE VERSION
ansible [core 2.17.4]
config file = None
configured module search path = ['/home/ansibleuser/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/ansibleuser/.local/lib/python3.10/site-packages/ansible
ansible collection location = /home/ansibleuser/.ansible/collections:/usr/share/ansible/collections
executable location = /home/ansibleuser/.local/bin/ansible
python version = 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] (/usr/bin/python3)
jinja version = 3.0.3
libyaml = True
COLLECTION VERSION
Collection Version
------------------ -------
azure.azcollection 2.7.0
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
ok: [localhost]
ACTUAL RESULTS
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Create or Updating encountered an exception, wait 10 minutes when the status is still 'creating'"}