Bug 1447708 - cloud-init package module fails with python NameError exception
Summary: cloud-init package module fails with python NameError exception
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: cloud-init
Version: 25
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Garrett Holmstrom
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-03 14:25 UTC by Mike Shriver
Modified: 2017-12-12 10:05 UTC (History)
10 users (show)

Fixed In Version: cloud-init-0.7.9-6.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:05:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mike Shriver 2017-05-03 14:25:02 UTC
Description of problem:
A userdata script that includes a package module will fail during deployment in Fedora-Cloud-Base-25 images (Found on image from April 26 2017).

It was found that cloudinit/distros/rhel.py is patched in Fedora, and the patch includes python os.path calls without importing os, resulting in a NameError during execution.

The upstream cloud-init 0.7.9 package does not exhibit this behavior.

Version-Release number of selected component (if applicable):
cloud-init 0.7.9-4.fc25

How reproducible:
100%

Steps to Reproduce:
1. Produce cloud-init script with a 'packages' section to install some packages
2. Deploy new instance and execute cloud-init with packages section
3. Observe cloud-init output/logs, where package module fails with exception

Actual results:
Packages are not installed, cloud-init fails with exception

Expected results:
Packages listed in userdata script are installed on the target machine

Additional info:
It appears that the patch was added to the release notes for cloud-init-0.7.6-3 on Feb 19 2015 by Garrett Holmstrom

Comment 1 Lars Kellogg-Stedman 2017-05-03 14:48:18 UTC
The Fedora patch should probably be replaced by upstream commit a3daf184, which solves the same problem but uses cloudinit.util.which rather than os.path.

Comment 3 Carl George 2017-05-05 18:27:27 UTC
I tested out Lars's suggestion in a COPR, and it works as expected.  The spec file changes are in the COPR instructions.

https://copr.fedorainfracloud.org/coprs/carlgeorge/cloud-init-rhbz1447708/

Comment 4 Fedora Update System 2017-06-21 23:17:14 UTC
cloud-init-0.7.9-6.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-1912218b0c

Comment 5 Fedora Blocker Bugs Application 2017-06-21 23:20:25 UTC
Proposed as a Freeze Exception for 26-final by Fedora user gholms using the blocker tracking app because:

 The currently-stable version of cloud-init is not able to install packages correctly after some upstream changes that broke one of our patches.  A fix is in updates-testing, but if it doesn't go stable before release it won't make it into the F26 base cloud image.

Comment 6 Fedora Update System 2017-06-23 03:28:37 UTC
cloud-init-0.7.9-6.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-faae58b0d0

Comment 7 Fedora Update System 2017-06-23 06:26:07 UTC
cloud-init-0.7.9-6.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-1912218b0c

Comment 8 Mike Shriver 2017-06-23 11:43:48 UTC
I have tested the cloud-init-0.7.9-6.fc25 package from updates-testing with a simple cloud-config file containing a single package. The "package_update_upgrade_install" module ran successfully and installed the package on F25.

Comment 9 Dusty Mabe 2017-06-23 19:57:34 UTC
I made a couple of images to test the new version of cloud-init in f26

https://dustymabe.fedorapeople.org/atomic-host-cloud-init-0.7.9-6.qcow2
https://dustymabe.fedorapeople.org/cloud-base-cloud-init-0.7.9-6.qcow2


Please test it out and give karma to:

https://bodhi.fedoraproject.org/updates/FEDORA-2017-1912218b0c

Comment 10 Mike Shriver 2017-06-23 21:34:27 UTC
Thanks for the images Dusty, testing and adding karma

Comment 11 Fedora Update System 2017-06-26 19:12:36 UTC
cloud-init-0.7.9-6.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Adam Williamson 2017-06-27 00:57:20 UTC
For the record, though in fact the update has gone stable already:

Discussed at 2017-06-26 freeze exception review meeting: https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2017-06-26/f26-blocker-review.2017-06-26-16.03.html . Accepted as a freeze exception issue on the basis this obviously breaks a feature of the Cloud images that cannot be entirely fixed with a post-release update.

Comment 13 Fedora Update System 2017-06-27 23:09:38 UTC
cloud-init-0.7.9-7.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-faae58b0d0

Comment 14 Fedora Update System 2017-06-28 21:52:54 UTC
cloud-init-0.7.9-7.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-faae58b0d0

Comment 15 Adam Williamson 2017-06-28 21:53:49 UTC
This has been fixed for 26, so dropping the 26-only FE stuff.

Comment 16 Fedora Update System 2017-09-18 22:38:10 UTC
cloud-init-0.7.9-9.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5507234819

Comment 17 Fedora Update System 2017-09-20 01:21:50 UTC
cloud-init-0.7.9-9.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-5507234819

Comment 18 Fedora End Of Life 2017-11-16 18:58:15 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 19 Fedora End Of Life 2017-12-12 10:05:26 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.