Comment 1 for bug 1929097

Revision history for this message
Andrea Ieri (aieri) wrote (last edit ):

This is probably caused by the do_openstack_upgrade function running a full apt upgrade after switching the sources:

hooks/nova_compute_utils.py
 857 │ def do_openstack_upgrade(configs=None):
 858 │ """Perform an uprade of cinder. Takes care of upgrading
 859 │ packages, rewriting configs + database migration and
 860 │ potentially any other post-upgrade actions.
 861 │
 862 │ :param configs: The charms main OSConfigRenderer object.
 863 │
 864 │ """
 865 │ new_src = config('openstack-origin')
 866 │ new_os_rel = get_os_codename_install_source(new_src)
 867 │
 868 │ juju_log('Performing OpenStack upgrade to %s.' % (new_os_rel))
 869 │
 870 │ configure_installation_source(new_src)
 871 │ dpkg_opts = [
 872 │ '--option', 'Dpkg::Options::=--force-confnew',
 873 │ '--option', 'Dpkg::Options::=--force-confdef',
 874 │ ]
 875 │ apt_update()
 876 │ apt_upgrade(options=dpkg_opts, fatal=True, dist=True)

Compare with ceph-osd, which only uses apt_install on the specific ceph packages during the upgrade:

lib/charms_ceph/utils.py
2680 │ def upgrade_osd(new_version, kick_function=None):
2681 │ """Upgrades the current OSD
2682 │
2683 │ :param new_version: str. The new version to upgrade to
2684 │ """
2685 │ if kick_function is None:
2686 │ kick_function = noop
2687 │
2688 │ current_version = get_version()
2689 │ status_set("maintenance", "Upgrading OSD")
2690 │ log("Current Ceph version is {}".format(current_version))
2691 │ log("Upgrading to: {}".format(new_version))
2692 │
2693 │ try:
2694 │ add_source(config('source'), config('key'))
2695 │ apt_update(fatal=True)
2696 │ except subprocess.CalledProcessError as err:
2697 │ log("Adding the Ceph sources failed with message: {}".format(
2698 │ err))
2699 │ status_set("blocked", "Upgrade to {} failed".format(new_version))
2700 │ sys.exit(1)
2701 │
2702 │ kick_function()
2703 │
2704 │ try:
2705 │ # Upgrade the packages before restarting the daemons.
2706 │ status_set('maintenance', 'Upgrading packages to %s' % new_version)
2707 │ apt_install(packages=determine_packages(), fatal=True)

The nova compute charm has the same problem.