Hello Douglas Schilling Landgraf, Eyal Edri, Federico Simoncelli,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/30747

to review the following change.

Change subject: packaging: Branding changes for downstream
......................................................................

packaging: Branding changes for downstream

* On RHEV we should use the specific qemu-*-rhev packages.
  Updated qemu-*-rhev minimal version to match rhel 65 version.

* Adding SupportedRHEVMs for backward compitability with engine 3.0
  Reporting supportedRHEVMs=[3.0] since rhev-m-3.0 does not
  expect the relatively newly-named supportedENGINEs attribute.

* dumpStorageTable.py was moved[1][2] from vdsm-cli to vdsm package.

  As result when updating vdsm without vdsm-cli there is a conflict
  between the old vdsm-cli and the new vdsm packages.

  Our old bootstrap code which is shipped with rhevm-3.0 installs
  packages one by one, failing any bootstrap if such conflict exists.

  The temporary simplest solution is to pull vdsm-cli into dependency
  try of vdsm package, this dependency will be removed in future when
  newer vdsm-bootstrap be distributed to all rhevm machines.

* Disabling creation of gluster packages during vdsm make process
  As described in bz1031707, vdsm 3.3.0 should not provide vdsm-gluster
  rpm

Change-Id: Iae2854badc6b33073aa1d30e014172a3788057b5
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=909870
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1011610
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=870079
Original-Change-Id: I30b554e5614bdda2b02538538b5e6514ae94eaf5
Original-Change-Id: I7e9ab64ff406b91327f7768107c76085d1d40d91
Original-Change-Id: I55cd777071ed0cf19632f867b148c44f1b9f5080
Original-Change-Id: I23995479edc6db6a05bd501d916fa0bbdf29408e
Signed-off-by: Federico Simoncelli <[email protected]>
Signed-off-by: Eyal Edri <[email protected]>
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
Signed-off-by: Dima Kuznetsov <[email protected]>
---
M .gitignore
M configure.ac
M lib/vdsm/constants.py.in
M vds_bootstrap/Makefile.am
R vds_bootstrap/vds_bootstrap.py.in
M vdsm.spec.in
M vdsm_reg/deployUtil.py.in
M vdsm_reg/vdsm-reg.conf.in
8 files changed, 69 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/30747/1

diff --git a/.gitignore b/.gitignore
index 5890806..b3e366b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,6 +50,7 @@
 tests/other.csr
 tests/other.key
 vds_bootstrap/deployUtil.py*
+vds_bootstrap/vds_bootstrap.py
 vdsm-*.tar.gz
 vdsm.spec
 vdsm/dsaversion.py
diff --git a/configure.ac b/configure.ac
index 94e84d1..102f865 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,6 +111,15 @@
 )
 AC_SUBST([LIBVIRT_SERVICE_DEFAULT], ["${with_libvirt_service_default}"])
 
+AC_ARG_WITH(
+    [branding],
+    [AS_HELP_STRING([--with-branding], [build with RHEV branding])],
+    [],
+    [with_branding=no]
+)
+
+AC_SUBST([BRANDING], [${with_branding}])
+
 # Users and groups
 AC_SUBST([VDSMUSER], [vdsm])
 AC_SUBST([VDSMGROUP], [kvm])
@@ -145,12 +154,35 @@
 # VDSM service
 AC_SUBST([SERVICE_STOP_TIMEOUT], ['10'])
 
+# Network
+AS_IF([test "x$with_branding" = "xyes"],
+      [AC_SUBST([VDSMBRIDGE], ['rhevm'])],
+      [AC_SUBST([VDSMBRIDGE], ['ovirtmgmt'])])
+
 # Engine Name
-AC_SUBST([ENGINENAME], ['oVirt Engine'])
+AS_IF([test "x$with_branding" = "xyes"],
+      [AC_SUBST([ENGINENAME], ['RHEV-M'])],
+      [AC_SUBST([ENGINENAME], ['oVirt Engine'])])
 
 # SMBIOS names
