Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zypper migration should check host and target rpm db_backends is compatible #263

Open
rtamalin opened this issue Aug 7, 2024 · 1 comment

Comments

@rtamalin
Copy link
Collaborator

rtamalin commented Aug 7, 2024

In cases where zypper migration is being run in a host environment targeting a mounted file system hierarchy, such as when being used by the SUSE DMS solution, if the host system environment's rpm backend is not compatible, this can lead to zypper migration failures leaving the target system in an inconsistent state.

...

(   1/1681) Removing: libgdata-lang-0.17.5-5.4.noarch [..
warning: Found BDB Packages database while attempting ndb backend: using bdb_ro backend.
warning: Found BDB Packages database while attempting ndb backend: using bdb_ro backend.
error: cannot open Packages index using unknown db - Operation not permitted (1)
error: cannot open Packages database in /system-root/var/lib/rpm
Removal of (60889)libgdata-lang-0.17.5-5.4.noarch(@System) failed:
Error: Subprocess failed. Error: RPM failed: Command exited with status 1.
error]
Abort, retry, ignore? [a/r/i] (a): a
warning: Found BDB Packages database while attempting ndb backend: using bdb_ro backend.
Problem occurred during or after installation or removal of packages:
Installation has been aborted as directed.
Please see the above error message for a hint.
command '/usr/bin/zypper --root /system-root --non-interactive --releasever 15.3 --no-refresh dist-upgrade --auto-agree-with-licenses --auto-agree-with-licenses --replacefiles --allow-vendor-change' failed
Error: zypper returned 8 with 'warning: Found BDB Packages database while attempting ndb backend: using bdb_ro backend.
warning: Found BDB Packages database while attempting ndb backend: using bdb_ro backend.
warning: Found BDB Packages database while attempting ndb backend: using bdb_ro backend.
warning: Found BDB Packages database while attempting ndb backend: using bdb_ro backend.
Removal of (60889)libgdata-lang-0.17.5-5.4.noarch(@System) failed:
Error: Subprocess failed. Error: RPM failed: Command exited with status 1.
warning: Found BDB Packages database while attempting ndb backend: using bdb_ro backend.
Problem occurred during or after installation or removal of packages:
Installation has been aborted as directed.
Please see the above error message for a hint.' (exit status 8)

Migration failed.

The migration to the new service pack has failed. The system is most
likely in an inconsistent state.

...

This scenario can arise if the host environment is using ndb backend, as is the case with the rpm-ndb package, used in SUSE SLE cloud images since SLE 15 SP2 and SLE BCI images since 15 SP3.

The check rpm -E "%{_db_backend}" can be used to determine the backend, e.g.

% rpm -E "%{_db_backend}"
bdb

NOTE: If the rpm version is too old, the response will be %{_db_backend} which equates to the bdb backend.

@rjschwei
Copy link
Member

@mlschroe is there some kind of conversion we can perform on the source (old system to be upgraded) to handle the bdb to ndb transition?

@felixsch felixsch added duplicate This issue or pull request already exists and removed duplicate This issue or pull request already exists labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants