xcat2 / xcat-core

Code repo for xCAT core packages
Eclipse Public License 1.0
367 stars 172 forks source link

Trying to only remove xCAT-genesis-base removes base xCAT rpm.. #5159

Open whowutwut opened 6 years ago

whowutwut commented 6 years ago

With the work around for Power9, we have documented a procedure to build xCAT genesis-base in house with the correct RHEL kernel. This rpm has EPOCH: 3 so it does not get overwritten by new versions of xCAT-genesis-base that xCAT ships.

However, when trying to uninstall the custom genesis-base to install the one provided by xCAT, it removes xCAT base rpm:

[root@mgt03 yum.repos.d]# rpm -qa | grep -i genesis
xCAT-genesis-base-x86_64-2.14-snap201803282249.noarch
xCAT-genesis-scripts-x86_64-2.14-snap201804190715.noarch
xCAT-genesis-scripts-ppc64-2.14-snap201804190715.noarch
xCAT-genesis-base-ppc64-2.13.8-snap201710241607.noarch
[root@mgt03 yum.repos.d]# yum remove xCAT-genesis-base-ppc64-2.13.8-snap201710241607.noarch
...
Dependencies Resolved

======================================================================================================
 Package                         Arch         Version                           Repository       Size
======================================================================================================
Removing:
 xCAT-genesis-base-ppc64         noarch       3:2.13.8-snap201710241607         installed       155 M
Removing for dependencies:
 xCAT                            ppc64le      2.14-snap201804190715             @xcat-core      861 k
 xCAT-genesis-scripts-ppc64      noarch       1:2.14-snap201804190715           @xcat-core      224 k

Transaction Summary
======================================================================================================
Remove  1 Package (+2 Dependent packages)

Installed size: 156 M
Is this ok [y/N]: y

Once I removed this, I had to re-install using yum install xCAT... the problem here is that it ran xcatconfig -i essentially thinking it's a new install of xCAT instead of an upgrade install. What potential issues would this cause in a running system?

But my question here is why does removing the xCAT-genesis-base not pull in a lot more RPMs to remove? It seems like something is missing in dependencies if the genesis base and cause xCAT to get uninstalled, but not others...

whowutwut commented 6 years ago

Trying to fix this is also a big mess, I was able to install

yum install xCAT-genesis-scripts-ppc64 xCAT-genesis-base-ppc64

Then ran yum install xCAT

But as you can see there are files missing on the ppc64 end of things... so not 100% sure what happened...

[root@mgt03 xcat]# find ./ -name "doxcat" -print
./share/xcat/netboot/genesis/x86_64/fs/usr/bin/doxcat
[root@mgt03 xcat]# rpm -qa | grep xCAT-genesis
xCAT-genesis-base-x86_64-2.14-snap201803282249.noarch
xCAT-genesis-scripts-x86_64-2.14-snap201804190715.noarch
xCAT-genesis-base-ppc64-2.14-snap201805021446.noarch
xCAT-genesis-scripts-ppc64-2.14-snap201804190715.noarch

Had to repair doing the following:

[root@mgt03 vhu]# rpm -Uhv xCAT-genesis-scripts-ppc64-2.14-snap201804190715.noarch.rpm --force
Preparing...                          ################################# [100%]
Updating / installing...
   1:xCAT-genesis-scripts-ppc64-1:2.14################################# [100%]
If you are installing/updating xCAT-genesis-base separately, not as part of installing/updating all of xCAT, run 'mknb <arch>' manually

[root@mgt03 vhu]# cd /opt
[root@mgt03 opt]# find ./ -name "doxcat" -print
./xcat/share/xcat/netboot/genesis/x86_64/fs/usr/bin/doxcat
./xcat/share/xcat/netboot/genesis/ppc64/fs/usr/bin/doxcat
[root@mgt03 opt]#
robin2008 commented 6 years ago

Normally, do it with below steps:

rpm -e xCAT-genesis-base-ppc64-2.13.10-snap201801170133.noarch --nodeps
rpm -Uvh <new genesis base RPM>
mknb <arch>
whowutwut commented 6 years ago

@robin2008 I've re-created this issue....

When we install a xCAT-genesis-base that is custom built in house with the alternate kernel, and installing it, it removes files from xCAT-genesis-scripts and we have to yum reinstall xCAT-genesis-scripts-ppc64 to recover and mknb ppc64 to get this to be usable again. So this is a problem.

whowutwut commented 6 years ago

Actually, this is not really the same issue, let me open another issue to track the problem I am seeing.

zet809 commented 6 years ago

Hi, @whowutwut , is #5740 is used to trace the problem? It truly a problem for xCAT-genesis-base, need to fix ASAP.

robin2008 commented 6 years ago

@zet809 I think we already talk about the spec issue before, not fixed yet?

And even after it fixed, this still be an problem when upgrade from the old package, need to mentioned in release notes.

neo954 commented 6 years ago

There is no need to uninstall the custom made xCAT-genesis-base-ppc64 with rpm -e or yum remove. Just "upgrade" to the version of xCAT-genesis-base-ppc64 you intend to use with rpm -U --force.

rpm -Uvh --force http://xcat.org/files/xcat/repos/yum/devel/xcat-dep/xCAT-genesis-base-ppc64-2.14-snap201804041553.noarch.rpm

The command line argument --force will make a version downgrade possible.