rocky-linux/rocky-tools

No such command: config-manager

systemcrash opened this issue · 7 comments

> Leaving Shell

Removing dnf cache
Ensuring repos are enabled before the package swap
No such command: config-manager. Please use /usr/bin/dnf --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(config-manager)'"
Repo name missing?

Full output:

 ./migrate2rocky.sh -r

Preparing to migrate CentOS Linux 8 to Rocky Linux 8.

Determining repository names for CentOS Linux 8.....

Found the following repositories which map from CentOS Linux 8 to Rocky Linux 8:
CentOS Linux 8  Rocky Linux 8
appstream       appstream
baseos          baseos
extras          extras

Getting system package names for CentOS Linux 8..........

Found the following system packages which map from CentOS Linux 8 to Rocky Linux 8:
CentOS Linux 8        Rocky Linux 8
centos-logos-ipa      rocky-logos-ipa
centos-backgrounds    rocky-backgrounds
centos-gpg-keys       rocky-gpg-keys
centos-logos          rocky-logos
centos-indexhtml      rocky-indexhtml
centos-linux-release  rocky-release
centos-logos-httpd    rocky-logos-httpd
centos-linux-repos    rocky-repos

Getting list of installed system packages.

We will replace the following CentOS Linux 8 packages with their Rocky Linux 8 equivalents
Packages to be Removed  Packages to be Installed
centos-gpg-keys         rocky-gpg-keys
centos-logos            rocky-logos
centos-linux-release    rocky-release
centos-linux-repos      rocky-repos

Getting a list of enabled modules for the system repositories.

In addition to the above the following system packages will be removed:
centos-linux-release
centos-linux-release

Excluding modules:
libselinux-python:2.8

Found the following modules to re-enable at completion:
mariadb:10.3
perl-IO-Socket-SSL:2.066
perl-libwww-perl:6.34
python27:2.7
python36:3.6
redis:5

Running dnf update before we attempt the migration.
Last metadata expiration check: 0:26:53 ago on Wed 07 Jul 2021 03:41:42 PM CEST.
Dependencies resolved.
Nothing to do.
Complete!
Added rockyappstream repo from https://dl.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/
Added rockybaseos repo from https://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/
rockyappstream                                  4.1 MB/s | 7.8 MB     00:01
rockybaseos                                     4.2 MB/s | 3.5 MB     00:00
Last metadata expiration check: 0:00:02 ago on Wed 07 Jul 2021 04:08:41 PM CEST.
> > > ================================================================================
 Package                  Arch       Version            Repository         Size
================================================================================
Installing:
 rocky-gpg-keys           noarch     8.4-30.el8         rockybaseos        11 k
 rocky-logos              x86_64     84.5-8.el8         rockybaseos       328 k
 rocky-release            noarch     8.4-30.el8         rockybaseos        20 k
 rocky-repos              noarch     8.4-30.el8         rockybaseos        13 k
Removing:
 centos-gpg-keys          noarch     1:8-2.el8          @@commandline     3.3 k
 centos-linux-release     noarch     8.4-1.2105.el8     @@commandline      25 k
 centos-linux-repos       noarch     8-2.el8            @@commandline      26 k
 centos-logos             x86_64     85.8-1.el8         @baseos           716 k

Transaction Summary
================================================================================
Install  4 Packages
Remove   4 Packages

