Hi Andrey,
I just have seen your http://www.dreyou.org/ovirt/vdsm.patch for
ovirt-3.2. I would like to thank you for your packaging and engineering
work. I'd like to incorporate as much of it into vdsm's upstream so that
it runs properly on any EL6 out-of-the-box.
Could you help me understand some of your changes?
I've posted http://gerrit.ovirt.org/#/c/10893/ which is taken from a
former patchset of yours - is it intentionally missing form the 3.2
version of your patchset?
> From adf7dc96767783ab81993504267c3cfd65b4c1bb Mon Sep 17 00:00:00 2001
> From: Andrey Gordeev
> Date: Fri, 7 Dec 2012 13:12:19 +0400
> Subject: [PATCH 1/2] CentOS 6.2 changes
>
> ---
> build-aux/pkg-version |6 +-
> vds_bootstrap/setup |2 +-
> vdsm.spec.in | 30 ++
> vdsm/configNetwork.py |5 +
> vdsm/storage/misc.py |2 +-
> vdsm/vdsmd.init.in|3 ++-
> 6 files changed, 40 insertions(+), 8 deletions(-)
>
> diff --git a/build-aux/pkg-version b/build-aux/pkg-version
> index 346ad23..9c410ff 100755
> --- a/build-aux/pkg-version
> +++ b/build-aux/pkg-version
> @@ -32,7 +32,11 @@ if test "x$1" = "x--full"; then
> elif test "x$1" = "x--version"; then
> echo $PKG_VERSION | awk "$AWK_VERSION" | tr -cd '[:alnum:].'
> elif test "x$1" = "x--release"; then
> -echo $PKG_VERSION | awk "$AWK_RELEASE" | tr -cd '[:alnum:].'
> +if [ $LOCAL_BUILDID ]; then
> + echo $PKG_VERSION | awk "$AWK_RELEASE" | sed
> "s/git.*$/{$LOCAL_BUILDID}/" | tr -cd '[:alnum:].'
> +else
> + echo $PKG_VERSION | awk "$AWK_RELEASE" | tr -cd '[:alnum:].'
> +fi
> else
> echo "usage: $0 [--full|--version|--release]"
> exit 1
> diff --git a/vds_bootstrap/setup b/vds_bootstrap/setup
> index 01306bd..177e089 100755
> --- a/vds_bootstrap/setup
> +++ b/vds_bootstrap/setup
> @@ -29,7 +29,7 @@ import re
> import tempfile
> from time import strftime
>
> -SUPPORTED_PLATFORMS = [ "RedHatEnterpriseServer", "Fedora" ]
> +SUPPORTED_PLATFORMS = [ "RedHatEnterpriseServer", "Fedora", "CentOS",
> "Scientific", "Oracle" ]
I see no reason not to take this upstream
> HYPERVISOR_PLATFORMS = [ "RedHatEnterpriseVirtualizationHypervisor",
> "RedHatEnterpriseHypervisor", "oVirtNodeHypervisor" ]
> HYPERVISOR_RELEASE_FILE = '/etc/rhev-hypervisor-release'
> REDHAT_RELEASE_FILE = '/etc/redhat-release'
> diff --git a/vdsm.spec.in b/vdsm.spec.in
> index 465d548..a9de23d 100644
> --- a/vdsm.spec.in
> +++ b/vdsm.spec.in
> @@ -102,8 +102,10 @@ Requires: iscsi-initiator-utils >= 6.2.0.872-15
> Requires: device-mapper-multipath >= 0.4.9-52
> Requires: e2fsprogs >= 1.41.12-11
> Requires: kernel >= 2.6.32-279.9.1
> -Requires: sanlock >= 2.3-4, sanlock-python
> -Requires: initscripts >= 9.03.31-2.el6_3.1
> +#Requires: sanlock >= 2.3-4, sanlock-python
> +#Requires: initscripts >= 9.03.31-2.el6_3.1
These requirements are for real bugs. Better include them into your EL6 flavor
or build yourself.
> +Requires: sanlock >= 2.3-1, sanlock-python
> +Requires: initscripts >= 9.03.31-2
> Requires: mom >= 0.3.0
> Requires: selinux-policy-targeted >= 3.7.19-80
> Requires: lvm2 >= 2.02.95-10.el6_3.2
> @@ -431,6 +433,8 @@ install -Dm 0644 vdsm/limits.conf \
> # Install the SysV init scripts
> install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd
> install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg
> +install -Dm 0644 vdsm/vdsm.conf.sample \
> + %{buildroot}%{_sysconfdir}/vdsm/vdsm.conf
Federico, do you recall why don't we ship vdsm.conf on el?
>
> # This is not commonplace, but we want /var/log/core to be a world-writable
> # dropbox for core dumps
> @@ -475,6 +479,15 @@ export LC_ALL=C
> /usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user}
>
> %post
> +if [ -f /etc/sysconfig/modules/softdog.modules ]
> +then
> +cp /etc/sysconfig/modules/softdog.modules
> /etc/vdsm/softdog.modules.prevdsm
> +fi
> +echo -e '#!/bin/sh\nmodprobe softdog\nexit 0' >
> /etc/sysconfig/modules/softdog.modules
> +chmod +x /etc/sysconfig/modules/softdog.modules
> +/sbin/chkconfig wdmd on
> +/sbin/chkconfig sanlock on
> +
Andrey/Federico: why is this hack required?
> %{_bindir}/vdsm-tool sebool-config
> # set the vdsm "secret" password for libvirt
> %{_bindir}/vdsm-tool set-saslpasswd
> @@ -538,6 +551,15 @@ exit 0
> %endif
>
> %postun
> +if [ -f /etc/sysconfig/modules/softdog.modules ]
> +then
> +cp /etc/sysconfig/modules/softdog.modules
> /etc/vdsm/softdog.modules.prevdsm
> +fi
> +echo -e '#!/bin/sh\nmodprobe softdog\nexit 0' >
> /etc/sysconfig/modules/softdog.modules
> +chmod +x /etc/sysconfig/modules/softdog.modules
> +/sbin/chkconfig wdmd on
> +/sbin/chkconfig sanlock on
> +
> %if 0%{?rhel}
> if [ "$1" -ge 1 ]; then
> /sbin/service vdsmd condrestart > /dev/null 2>&1
> @@ -762,9 +784,9 @@ exit 0
> %files python
> %defattr(-, root, root, -)
> %{_bindir}/vdsm-tool
> -%if !0%{?rhel}
> +#%if !0%{?rhel}
> %confi