-AC_SUBST([SMBIOS_MANUFACTURER], ['oVirt'])
-AC_SUBST([SMBIOS_OSNAME], ['oVirt Node'])
+AS_IF([test "x$with_branding" = "xyes"],
+      [AC_SUBST([SMBIOS_MANUFACTURER], ['Red Hat'])
+       AC_SUBST([SMBIOS_OSNAME], ['RHEV Hypervisor'])],
+      [AC_SUBST([SMBIOS_MANUFACTURER], ['oVirt'])
+       AC_SUBST([SMBIOS_OSNAME], ['oVirt Node'])])
+
+# SASL username
+AS_IF([test "x$with_branding" = "xyes"],
+      [AC_SUBST([SASL_USERNAME], ["vdsm@rhevh"])],
+      [AC_SUBST([SASL_USERNAME], ["vdsm@ovirt"])])
+
+# Package names
+AS_IF([test "x$with_branding" = "xyes"],
+      [AC_SUBST([QEMU_KVM_PKG], ["qemu-kvm-rhev"])
+       AC_SUBST([QEMU_IMG_PKG], ["qemu-img-rhev"])],
+      [AC_SUBST([QEMU_KVM_PKG], ["qemu-kvm"])
+       AC_SUBST([QEMU_IMG_PKG], ["qemu-img-rhev"])])
+
 
 # Checking for pyflakes
 AC_PATH_PROG([PYFLAKES], [pyflakes])
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index ee379d6..554e09a 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -52,7 +52,7 @@
 #
 # The username of SASL authenticating for libvirt connection
 #
-SASL_USERNAME = "vdsm@ovirt"
+SASL_USERNAME = '@SASL_USERNAME@'
 
 # This is the domain version translation list
 # DO NOT CHANGE OLD VALUES ONLY APPEND
diff --git a/vds_bootstrap/Makefile.am b/vds_bootstrap/Makefile.am
index 0eb5df4..1c5c32f 100644
--- a/vds_bootstrap/Makefile.am
+++ b/vds_bootstrap/Makefile.am
@@ -43,13 +43,16 @@
 interface2dir=$(vdsmbootstrapdir)/interface-2
 dist_interface2_SCRIPTS = \
        vds_bootstrap_complete.py \
-       vds_bootstrap.py \
        miniyum.py \
        setup
 
 nodist_interface2_SCRIPTS = \
-       deployUtil.py
+       deployUtil.py \
+       vds_bootstrap.py
 # END-VERSION-2
 
+EXTRA_DIST = \
+        vds_bootstrap.py.in
+
 deployUtil.py.in:      $(top_srcdir)/vdsm_reg/deployUtil.py.in
        ln -s $(top_srcdir)/vdsm_reg/deployUtil.py.in
diff --git a/vds_bootstrap/vds_bootstrap.py b/vds_bootstrap/vds_bootstrap.py.in
similarity index 98%
rename from vds_bootstrap/vds_bootstrap.py
rename to vds_bootstrap/vds_bootstrap.py.in
index 8be934f..c095727 100755
--- a/vds_bootstrap/vds_bootstrap.py
+++ b/vds_bootstrap/vds_bootstrap.py.in
@@ -154,10 +154,10 @@
 
 if rhel6based:
     DEVEL_PACK = ()
-    VDS_PACK = ('qemu-kvm', 'qemu-kvm-tools', VDSM_NAME, VDSM_NAME + '-cli',
-                'libjpeg', 'spice-server', 'pixman', 'seabios', 'qemu-img',
-                'fence-agents', 'libselinux-python', 'sanlock',
-                'sanlock-python')
+    VDS_PACK = ('@QEMU_KVM_PKG@', 'qemu-kvm-tools', VDSM_NAME,
+                VDSM_NAME + '-cli', 'libjpeg', 'spice-server', 'pixman',
+                'seabios', '@QEMU_IMG_PKG@', 'fence-agents',
+                'libselinux-python', 'sanlock', 'sanlock-python')
     # Gluster packages
     GLUSTER_PACK = (VDSM_NAME + '-gluster', )
 else:
