changing source parameter with no upgrade should update sources.list.d

Bug #1778823 reported by Xav Paice on 2018-06-27
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack ceph-mon charm
Low
Felipe Reyes
OpenStack ceph-osd charm
Low
Felipe Reyes
charms.ceph
Undecided
Felipe Reyes

Bug Description

When I ran 'juju config ceph-osd source=cloud:xenial-queens', I expected the config-changed hook to run and update /etc/apt/sources.list.d/cloud-archive.list, and update the packages.

I needed to run the install hook in order to trigger that change.

This applied also to ceph-mon.

James Page (james-page) wrote :

Interestingly the ceph-* charms will only attempt to upgrade ceph packages if the ceph version changes - UCA pockets are mapped to ceph releases, and the charm knows that pike and queens are both Luminous. So the upgrade is basically a no-op and returns fast, rather than updating and source configuration on the units.

This avoids restarts of daemons etc... when they are really not required.

James Page (james-page) wrote :

The percona-cluster charm currently will not change sources post install script execution. Again the UCA does not have PXC packages - we just use the pkgs from Xenial - so for UCA sources this is a no-op.

Also the charm lacks the orchestration capability to actually upgrade Percona packages via config-changes - restarting all daemons is undesirable.

James Page (james-page) wrote :

Xav - based on the comments in #1 and #2 what do you think is the right behaviour in this instance?

I can see a case for updating the source configuration on the units, but there is really no point to upgrading packages in both of these cases (one is version X->X, the other is not present in the UCA).

Changed in charm-ceph-mon:
status: New → Incomplete
Changed in charm-ceph-osd:
status: New → Incomplete
Changed in charm-percona-cluster:
status: New → Incomplete
James Troup (elmo) on 2018-07-04
tags: added: upgrade
Xav Paice (xavpaice) on 2018-07-09
no longer affects: charm-percona-cluster
Xav Paice (xavpaice) wrote :

The ceph packages available went from 12.2.2-0ubuntu0.17.10.1~cloud0 with Pike to 12.2.4-0ubuntu1~cloud1 with Queens, so yeah I see your point about that being a minor upgrade and not a problem - I had thought we needed to keep the versions synced entirely but regular maint would pick that up and sync the versions anyhow.

I've removed the link to percona-cluster, thanks for pointing out the error there.

I'll mark this as invalid.

Changed in charm-ceph-mon:
status: Incomplete → Invalid
Changed in charm-ceph-osd:
status: Incomplete → Invalid
Felipe Reyes (freyes) wrote :

Even if the charm won't upgrade the packages, it should still update the /etc/apt/sources.list.d/cloud-archive.list file and inform to the user that "apt-get update && apt-get ugprade" is expected to be executed.

tags: added: sts
Changed in charm-ceph-mon:
status: Invalid → New
Changed in charm-ceph-osd:
status: Invalid → New
Felipe Reyes (freyes) wrote :

This is the log message that is printed:
2018-11-26 15:17:55 INFO juju-log Invalid upgrade path from luminous to luminous. Valid paths are: ['firefly -> hammer', 'hammer -> jewel', 'jewel -> luminous', 'luminous -> mimic']

ceph versions available at the moment:

ceph | 12.2.4-0ubuntu0.17.10.1~cloud0 | pike | source
ceph | 12.2.4-0ubuntu0.17.10.1~cloud0 | pike-proposed | source
ceph | 12.2.7-0ubuntu0.18.04.1~cloud0 | queens | source
ceph | 12.2.7-0ubuntu0.18.04.1~cloud0 | queens-proposed | source

James Page (james-page) on 2018-12-07
Changed in charm-ceph-mon:
status: New → Triaged
Changed in charm-ceph-osd:
status: New → Triaged
Changed in charm-ceph-mon:
importance: Undecided → Low
Changed in charm-ceph-osd:
importance: Undecided → Low
summary: - Changing source parameter does not trigger an upgrade
+ changing source parameter with no upgrade should update sources.list.d
Felipe Reyes (freyes) on 2018-12-11
Changed in charm-ceph-mon:
assignee: nobody → Felipe Reyes (freyes)
Changed in charm-ceph-osd:
assignee: nobody → Felipe Reyes (freyes)

