Swap file creation broken due to incorrect format specifiers

Bug #1872836 reported by Jeremy Norris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Undecided
Unassigned
cloud-init (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Swap file creation currently fails with the following error:
cc_mounts.py[WARNING]: failed to setup swap: %d format: a number is required, not str

This appears to be fallout from changes from this commit:
https://github.com/canonical/cloud-init/commit/6603706
https://github.com/canonical/cloud-init/pull/70

It appears several '%d' format specifiers are being incorrectly paired with a string type variable instead of number type variable.

Revision history for this message
Chad Smith (chad.smith) wrote :
Revision history for this message
Jeremy Norris (jeremy.norris) wrote :

Hi Chad,

Thanks for rapidly fixing this. Do you know if this will be pulled in before next week's 20.04 LTS release?

Thanks,
Jeremy

Revision history for this message
Chad Smith (chad.smith) wrote :

Jeremy we are queuing an upload for this as we speak.
the hope is it will be pulled in.

Revision history for this message
Jeremy Norris (jeremy.norris) wrote :

Hi Chad,

Excellent, thanks!

-Jeremy

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 20.1-10-g71af48df-0ubuntu5

---------------
cloud-init (20.1-10-g71af48df-0ubuntu5) focal; urgency=medium

  * cherry-pick 0c5c7367: test_mounts: expand happy path test for both
    happy paths

 -- Daniel Watkins <email address hidden> Thu, 16 Apr 2020 11:23:08 -0400

Changed in cloud-init (Ubuntu):
status: New → Fix Released
Revision history for this message
Jeremy Norris (jeremy.norris) wrote :

I hope that 9d7b35ce was also picked up, as that was the actual fix for this issue?
0c5c7367 appears simply to be a follow-up change to the new unit test that was included in 9d7b35ce.

Revision history for this message
Dan Watkins (oddbloke) wrote : Re: [Bug 1872836] Re: Swap file creation broken due to incorrect format specifiers

On Thu, Apr 16, 2020 at 07:31:02PM -0000, Jeremy Norris wrote:
> I hope that 9d7b35ce was also picked up, as that was the actual fix for this issue?
> 0c5c7367 appears simply to be a follow-up change to the new unit test that was included in 9d7b35ce.

Yep, the messaging is a little confusing. The test in 0c5c7367 had an
issue that only appeared on the Launchpad build infrastructure, so the
ubuntu4 package failed to build. There was a follow-up upload of the
fix for the unit test, and that's what actually caused the package to
end up in focal (because the tests could pass), and that's what we're
getting notified about.

(As an aside, I think I should have generated my upload artifacts
differently so that both changelog entries were posted here. I'll dig
into that to remind myself for next time.)

Thanks for the diligence!

Revision history for this message
Jeremy Norris (jeremy.norris) wrote :

Hi Dan,

Excellent, I figured it was something simple like that, just wanted to make sure. :)

Thanks!
Jeremy

Paride Legovini (paride)
Changed in cloud-init:
status: New → Fix Committed
Revision history for this message
Chad Smith (chad.smith) wrote : Fixed in cloud-init version 20.2.

This bug is believed to be fixed in cloud-init in version 20.2. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.