diff --git a/vdsm.spec.in b/vdsm.spec.in
index f104ad9..f24a63f 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -12,6 +12,9 @@
 %global snlk_user @SNLKUSER@
 %global cdrom_group @CDROMGROUP@
 
+# Config variables
+%global with_branding @BRANDING@
+
 # Fedora official build
 %global fedora_koji_build 0
 
@@ -32,11 +35,11 @@
 %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d
 %endif
 
-%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6
+%if (0%{?fedora} >= 18 || 0%{?rhel} >= 6) && %{?with_branding} != "yes"
 %global with_gluster 1
 %endif
 
-%if ! 0%{?rhel}
+%if %{?with_branding} == "yes"  || ! 0%{?rhel}
 %global with_vhostmd 1
 %endif
 
@@ -182,8 +185,15 @@
 %else
 Requires: python
 # Update the qemu-kvm requires when block_stream will be included
+%if %{?with_branding} == "yes"
+Requires: qemu-kvm-rhev >= 2:0.12.1.2-2.415.el6_5.3
+Requires: qemu-img-rhev >= 2:0.12.1.2-2.415.el6_5.3
+Requires: libvirt >= 0.10.2-18.el6_4.4
+Requires: iscsi-initiator-utils >= 6.2.0.873-3
+%else
 Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4
 Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4
+%endif
 Requires: device-mapper-multipath >= 0.4.9-52
 Requires: e2fsprogs >= 1.41.12-11
 Requires: fence-agents
@@ -247,6 +257,14 @@
 Requires(post): policycoreutils-python
 Requires(preun): policycoreutils-python
 
+%if %{?with_branding} == "yes"
+# backward compatible with older bootstrap code
+# see bug#870079
+# can be removed when rhevm-3.0 hosts are
+# updated with latest vdsm-bootstrap
+Requires: %{name}-cli = %{version}-%{release}
+%endif
+
 %description
 The VDSM service is required by a Virtualization Manager to manage the
 Linux hosts. VDSM manages and monitors the host's storage, memory and
diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in
index 46d39a5..14f464b 100644
--- a/vdsm_reg/deployUtil.py.in
+++ b/vdsm_reg/deployUtil.py.in
@@ -86,8 +86,8 @@
 SCRIPT_NAME_ADD = "addNetwork"
 SCRIPT_NAME_DEL = "delNetwork"
 IFACE_CONFIG = "/etc/sysconfig/network-scripts/ifcfg-"
-MGT_BRIDGE_NAME = "ovirtmgmt"
-REMOTE_SSH_KEY_FILE = ('/engine.ssh.key.txt',)
+MGT_BRIDGE_NAME = "@VDSMBRIDGE@"
+REMOTE_SSH_KEY_FILE = ('/engine.ssh.key.txt', '/rhevm.ssh.key.txt')
 CORE_DUMP_PATH = '/var/lib/vdsm/core'
 CORE_PATTERN = '/proc/sys/kernel/core_pattern'
 XML_QUOTES = {
diff --git a/vdsm_reg/vdsm-reg.conf.in b/vdsm_reg/vdsm-reg.conf.in
index 114edce..8b21295 100644
--- a/vdsm_reg/vdsm-reg.conf.in
+++ b/vdsm_reg/vdsm-reg.conf.in
@@ -12,7 +12,7 @@
 #The port of the @ENGINENAME@. Allows http or https connections.
 vdc_host_port=443
 #The registrtion uri
-vdc_reg_uri=/OvirtEngineWeb/register
+vdc_reg_uri=/ovirt-engine/services/host-register
 #Upgrade settings
 upgrade_iso_file=@VDSMUPGRADEDIR@/ovirt-node-image.iso
 upgrade_mount_point=/live


-- 
To view, visit http://gerrit.ovirt.org/30747
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae2854badc6b33073aa1d30e014172a3788057b5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Eyal Edri <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to