cloud init depends on python-serial but does not declare it
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| cloud-init (Ubuntu) |
Medium
|
Dan Watkins | ||
| Precise |
Undecided
|
Unassigned | ||
| Trusty |
Undecided
|
Unassigned |
Bug Description
[Impact]
cloud-init will fail to run on an installation of Ubuntu which doesn't include python-serial. This excludes normal cloud images (as they ship with Landscape, which indirectly depends on it), but custom built images (or more minimal images) will see this.
[Test Case]
Build an image with cloud-init in its default configuration but without another package that depends on python-serial. cloud-init should run successfully on boot.
[Regression Potential]
None; we are just adding a dependency which exists in the archive for all versions and which is installed already in most deployments.
[Original Report]
cloud-init 0.6.3-0ubuntu1.14 appears to depend on python-serial (due to the backported cloudsigma support patch), but this dependency is not specified in the package.
I built a machine image via debootstrap and installing the cloud-init package, but upon boot, cloud-init doesn't perform any of the expected actions, and I get this backtrace in /var/log/boot.log:
Traceback (most recent call last):
File "/usr/bin/
main()
File "/usr/bin/
cloud.
File "/usr/lib/
dslist = list_sources(
File "/usr/lib/
return(
File "/usr/lib/
mod = __import_
File "/usr/lib/
from cloudinit.cs_utils import Cepko
File "/usr/lib/
import serial
ImportError: No module named serial
The fix would appear to be adding python-serial to Depends.
This also appears for me in Ubuntu 12.04 LTS, with cloud-init 0.6.3-0ubuntu1.15.
Rebooting in recovery mode, I was able to install the python-serial package, and the error message went away once I rebooted.
Changed in cloud-init (Ubuntu): | |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu): | |
assignee: | nobody → Dan Watkins (daniel-thewatkins) |
Dan Watkins (oddbloke) wrote : | #3 |
Hi Drew, Jonathan,
cloud-init dynamically loads the data source modules based on which ones it's configured to use. If you don't need the CloudSigma data source, then you could do 'dpkg-reconfigure cloud-init' and remove it from the list that is configured. This just puts a file in /etc/cloud/
$ cat /etc/cloud/
# to update this file, run dpkg-reconfigure cloud-init
datasource_list: [ NoCloud, ConfigDrive ]
I will also look in to including python-serial in the Depends for precise and trusty.
Thanks,
Dan
description: | updated |
Hello Drew, or anyone else affected,
Accepted cloud-init into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
Changed in cloud-init (Ubuntu Trusty): | |
status: | New → Fix Committed |
tags: | added: verification-needed |
Changed in cloud-init (Ubuntu Precise): | |
status: | New → Fix Committed |
Chris J Arges (arges) wrote : | #5 |
Hello Drew, or anyone else affected,
Accepted cloud-init into precise-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
Felipe Reyes (freyes) wrote : | #6 |
cloud-init from -proposed for precise is pulling in python-serial now, no problems detected after installing this new version
ubuntu@foo2:~$ dpkg -l python-serial
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Description
+++-===
un python-serial <none> (no description available)
ubuntu@foo2:~$ sudo apt-get install -q cloud-init
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
python-serial
Suggested packages:
python-wxgtk2.8 python-wxgtk2.6 python-wxgtk
The following NEW packages will be installed:
python-serial
The following packages will be upgraded:
cloud-init
1 upgraded, 1 newly installed, 0 to remove and 55 not upgraded.
Need to get 210 kB of archives.
After this operation, 383 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://
Get:2 http://
Fetched 210 kB in 1s (174 kB/s)
Preconfiguring packages ...
Selecting previously unselected package python-serial.
(Reading database ... 47512 files and directories currently installed.)
Unpacking python-serial (from .../python-
Preparing to replace cloud-init 0.6.3-0ubuntu1.17 (using .../cloud-
Unpacking replacement cloud-init ...
Processing triggers for ureadahead ...
Setting up python-serial (2.5-2.1build1) ...
Setting up cloud-init (0.6.3-0ubuntu1.18) ...
Leaving 'diversion of /etc/init/
ubuntu@foo2:~$ dpkg -l python-serial cloud-init
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Description
+++-===
ii cloud-init 0.6.3-0ubuntu1.18 Init scripts for cloud instances
ii python-serial 2.5-2.1build1 pyserial - module encapsulating access for the serial port
tags: | added: verification-done-precise |
Felipe Reyes (freyes) wrote : | #7 |
cloud-init from trusty is already depending on python-serial. Why does it need to get added explicitly?
Package: cloud-init
Priority: extra
Section: admin
Installed-Size: 964
Maintainer: Scott Moser <email address hidden>
Architecture: all
Version: 0.7.5-0ubuntu1
Replaces: ec2-init (<< 0.5.3)
Provides: ec2-init
Depends: cloud-guest-utils | cloud-utils, ifupdown (>= 0.6.10ubuntu5), procps, python (>= 2.7), python-requests (>= 0.8.2), software-
Recommends: eatmydata
Conflicts: ec2-init (<< 0.5.3)
Filename: pool/main/
Size: 190622
MD5sum: cc0d636ccbdff6f
SHA1: 05aef5df1b3b7c0
SHA256: e669b7b7bc71762
Description-en: Init scripts for cloud instances
Cloud instances need special scripts to run during initialisation
to retrieve and install ssh keys and to let the user run various scripts.
Description-md5: 8719ef0e4178017
Python-Version: 2.7
Bugs: https:/
Origin: Ubuntu
Supported: 5y
Task: cloud-image
ubuntu@foo:~$ dpkg -l python-serial
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii python-serial 2.6-1build1 all pyserial - module encapsulating access for the serial port
ubuntu@foo:~$ sudo apt-get remove python-serial
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
cloud-init python-serial
0 upgraded, 0 newly installed, 2 to remove and 99 not upgraded.
After this operation, 1,410 kB disk space will be freed.
Do you want to continue? [Y/n] ^Cubuntu@foo:~$ dpkg -l cloud-init
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii cloud-init 0.7.5-0ubuntu1.5 all Init sc...
Dan Watkins (oddbloke) wrote : | #8 |
This change wasn't needed in trusty, but as it doesn't actually change how the package behaves we will fix it in the next SRU (which will be coming hot on the heels of the current version in -proposed). Marked as verification-done.
tags: |
added: verification-done removed: verification-done-precise verification-needed |
Changed in cloud-init (Ubuntu): | |
status: | Confirmed → Fix Released |
Launchpad Janitor (janitor) wrote : | #9 |
This bug was fixed in the package cloud-init - 0.7.5-0ubuntu1.7
---------------
cloud-init (0.7.5-0ubuntu1.7) trusty; urgency=medium
* d/patches/
- Add central as a direction for EC2 availability zones (LP: #1456684).
* d/patches/
- Handle both old and new CloudStack password servers (LP: #1464253).
* Add python-serial to Build-Depends (LP: #1381776).
-- Daniel Watkins <email address hidden> Thu, 16 Jul 2015 17:34:01 +0100
Changed in cloud-init (Ubuntu Trusty): | |
status: | Fix Committed → Fix Released |
Chris J Arges (arges) wrote : Update Released | #10 |
The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
Launchpad Janitor (janitor) wrote : | #11 |
This bug was fixed in the package cloud-init - 0.6.3-0ubuntu1.18
---------------
cloud-init (0.6.3-0ubuntu1.18) precise; urgency=medium
* d/patches/
- Add central as a direction for EC2 availability zones (LP: #1456684).
* d/patches/
- Handle both old and new CloudStack password servers (LP: #1464253).
* Add python-serial to Depends (LP: #1381776).
-- Daniel Watkins <email address hidden> Thu, 16 Jul 2015 17:14:18 +0100
Changed in cloud-init (Ubuntu Precise): | |
status: | Fix Committed → Fix Released |
Status changed to 'Confirmed' because the bug affects multiple users.