Bug 1129382 - iso uploader's rpm should provide required user on install if missing
Summary: iso uploader's rpm should provide required user on install if missing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-iso-uploader
Version: 3.4
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 3.5.0
Assignee: Lev Veyde
QA Contact: Jiri Belka
URL:
Whiteboard: integration
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-12 15:30 UTC by Sandro Bonazzola
Modified: 2014-12-15 15:08 UTC (History)
13 users (show)

Fixed In Version: ovirt-3.5.0_rc2
Doc Type: Bug Fix
Doc Text:
Clone Of: 1111229
Environment:
Last Closed: 2014-10-17 12:33:14 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 31064 0 master MERGED ovirt-iso-uploader: Add creation of VDSM user Never
oVirt gerrit 32158 0 ovirt-iso-uploader-3.5 MERGED ovirt-iso-uploader: Add creation of VDSM user Never
oVirt gerrit 32295 0 master MERGED ovirt-iso-uploader: Add creation of KVM group Never
oVirt gerrit 32302 0 ovirt-iso-uploader-3.5 MERGED ovirt-iso-uploader: Add creation of KVM group Never

Description Sandro Bonazzola 2014-08-12 15:30:03 UTC
+++ This bug was initially created as a clone of Bug #1111229 +++

Description of problem:

The uploader requires existence of user 'vdsm' on the machine where its executed.
Its rpm doesn't check/add the required user, so if that user doesn't exist on the machine where it runs  - the uploader fails.(for example - ovirt-engine machine where the engine was built from source and doesn't require user vdsm to exist)
The error at failure:
"ERROR: A user named vdsm with a UID and GID of 36 must be defined on the system to mount the export storage domain on myexport as Read/Write"


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

How reproducible:
when user vdsm doesn't exist on the machine where the uploader runs.


Expected results:
either there's no need to have user 'vdsm' or the uploader adds it upon installation.

Additional info:

--- Additional comment from Sandro Bonazzola on 2014-06-19 10:08:05 EDT ---

Lev, you can find examples for checking user and group existence and code for creating them within the spec file in vdsm and ovirt-engine projects spec files.

--- Additional comment from Sandro Bonazzola on 2014-08-05 07:35:36 EDT ---

Please clone the BZ to iso uploader for tracking it too.

--- Additional comment from Lev Veyde on 2014-08-05 08:32:13 EDT ---

(In reply to Sandro Bonazzola from comment #2)
> Please clone the BZ to iso uploader for tracking it too.

Can't do - there is no ovirt-iso-uploader component in oVirt.
And since the patch is basically the same I think it's OK to track both in one bug.

Comment 1 Jiri Belka 2014-09-16 08:53:04 UTC
ok, tested while installing ovirt-iso-uploader and ovirt-engine-sdk-python as its dep.

# rpm --scripts -q ovirt-iso-uploader-3.5.0-0.1.master.20140904121430.git0bbf129.el6.noarch
preinstall scriptlet (using /bin/sh):
getent group kvm >/dev/null || \
        LC_ALL=C groupadd -g 36 -r kvm
getent passwd vdsm >/dev/null || \
        LC_ALL=C useradd -r -u 36 -g kvm -d / \
                -s /sbin/nologin -c "Node Virtualization Manager" vdsm

Comment 2 Sandro Bonazzola 2014-10-17 12:33:14 UTC
oVirt 3.5 has been released and should include the fix for this issue.


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