Bug 1129382

Summary: iso uploader's rpm should provide required user on install if missing
Product: [Retired] oVirt Reporter: Sandro Bonazzola <sbonazzo>
Component: ovirt-iso-uploaderAssignee: Lev Veyde <lveyde>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: medium Docs Contact:
Priority: high    
Version: 3.4CC: abonas, amureini, bugs, didi, ecohen, gklein, iheim, lveyde, pstehlik, rbalakri, sbonazzo, stirabos, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: ovirt-3.5.0_rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1111229 Environment:
Last Closed: 2014-10-17 12:33:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.