Change in vdsm[ovirt-3.4]: packaging: add qemu user to cdrom group
sbonazzo at redhat.com
sbonazzo at redhat.com
Fri Apr 11 10:20:30 UTC 2014
Hello Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/26705
to review the following change.
Change subject: packaging: add qemu user to cdrom group
......................................................................
packaging: add qemu user to cdrom group
Allow to boot VMs from host CD-ROM.
Change-Id: I44d842e7b1df073c33284b51185e29ce0d02a0e0
Bug-Url: https://bugzilla.redhat.com/1082028
Signed-off-by: Sandro Bonazzola <sbonazzo at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/26541
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M configure.ac
M debian/vdsm.postinst
M vdsm.spec.in
3 files changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/05/26705/1
diff --git a/configure.ac b/configure.ac
index 71f91bc..8400b0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,6 +118,7 @@
AC_SUBST([METADATAGROUP], [kvm])
AC_SUBST([SNLKUSER], [sanlock])
AC_SUBST([SNLKGROUP], [sanlock])
+AC_SUBST([CDROMGROUP], [cdrom])
# VDSM default paths
AC_SUBST([vdsmdir], ['${datarootdir}/vdsm'])
diff --git a/debian/vdsm.postinst b/debian/vdsm.postinst
index bc10dc6..224e021 100644
--- a/debian/vdsm.postinst
+++ b/debian/vdsm.postinst
@@ -19,10 +19,12 @@
VDSM_USER=vdsm
VDSM_GROUP=kvm
+QEMU_USER=qemu
QEMU_GROUP=kvm
SNLK_GROUP=sanlock
SNLK_USER=sanlock
LIBVIRT_SOCK_GROUP=libvirtd
+CDROM_GROUP=cdrom
INSTALLDIR="install -dDm 0755 -o $VDSM_USER -g $VDSM_GROUP"
@@ -35,6 +37,7 @@
# -s /bin/false -c "sanlock service" "$SNLK_USER"
usermod -a -G "$QEMU_GROUP","$SNLK_GROUP","$LIBVIRT_SOCK_GROUP" "$VDSM_USER"
usermod -a -G "$QEMU_GROUP","$VDSM_GROUP" "$SNLK_USER"
+ usermod -a -G "$CDROM_GROUP" "$QEMU_USER"
start_conf_section="## beginning of configuration section by vdsm"
end_conf_section="## end of configuration section by vdsm"
diff --git a/vdsm.spec.in b/vdsm.spec.in
index aa23aa5..ca9c376 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -6,9 +6,11 @@
# Required users and groups
%global vdsm_user @VDSMUSER@
%global vdsm_group @VDSMGROUP@
+%global qemu_user @QEMUUSER@
%global qemu_group @QEMUGROUP@
%global snlk_group @SNLKGROUP@
%global snlk_user @SNLKUSER@
+%global cdrom_group @CDROMGROUP@
# Fedora official build
%global fedora_koji_build 0
@@ -681,6 +683,7 @@
/usr/sbin/useradd -r -u 36 -g %{vdsm_group} -d /var/lib/vdsm \
-s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user}
/usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user}
+/usr/sbin/usermod -a -G %{cdrom_group} %{qemu_user}
%post
%{_bindir}/vdsm-tool configure --module sanlock --force
--
To view, visit http://gerrit.ovirt.org/26705
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I44d842e7b1df073c33284b51185e29ce0d02a0e0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Sandro Bonazzola <sbonazzo at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
More information about the vdsm-patches
mailing list