Bug 1329657 - %pre (and anaconda) fails when installing on a system without shadow-utils
Summary: %pre (and anaconda) fails when installing on a system without shadow-utils
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-vmconsole
Classification: oVirt
Component: Packaging.rpm
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ovirt-3.6.6
: 1.0.2
Assignee: Francesco Romani
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On:
Blocks: ovirt-node-ng 1330521 1330565
TreeView+ depends on / blocked
 
Reported: 2016-04-22 13:55 UTC by Fabian Deutsch
Modified: 2016-05-30 10:55 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1330521 (view as bug list)
Environment:
Last Closed: 2016-05-30 10:55:22 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-3.6.z+
rule-engine: blocker+
ylavi: planning_ack+
michal.skrivanek: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)

Description Fabian Deutsch 2016-04-22 13:55:54 UTC
Description of problem:
The installation of the ovirt-vmconsole rpm fails if shadow-utils are not installed

Version-Release number of selected component (if applicable):
1.0.0-1

How reproducible:
always

Steps to Reproduce:
1. Install a clean system without shadow-utils
2. Install ovirt-vmconsole
3.

Actual results:
Fails

Expected results:
Should not fail

Additional info:
This happens when we build Node Next

Comment 1 Francesco Romani 2016-04-25 07:38:31 UTC
The first fix is to add explicit dependency to shadow-utils. I will take this chance to review the package to see if there are more hidden dependencies.

That said, I'm not sure it is completely ok to create the user at %pre stage.
Unfortunately, this has to be kept this way for the time being, since ovirt-vmconsole owns the user; For the longer term, it is probably worth to ask to add this user in the basesystem, so we can get rid of the %pre scriptlet entirely, but this won't happen anytime soon.

Comment 3 Sandro Bonazzola 2016-04-26 07:23:50 UTC
Moving to virt, integration may assist if needed.

Comment 4 Francesco Romani 2016-04-26 07:46:02 UTC
This is a purely-packaging change that cannot be verified using standard systems like RHEL, or CentOS. On those platforms should not be any user-visible difference.
On custom platforms (e.g. node) we could verify the package is not installable without shadow-utils, and that it pulls shadow-utils in.

Comment 5 Fabian Deutsch 2016-04-26 08:20:29 UTC
It can actually be verified on regular Fedora/CentOS/RHEL as well:

1. Create a kickstart file for auto installation
2. Add vm-console only to the %packages section
3. Perform the installation

This should fail without the patch.

But we can also verify it on Node.

Comment 6 Dan Kenigsberg 2016-04-26 10:17:26 UTC
I suspect no one would care if I approve this from devel PoV.

Comment 7 Nikolai Sednev 2016-05-01 13:25:14 UTC
Hi Francesco,
I'm getting this message when trying to remove shadow-utils from my cleanly installed Red Hat Enterprise Linux Server release 7.2 (Maipo) (3.10.0-327.18.2.el7.x86_64 #1 SMP Fri Apr 8 05:09:53 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux):

"yum remove shadow-utils-4.1.5.1-18.el7.x86_64 -y
.
.
.
--> Finished Dependency Resolution
Error: Trying to remove "systemd", which is protected"

The shadow-utils package already exists within our el7.2 PXE image, so I have no idea how can I possibly remove it to verify this bug. Can you provide some steps for reproduction please?

Comment 8 Fabian Deutsch 2016-05-02 07:13:13 UTC
Steps to reproduce:

1. Auto install RHEL + RHEV
2. Use a kickstart, in the %packages section only mention ovirt-vmconsole
3. Perform the installation

After 3: Very likely the installation will fail, because %pre of ovirt-vmconsole fails

Another way to verify:
$ rpm -qpR http://plain.resources.ovirt.org/pub/ovirt-master-snapshot/rpm/el7/noarch/ovirt-vmconsole-1.0.2-0.0.master.20160429122121.git53d9fb2.el7.noarch.rpm | grep shadow-utils
shadow-utils

Comment 9 Nikolai Sednev 2016-05-02 10:29:18 UTC
After running second option on engine I've received as follows:

rpm -qpR http://plain.resources.ovirt.org/pub/ovirt-master-snapshot/rpm/el7/noarch/ovirt-vmconsole-1.0.2-0.0.master.20160429122121.git53d9fb2.el7.noarch.rpm | grep shadow-utils
shadow-utils  


The engine is running rhevm-3.6.6-0.1.el6.noarch.

Comment 10 Fabian Deutsch 2016-05-02 11:05:18 UTC
The second option is just looking at the package in the internet.

To check on the local host, please try:
rpm -qR ovirt-vmconsole | grep shadow-utils

You need to run this on the host (not on the engine)

Comment 11 Nikolai Sednev 2016-05-02 13:04:32 UTC
(In reply to Fabian Deutsch from comment #10)
> The second option is just looking at the package in the internet.
> 
> To check on the local host, please try:
> rpm -qR ovirt-vmconsole | grep shadow-utils
> 
> You need to run this on the host (not on the engine)
Works nicely:
[root@alma03 ~]# rpm -qR ovirt-vmconsole | grep shadow-utils
shadow-utils

Just checked this on host.

May we close this bug then?

Comment 12 Nikolai Sednev 2016-05-02 13:08:18 UTC
On just cleanly installed host without an engine deployed on it, the command does not show anything:
[root@alma04 ~]# rpm -qR ovirt-vmconsole | grep shadow-utils
[root@alma04 ~]#

Comment 13 Fabian Deutsch 2016-05-02 13:19:51 UTC
Perfect, yes.

It would just nice to know with which ovirt-vmconsole you fixed this build.

Comment 14 Nikolai Sednev 2016-05-02 13:42:40 UTC
Host with deployed on it hosted-engine shows 
[root@alma03 ~]# rpm -qa ovirt-vmconsole
ovirt-vmconsole-1.0.2-2.el7ev.noarch

The second host which don't have hosted-engine package installed yet does not show not ovirt-vmconsole, neither shadow-utils (rpm -qR ovirt-vmconsole | grep shadow-utils).

Changing the status of this bug to verified, as agreed.


[root@alma03 ~]# rpm -qa vdsm libvirt-client sanlock qemu-kvm-rhev mom ovirt*
ovirt-hosted-engine-setup-1.3.6.0-1.el7ev.noarch
sanlock-3.2.4-2.el7_2.x86_64
ovirt-host-deploy-1.4.1-1.el7ev.noarch
ovirt-setup-lib-1.0.1-1.el7ev.noarch
qemu-kvm-rhev-2.3.0-31.el7_2.12.x86_64
libvirt-client-1.2.17-13.el7_2.4.x86_64
ovirt-vmconsole-1.0.2-2.el7ev.noarch
ovirt-hosted-engine-ha-1.3.5.3-1.el7ev.noarch
ovirt-vmconsole-host-1.0.2-2.el7ev.noarch
mom-0.5.3-1.el7ev.noarch
vdsm-4.17.27-0.el7ev.noarch
Red Hat Enterprise Linux Server release 7.2 (Maipo)
Linux 3.10.0-327.18.2.el7.x86_64 #1 SMP Fri Apr 8 05:09:53 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux


Second host has no of these installed on it, but if installing hosted-engine package, then ovirt-vmconsole-1.0.2-2.el7ev.noarch being installed on host with no issues.


Note You need to log in before you can comment on or make changes to this bug.