In our case this change in the exception handling throws a TypeError, instead of the ValueError that is excepted:
File "/usr/lib/python3/dist-packages/cloudinit/config/cc_phone_home.py", line 132, in handle
tries = int(tries) # type: ignore
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
While we can add the "tries" parameter (and after that everything works just like before),
this exception should be handled properly.
Also according to guidelines:
1. Tell us your cloud provider
None
2. Any appropriate cloud-init configuration you can provide us
phone-home module
3. Perform the following on the system and attach it to this bug:
logs are attached
Hi!
We have some user-data files where we use the phone-home module of cloud-init. /github. com/canonical/ cloud-init/ compare/ 22.1... 22.2#diff- a4aa83fbb946ba1 ea7cf6c8dd5965c d62631dc9cb48d4 baa50adddbfef06 b82cL108
So far we did not use it's "tries" parameter and everything worked.
However now in version 22.2 there was a change which causes cloud-init to fail.
https:/
In our case this change in the exception handling throws a TypeError, instead of the ValueError that is excepted:
File "/usr/lib/ python3/ dist-packages/ cloudinit/ config/ cc_phone_ home.py" , line 132, in handle
tries = int(tries) # type: ignore
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
While we can add the "tries" parameter (and after that everything works just like before),
this exception should be handled properly.
Also according to guidelines:
1. Tell us your cloud provider
None
2. Any appropriate cloud-init configuration you can provide us
phone-home module
3. Perform the following on the system and attach it to this bug:
logs are attached
Best regards:
Zsolt