Total download size: 371 k
Downloading Packages:
(1/4): rocky-gpg-keys-8.4-30.el8.noarch.rpm     104 kB/s |  11 kB     00:00
(2/4): rocky-release-8.4-30.el8.noarch.rpm      175 kB/s |  20 kB     00:00
(3/4): rocky-repos-8.4-30.el8.noarch.rpm        1.8 MB/s |  13 kB     00:00
(4/4): rocky-logos-84.5-8.el8.x86_64.rpm        2.4 MB/s | 328 kB     00:00
--------------------------------------------------------------------------------
Total                                           2.5 MB/s | 371 kB     00:00
warning: /var/cache/dnf/rockybaseos-56e41edc159a87c2/packages/rocky-gpg-keys-8.4-30.el8.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID 6d745a60: NOKEY
rockybaseos                                     1.6 MB/s | 1.6 kB     00:00
Importing GPG key 0x6D745A60:
 Userid     : "Release Engineering <infrastructure@rockylinux.org>"
 Fingerprint: 7051 C470 A929 F454 CEBE 37B7 15AF 5DAC 6D74 5A60
 From       : /tmp/tmp.fQefCdFmJG/gpg/RPM-GPG-KEY-rockyofficial
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Running scriptlet: rocky-gpg-keys-8.4-30.el8.noarch                       1/1
  Installing       : rocky-gpg-keys-8.4-30.el8.noarch                       1/8
  Installing       : rocky-release-8.4-30.el8.noarch                        2/8
  Installing       : rocky-repos-8.4-30.el8.noarch                          3/8
  Installing       : rocky-logos-84.5-8.el8.x86_64                          4/8
  Running scriptlet: rocky-logos-84.5-8.el8.x86_64                          4/8
  Erasing          : centos-linux-release-8.4-1.2105.el8.noarch             5/8
  Erasing          : centos-linux-repos-8-2.el8.noarch                      6/8
  Erasing          : centos-gpg-keys-1:8-2.el8.noarch                       7/8
  Erasing          : centos-logos-85.8-1.el8.x86_64                         8/8
  Running scriptlet: centos-logos-85.8-1.el8.x86_64                         8/8
  Running scriptlet: rocky-logos-84.5-8.el8.x86_64                          8/8
  Running scriptlet: centos-logos-85.8-1.el8.x86_64                         8/8
  Verifying        : rocky-gpg-keys-8.4-30.el8.noarch                       1/8
  Verifying        : rocky-logos-84.5-8.el8.x86_64                          2/8
  Verifying        : rocky-release-8.4-30.el8.noarch                        3/8
  Verifying        : rocky-repos-8.4-30.el8.noarch                          4/8
  Verifying        : centos-gpg-keys-1:8-2.el8.noarch                       5/8
  Verifying        : centos-linux-release-8.4-1.2105.el8.noarch             6/8
  Verifying        : centos-linux-repos-8-2.el8.noarch                      7/8
  Verifying        : centos-logos-85.8-1.el8.x86_64                         8/8

Installed:
  rocky-gpg-keys-8.4-30.el8.noarch         rocky-logos-84.5-8.el8.x86_64
  rocky-release-8.4-30.el8.noarch          rocky-repos-8.4-30.el8.noarch
Removed:
  centos-gpg-keys-1:8-2.el8.noarch   centos-linux-release-8.4-1.2105.el8.noarch
  centos-linux-repos-8-2.el8.noarch  centos-logos-85.8-1.el8.x86_64

Complete!
Last metadata expiration check: 0:00:08 ago on Wed 07 Jul 2021 04:08:41 PM CEST.
> Leaving Shell

Removing dnf cache
Ensuring repos are enabled before the package swap
No such command: config-manager. Please use /usr/bin/dnf --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(config-manager)'"
Repo name missing?

Can you show the output of the following commands, please:
rpm -q dnf-plugins-core
dnf updateinfo -v | grep '^Loaded plugins: '

rpm -q dnf-plugins-core

I performed the above on a fleet of systems, and there were a few, so I cannot be certain this output is from the correct system, but I think this is from one that worked:

dnf-plugins-core-4.0.18-4.el8.noarch

dnf updateinfo -v | grep '^Loaded plugins: '

Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync

System(s), that I think was problematic has:

rpm -q dnf-plugins-core
package dnf-plugins-core is not installed

and

 dnf updateinfo -v | grep '^Loaded plugins: '

I believe, if this is correct, that these last systems were a COS 7-> 8 upgrade, whereby I did

yum  install dnf
dnf erase yum

among other procedures

Hope that is helpful. Thanks for the useful script 😄 It saved me some time

There is a reason why major release upgrades like that are not supported in either CentOS or RockyLinux, if it works at all the resulting system will be in an unknown state. In this particular case it is missing the dnf-plugins-core package which is expected to be in any EL8 install.

That said, I will add code to check for that and return an appropriate error message before a migration attempt is made. thanks for the report.

To help recover your failed migrations to a usable state, please do:

dnf install dnf-plugins-core
dnf distro-sync

If your systems have EFI boot then you will also have to run additional commands to fix the EFI boot as well.

Thanks. I'm not afraid of broken stuff, or unknown states. I am happy to tackle most problems as they arise. The 7->8 'upgrade' simply missed those plugins. What's unusual is that the dnf package itself does not mandate the plugins (or invoke them). So..... finesse. Hope this is a useful datapoint.

Yes it is, and tbh there are other ways that dnf-plugins-core can go missing, so it is very much a case of we want to check for that and I'm glad you pointed it out.

As well as checking for the package, I can manually force-enable the plugin for those commands that use it, just in case it's installed but disabled.

This is now fixed and pushed.