Fix proposed to branch: master
Review: https://review.openstack.org/624425

Changed in charm-ceph-mon:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/634338
Committed: https://git.openstack.org/cgit/openstack/charms.ceph/commit/?id=33b408268546dd0904ea05d580828481afd5c1bc
Submitter: Zuul
Branch: master

commit 33b408268546dd0904ea05d580828481afd5c1bc
Author: Felipe Reyes <email address hidden>
Date: Thu Jan 31 19:55:41 2019 -0300

    Add Stein to UCA mappings

    Change-Id: I298bd966a253a24197394e0af37f76ba9b8d9120
    Related-Bug: 1778823

Reviewed: https://review.openstack.org/624425
Committed: https://git.openstack.org/cgit/openstack/charm-ceph-mon/commit/?id=5ed4956f2bc594d42abf6fd2fa64dcddc1b86da5
Submitter: Zuul
Branch: master

commit 5ed4956f2bc594d42abf6fd2fa64dcddc1b86da5
Author: Felipe Reyes <email address hidden>
Date: Tue Dec 11 12:25:35 2018 -0300

    Update cloud-archive.list when upgrading from Pike to Queens

    ceph-mon charm only upgrades when the ceph version changes, for the
    case of upgrading from Pike to Queens the charm is skipping any
    upgrades, because the Cloud Archive has Luminous for those 2 releases.

    This patch checks if the requested ceph version is luminous and if the
    'source' changed from pike to queens to then upgrade
    /etc/apt/sources.list.d/cloud-archive.list via add_source()

    Change-Id: I05b7d722e45d3a02a97866903a67bd9b16d4f552
    Closes-Bug: 1778823

Changed in charm-ceph-mon:
status: In Progress → Fix Committed

Fix proposed to branch: master
Review: https://review.openstack.org/634424

Changed in charm-ceph-osd:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/634424
Committed: https://git.openstack.org/cgit/openstack/charm-ceph-osd/commit/?id=336581efeb9a1c5d363c5d3ce631d9bad1a8a337
Submitter: Zuul
Branch: master

commit 336581efeb9a1c5d363c5d3ce631d9bad1a8a337
Author: Felipe Reyes <email address hidden>
Date: Fri Feb 1 11:39:27 2019 -0300

    Update cloud-archive.list when upgrading from Pike to Queens

    ceph-osd charm only upgrades when the ceph version changes, for the
    case of upgrading from Pike to Queens the charm is skipping any
    upgrades, because the Cloud Archive has Luminous for those 2 releases.

    This patch checks if the requested ceph version is luminous and if the
    'source' changed from pike to queens to then upgrade
    /etc/apt/sources.list.d/cloud-archive.list via add_source()

    Change-Id: I27c2d7648a1add6528924724a03682060d2d6007
    Closes-Bug: 1778823

Changed in charm-ceph-osd:
status: In Progress → Fix Committed
Felipe Reyes (freyes) on 2019-02-06
Changed in charms.ceph:
status: New → Fix Committed
assignee: nobody → Felipe Reyes (freyes)
Drew Freiberger (afreiberger) wrote :

This appears to affect swift as well, as it also uses code-name based updates in charmhelpers. Adding swift-proxy and swift-storage charms

Drew Freiberger (afreiberger) wrote :

ignore comment #13. different bug

Change abandoned by Ryan Beisner (<email address hidden>) on branch: stable/18.11
Review: https://review.openstack.org/639144

James Page (james-page) on 2019-04-17
Changed in charm-ceph-osd:
milestone: none → 19.04
Changed in charm-ceph-mon:
milestone: none → 19.04
David Ames (thedac) on 2019-04-17
Changed in charm-ceph-osd:
status: Fix Committed → Fix Released
Changed in charm-ceph-mon:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers