← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1977952] Re: In 22.2 cloud-init fails when phone-home module does not have "tries" parameter

 

** Also affects: cloud-init (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: cloud-init (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Also affects: cloud-init (Ubuntu Impish)
   Importance: Undecided
       Status: New

** Also affects: cloud-init (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: cloud-init (Ubuntu Focal)
   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:
  Fix Committed
Status in cloud-init package in Ubuntu:
  New
Status in cloud-init source package in Bionic:
  New
Status in cloud-init source package in Focal:
  New
Status in cloud-init source package in Impish:
  New
Status in cloud-init source package in Jammy:
  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:
  no logs are necessary 

  Best regards:
  Zsolt

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1977952/+subscriptions



References