upgrade_packages broken in zypper/openSUSE

Bug #1375909 reported by Aleš Křivák
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Undecided
Unassigned

Bug Description

Given the following setting in user data:

#cloud-config
package_upgrade: true

cloud-init will fail to upgrade packages on openSUSE (and probably SLES) distro.
The reason for this is that cloud-init calls cloud.distro.package_command("upgrade") to upgrade packages, where the given argument is passed directly to zypper. But unlike apt-get on Debian-based systems, zypper uses command update to upgrade packages.

I am including simple patch to sles.py, which will modify argument in package_command, but it would be probably better to add new function (e. g. upgrade_packages) and call this in cc_package_update_upgrade_install.py instead of package_command("upgrade").

Revision history for this message
Aleš Křivák (aleskrivak) wrote :
Revision history for this message
Joshua Powers (powersj) wrote :

Hi! thanks for taking the time to not only file a bug but also include a patch to resolve the issue! I apologize that no one got to your bug till now. I wanted to let you know that a revamp of the sles/opensuse code was recently merged here:

https://github.com/cloud-init/cloud-init/commit/cbda576a7bbf846710ad55940bf8ca1f2d2194b9

I am going to mark this fix committed. If you have any further questions or follow ups please feel free to respond in this bug! Thanks!

Changed in cloud-init:
status: New → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote :

This should be fixed in 17.1, based on Josh's url.

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.