Public bug reported: Hi!
We have some user-data files where we use the phone-home module of cloud-init. 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://github.com/canonical/cloud-init/compare/22.1...22.2#diff-a4aa83fbb946ba1ea7cf6c8dd5965cd62631dc9cb48d4baa50adddbfef06b82cL108 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 ** Affects: cloud-init Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to cloud-init. https://bugs.launchpad.net/bugs/1977952 Title: In 22.2 cloud-init fails when phone-home module does not have "tries" parameter Status in cloud-init: New Bug description: Hi! We have some user-data files where we use the phone-home module of cloud-init. 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://github.com/canonical/cloud-init/compare/22.1...22.2#diff-a4aa83fbb946ba1ea7cf6c8dd5965cd62631dc9cb48d4baa50adddbfef06b82cL108 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 To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1977952/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp