fails to upgrade

Bug #1981598 reported by Dimitri John Ledkov
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
resource-agents (Ubuntu)
Fix Released
High
Lucas Kanashiro
Jammy
Fix Released
Undecided
Lucas Kanashiro
Kinetic
Fix Released
High
Lucas Kanashiro

Bug Description

[Impact]

 * When adding more agents to the supported lists files moved
   from resource-agents-extra to resource-agents-base without
   adding the required breaks/replaces.
   That breaks upgrades as reported

 * To fix this add the breaks/replaces now

[Test Plan]

 * Install an Impish system
 * Install resource-agents-extra + resource-agents-base
 * Upgrade to Jammy

 * The same shall be tried with:
   - F->J
   - I->J->K

[Where problems could occur]

 * This changes "only" package relations, so you can expect
   issues - if any - to occur on apt handling or install/upgrade

[Other Info]

 * the Kinetic change is not strictly needed as upgrades are
   only supported "through" Jammy. But the version number has
   to be bumped to avoid J>K and if we need to touch it anyway
   why not fix the package dependencies there as well.

----

dpkg: error processing archive /tmp/apt-dpkg-install-Hq6zBH/1109-resource-agents-base_1%3a4.7.0-1ubuntu7_all.deb (--unpack):
 trying to overwrite '/usr/lib/ocf/resource.d/heartbeat/iSCSILogicalUnit', which is also in package resource-agents-extra 1:4.7.0-1ubuntu5

Related branches

Changed in resource-agents (Ubuntu Jammy):
milestone: none → ubuntu-22.04.1
status: New → Triaged
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Confirmed:
root@i:~# dpkg -S /usr/lib/ocf/resource.d/heartbeat/iSCSILogicalUnit
resource-agents-extra: /usr/lib/ocf/resource.d/heartbeat/iSCSILogicalUnit

root@j:~# dpkg -S /usr/lib/ocf/resource.d/heartbeat/iSCSILogicalUnit
resource-agents-base: /usr/lib/ocf/resource.d/heartbeat/iSCSILogicalUnit

IMHO Case #9 of https://wiki.debian.org/PackageTransition

If that assumption is right we'd need:

Package: resource-agents-extra
Breaks: resource-agents-base (<<1:4.7.0-1ubuntu7)

Package: resource-agents-base
Breaks: resource-agents-extra (<<1:4.7.0-1ubuntu7)
Replaces: resource-agents-extra (<<1:4.7.0-1ubuntu7)

Changed in resource-agents (Ubuntu Kinetic):
status: New → Triaged
Changed in resource-agents (Ubuntu Jammy):
assignee: nobody → Lucas Kanashiro (lucaskanashiro)
Changed in resource-agents (Ubuntu Kinetic):
assignee: nobody → Lucas Kanashiro (lucaskanashiro)
tags: added: server-todo
Paride Legovini (paride)
Changed in resource-agents (Ubuntu Kinetic):
importance: Undecided → High
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
description: updated
Changed in resource-agents (Ubuntu Jammy):
status: Triaged → In Progress
Changed in resource-agents (Ubuntu Kinetic):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package resource-agents - 1:4.7.0-1ubuntu8

---------------
resource-agents (1:4.7.0-1ubuntu8) kinetic; urgency=medium

  * d/control: breaks/replaces for file reorg (LP: #1981598)
    to un-break upgrades

 -- Christian Ehrhardt <email address hidden> Thu, 14 Jul 2022 13:09:42 +0200

Changed in resource-agents (Ubuntu Kinetic):
status: In Progress → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

@@ -64,7 +64,8 @@
 Replaces: cluster-agents (<= 1:1.0.4-1),
           rgmanager (<= 3.0.12-2+b1),
           resource-agents (<< 1:4.7.0-1ubuntu2)
-Breaks: resource-agents (<< 1:4.7.0-1ubuntu2)
+Breaks: resource-agents (<< 1:4.7.0-1ubuntu2),
+ resource-agents-base (<<1:4.7.0-1ubuntu7)
 Conflicts: cluster-agents (<= 1:1.0.4-1), rgmanager (<= 3.0.12-2+b1)
 Description: Cluster Resource Agents
  This package contains cluster resource agents (RAs) compliant with the Open

This adds resource-agents-base to Breaks: but not to Replaces: and therefore looks incorrect to me. A Breaks: means that dpkg should deconfigure the broken package before unpacking the breaking package; but it's Replaces: that allows dpkg to overwrite files on disk. So without the Replaces:, the upgrade will still fail (sometimes).

Since this looks like an obviously incorrect packaging change for addressing this issue, I am rejecting it from the queue. Feel free to reupload with the added Replaces, or to ping me if you think I am rejecting in error.

Changed in resource-agents (Ubuntu Jammy):
status: In Progress → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote : Proposed package upload rejected

An upload of resource-agents to jammy-proposed has been rejected from the upload queue for the following reason: "Missing Replaces: to accompany the added Breaks:".

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for the review Steve. You are right, we missed that. The fixed package was uploaded.

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Dimitri, or anyone else affected,

Accepted resource-agents into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/resource-agents/1:4.7.0-1ubuntu7.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in resource-agents (Ubuntu Jammy):
status: Incomplete → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Joao Andre Simioni (jasimioni) wrote :

Hello Team,

I'm facing a problem when d-r-u from Focal to Jammy. After the upgrade, resource-agents is marked to be removed, and it removes the pgsql agent used by the PostgreSQL cluster.

I tried adding the -proposed pocket to Focal, and after the d-r-u the package was not marked to be removed, but it's failing to install in Jammy because resource-agents-base=1:4.7.0-1ubuntu7.1 and resource-agents-extra=1:4.7.0-1ubuntu7.1 are not available anywhere.

Could the dependencies point to 1:4.7.0-1ubuntu7?

Thanks

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Hi Joao,

After the upgrade from Focal to Jammy, what did you mean exactly with "marked to be removed"? I just created a Focal container, installed resource-agents binary package (contains pgsql agent), ran 'do-release-upgrade', and at the end I still have the pgsql agent provided now by resource-agents-extra.

root@ra-upgrade-focal:~# dpkg -l | grep resource-agents
ii resource-agents 1:4.7.0-1ubuntu7 all Transitional package for the resource-agents
ii resource-agents-base 1:4.7.0-1ubuntu7 all Cluster Resource Agents curated by Ubuntu
ii resource-agents-common 1:4.7.0-1ubuntu7 amd64 Common files used by the Cluster Resource Agents
ii resource-agents-extra 1:4.7.0-1ubuntu7 amd64 Cluster Resource Agents
root@ra-upgrade-focal:~# dpkg -L resource-agents-extra | grep pgsql
/usr/lib/ocf/resource.d/heartbeat/pgsql
/usr/share/man/man7/ocf_heartbeat_pgsql.7.gz
/usr/share/resource-agents/ocft/configs/pgsql

And there is nothing marked to be removed from apt:

root@ra-upgrade-focal:~# apt update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
root@ra-upgrade-focal:~# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Could you explain in more details what is happening when you upgrade your system?

About enabling -proposed in Focal, there is no version of resource-agents in focal-proposed so it would not change, in Jammy there is an ongoing SRU of the version you mentioned (1:4.7.0-1ubuntu7.1). When you upgraded to Jammy the jammy-proposed was added probably because you had focal-proposed before. I tried to also enable jammy-proposed and install the resource-agents from there and it worked fine as well.

I am not sure about the constraints of your setup but something to keep in mind is that resource-agents binary package was in main in Focal, in Jammy, it was demoted to universe because it is now a transitional package which will install resource-agents-base and resource-agents-extra. resource-agents-base contains agents curated by Ubuntu Server and this binary package is in main, the resource-agents-extra contains agents not curated by Ubuntu Server (so we do not test nor support them officially) therefore it is in universe.

Revision history for this message
Joao Andre Simioni (jasimioni) wrote (last edit ):
Download full text (3.2 KiB)

Hi Lucas,

About the -proposed, you're right - I added only the universe repository.

Regarding the original issue, here is what happens:

The resource-agents package was installed as a dependency for pacemaker:

Before d-r-u:

ubuntu@pgsrv02:~$ dpkg -l | grep -i resource-agent
ii pacemaker-resource-agents 2.0.3-3ubuntu4.3 all cluster resource manager general resource agents
ii resource-agents 1:4.5.0-2ubuntu2.2 amd64 Cluster Resource Agents

Running d-r-u:

ubuntu@pgsrv02:~$ sudo do-release-upgrade
...

81 packages are going to be removed.

 Continue [yN] Details [d]

Remove (was auto installed) accountsservice alsa-topology-conf
  alsa-ucm-conf at bsdmainutils cluster-glue cryptsetup-run
  dconf-gsettings-backend dconf-service gcc-10-base glib-networking
  glib-networking-common glib-networking-services
  gsettings-desktop-schemas language-selector-common
  libaccountsservice0 libasound2 libasound2-data libcanberra0
  libcbor0.6 libdconf1 libdns-export1109 libevent-2.1-7 libfl2
  libfuse2 libhogweed5 libjson-c4 liblrm2 libmpdec2 libmysqlclient21
  libnettle7 libntfs-3g883 libogg0 libopenhpi3 libopenipmi0
  libperl5.30 libplumbgpl2 libproxy1v5 libpython3.8
  libpython3.8-minimal libpython3.8-stdlib libqb0 libreadline5
  libsepol1 libsnmp-base libsnmp35 libsnmp40 libsoup2.4-1
  libsoup2.4-common libstonith1 libtdb1 libtimedate-perl liburcu6
  libvorbis0a libvorbisfile3 libxml2-utils libxmlb1
  linux-headers-5.4.0-109 linux-headers-5.4.0-109-generic
  linux-headers-5.4.0-148 linux-headers-5.4.0-148-generic
  linux-image-5.4.0-109-generic linux-modules-5.4.0-109-generic
  ltrace lz4 mysql-common ncal net-tools openhpid perl-modules-5.30
  popularity-contest python3-entrypoints python3-requests-unixsocket
  python3-simplejson python3.8 python3.8-minimal resource-agents
  resource-agents-extra session-migration sound-theme-freedesktop

Notice resource-agents and resource-agents-extra are in the remove list. It's a common action from users to accept the removal after d-r-u.

 After reboot:
 ubuntu@pgsrv02:~$ dpkg -l | grep -i resource-agent
ii pacemaker-resource-agents 2.1.2-1ubuntu3.1 all cluster resource manager general resource agents
rc resource-agents 1:4.7.0-1ubuntu7 all Transitional package for the resource-agents
ii resource-agents-base 1:4.7.0-1ubuntu7 all Cluster Resource Agents curated by Ubuntu
ii resource-agents-common 1:4.7.0-1ubuntu7 amd64 Common files used by the Cluster Resource Agents

And now there is no resource-agents-extra, and the Pacemaker cluster is broken.

For what I see, the issue is that pacemaker-resource-agents has moved from:

Version: 2.0.3-3ubuntu4.3
Depends: procps, resource-agents

To:

Version: 2.1.2-1ubuntu3.1
Depends: procps, resource-agents-base
Suggests: resource-agents-extra

So the -extra packages is not required, but some of its content was part of the resources-agents previously (at least the pgsql).

This is a ...

Read more...

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

OK, I believe now I understand better your use case. You have a Focal system where you installed pacemaker which pulled in pacemaker-resource-agents as a runtime dependency which also pulled in resource-agents (containing pgsql agent). So when you upgrade to Jammy, apt will try to keep what you have installed which is pacemaker, it will still pull in pacemaker-resource-agents but now resource-agents-base is pulled in instead of resource-agents. This is intentional, since the idea is to let users use agents curated by Ubuntu Server by default. If they want to use non-curated agents they need to explicitly install them via resource-agents-extra.

The pgsql is in resource-agents-extra in Jammy and it is a suggested dependency (via Suggests:) of pacemaker-resource-agents. Therefore, it is not installed by default, you would need to explicit tell apt to do so.

I believe the only solution for the upgrade here is manually installing resource-agents in Focal, then after the upgrade you will have the resource-agents transitional package installing both resource-agents-base and resource-agents-extra. Relying on pacemaker dependencies chain would not work in this case as you have experienced that. Or installing resource-agents-extra manually after the upgrade (which I believe is what you did).

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

I just tested the upgrade from Focal to Jammy and it worked fine.

root@ra-upgrade-from-focal:~# dpkg -l | grep resource-agents
ii resource-agents 1:4.5.0-2ubuntu2.2 amd64 Cluster Resource Agents

... do-release-upgrade ...

root@ra-upgrade-from-focal:~# dpkg -l | grep resource-agents
ii resource-agents 1:4.7.0-1ubuntu7.1 all Transitional package for the resource-agents
ii resource-agents-base 1:4.7.0-1ubuntu7.1 all Cluster Resource Agents curated by Ubuntu
ii resource-agents-common 1:4.7.0-1ubuntu7.1 amd64 Common files used by the Cluster Resource Agents
ii resource-agents-extra 1:4.7.0-1ubuntu7.1 amd64 Cluster Resource Agents

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Regarding comment #10, this may warrant an explicit release notes entry for jammy?

https://discourse.ubuntu.com/t/jammy-jellyfish-release-notes/24668

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package resource-agents - 1:4.7.0-1ubuntu7.1

---------------
resource-agents (1:4.7.0-1ubuntu7.1) jammy; urgency=medium

  * d/control: breaks/replaces for file reorg (LP: #1981598)
    to un-break upgrades

 -- Christian Ehrhardt <email address hidden> Thu, 14 Jul 2022 13:09:42 +0200

Changed in resource-agents (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for resource-agents has completed successfully and the package is now being 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.

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.