charms always upgrades packages when config-changed hook runs

Bug #1464605 reported by Edward Hope-Morley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nova-cloud-controller (Juju Charms Collection)
Fix Released
Critical
Edward Hope-Morley
swift-storage (Juju Charms Collection)
Invalid
High
Unassigned

Bug Description

The config-changed will execute the following:

    if console_attributes('protocol'):
        apt_update()
        apt_install(console_attributes('packages'), fatal=True)
        [compute_joined(rid=rid)
            for rid in relation_ids('cloud-compute')]

In other words, if config 'console-access-protocol' is set, nova console deps will always be installed or upgraded since we are not filtering already-installed packages. The result is that whenever the charm config changes, or charm is upgraded or the system is rebooted, the packages will be upgraded (regardless of the normal upgrade conditions).

Related branches

tags: added: backport-potential openstack
removed: opn
Changed in nova-cloud-controller (Juju Charms Collection):
assignee: nobody → Edward Hope-Morley (hopem)
Revision history for this message
Liam Young (gnuoy) wrote :

+1 (assuming osci agrees)

Changed in nova-cloud-controller (Juju Charms Collection):
status: In Progress → Fix Committed
Revision history for this message
Edward Hope-Morley (hopem) wrote :

Hmm, swift-storage appears to have upgraded packages following a reboot despite the fact that openstack-origin has remained the same i.e. 'distro':

2015-06-15 16:57:55 INFO unit.swift-zone2/0.juju-log cmd.go:247 Upgrading with options: ['--option', 'Dpkg::Options::=--force-confnew', '--option', 'Dpkg::Options::=--force-confdef']
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 Reading package lists...
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 Building dependency tree...
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 Reading state information...
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 The following packages were automatically installed and are no longer required:
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 linux-headers-3.13.0-35 linux-headers-3.13.0-35-generic
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 linux-headers-3.13.0-46 linux-headers-3.13.0-46-generic
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 linux-image-3.13.0-35-generic linux-image-3.13.0-46-generic
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 linux-image-extra-3.13.0-35-generic linux-image-extra-3.13.0-46-generic
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 Use 'apt-get autoremove' to remove them.
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 The following NEW packages will be installed:
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 linux-headers-3.13.0-54 linux-headers-3.13.0-54-generic
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 linux-image-3.13.0-54-generic linux-image-extra-3.13.0-54-generic
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 The following packages will be upgraded:
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 cloud-init cloud-initramfs-dyn-netconf grub-legacy-ec2 initscripts libnuma1
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 libssl1.0.0 linux-crashdump linux-generic linux-headers-generic
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 linux-image-generic linux-libc-dev openssl overlayroot qemu-keymaps
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 qemu-system qemu-system-arm qemu-system-common qemu-system-mips
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 qemu-system-misc qemu-system-ppc qemu-system-sparc qemu-system-x86
2015-06-15 16:57:55 INFO unit.swift-zone2/0.config-changed logger.go:40 qemu-utils sysv-rc sysvinit-utils
2015-06-15 16:57:56 INFO unit.swift-zone2/0.config-changed logger.go:40 25 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
2015-06-15 16:57:56 INFO unit.swift-zone2/0.config-changed logger.go:40 Need to get 80.8 MB of archives.
2015-06-15 16:57:56 INFO unit.swift-zone2/0.config-changed logger.go:40 After this operation, 271 MB of additional disk space will be used.

Changed in nova-cloud-controller (Juju Charms Collection):
status: Fix Committed → Fix Released
Changed in swift-storage (Juju Charms Collection):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Adam Collard (adam-collard) wrote :

swift-storage is constantly doing upgrades (and service restarts) in config-changed because it incorrectly assumes that an OpenStack upgrade is available.

See debugging information here:

http://paste.ubuntu.com/12204519/

Revision history for this message
Adam Collard (adam-collard) wrote :

Tracking the swift-storage issue in bug 1489770

Changed in swift-storage (Juju Charms Collection):
status: Confirmed → Invalid
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.