[Engine-devel] Things to be done to support Ubuntu hosts

Hi, Recently Ubuntu support is added to VDSM, and .deb binray packages can be downloaded from launchpad.net PPA [1]. Most of the key features such as storage management and VM lifecycle work on Ubuntu. The cross distribution network management patches are upstream as well. One big piece left is making ovirt-host-deploy support Ubuntu, so that we can manage Ubuntu hosts from Engine, thus close the gap on host side. In May 2013 I made some hacks to ovirt-host-deploy and otopi. I made it skipped parts not supported on Ubuntu and configure the environment manually, and successfully added Ubuntu host to Engine [2]. Unfortunately I have no plans to continue on it, but I'd like to make a summary of the things I hacked to help anyone who wants to submit patches in future. I was to add a WIKI page but I found there were not many items, so a mail would be enough. 1. Package management operations Both otopi and ovirt-host-deploy query for dependency packages and install them on demand. The otopi package management just supports yum, we need to add apt-get support. Package names are different in Ubuntu, so I made a list mapping the names. The list in in VDSM source directory, debian/dependencyMap.txt . 2. Network configuration operations ovirt-host-deploy asks VDSM's configNetwork.py to create bridge network. Cross distribution support patches for configNetwork.py are under review. ovirt-host-deploy supports Ubuntu bridge configuration as long as they are merged. [1] https://launchpad.net/~zhshzhou/+archive/vdsm-ubuntu [2] http://www.ovirt.org/images/5/57/Shanghai-VDSM-on-Ubuntu.pdf Here goes the detailed hack patch. The hack was base on v1.0.1, I rebased it to the latest master. The rebased patch are not tested. If you find this email useless, it's actually a good news, which means there is not a lot of work and problems ahead ;-) Hack patch for ovirt-host-deploy.
From 120493a242046d19794ef3da83b32486d372aa39 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 18:02:26 +0800 Subject: [PATCH] Ubuntu Hacks
Change-Id: Ifb4ebc829101c92d06475619b1b5986e87b83d57 Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> --- src/plugins/ovirt-host-deploy/gluster/packages.py | 17 +++++---- src/plugins/ovirt-host-deploy/tune/tuned.py | 3 +- src/plugins/ovirt-host-deploy/vdsm/bridge.py | 45 ++++++++++++----------- src/plugins/ovirt-host-deploy/vdsm/packages.py | 9 +++-- src/plugins/ovirt-host-deploy/vdsm/pki.py | 3 +- src/plugins/ovirt-host-deploy/vdsm/software.py | 2 + src/plugins/ovirt-host-deploy/vdsm/vdsmid.py | 3 +- 7 files changed, 45 insertions(+), 37 deletions(-) diff --git a/src/plugins/ovirt-host-deploy/gluster/packages.py b/src/plugins/ovirt-host-deploy/gluster/packages.py index 1fecfda..eb37744 100644 --- a/src/plugins/ovirt-host-deploy/gluster/packages.py +++ b/src/plugins/ovirt-host-deploy/gluster/packages.py @@ -60,13 +60,13 @@ class Plugin(plugin.PluginBase): ), ) def _validation(self): - if not self.packager.queryPackages(patterns=('vdsm-gluster',)): - raise RuntimeError( - _( - 'Cannot locate gluster packages, ' - 'possible cause is incorrect channels' - ) - ) + # if not self.packager.queryPackages(patterns=('vdsm-gluster',)): + # raise RuntimeError( + # _( + # 'Cannot locate gluster packages, ' + # 'possible cause is incorrect channels' + # ) + # ) self._enabled = True @plugin.event( @@ -74,7 +74,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.installUpdate(('vdsm-gluster',)) + # self.packager.installUpdate(('vdsm-gluster',)) + pass @plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, diff --git a/src/plugins/ovirt-host-deploy/tune/tuned.py b/src/plugins/ovirt-host-deploy/tune/tuned.py index d8e00c5..d0dcea5 100644 --- a/src/plugins/ovirt-host-deploy/tune/tuned.py +++ b/src/plugins/ovirt-host-deploy/tune/tuned.py @@ -70,7 +70,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.installUpdate(('tuned',)) + # self.packager.installUpdate(('tuned',)) + pass @plugin.event( stage=plugin.Stages.STAGE_MISC, diff --git a/src/plugins/ovirt-host-deploy/vdsm/bridge.py b/src/plugins/ovirt-host-deploy/vdsm/bridge.py index 3789d62..64cce40 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/bridge.py +++ b/src/plugins/ovirt-host-deploy/vdsm/bridge.py @@ -595,7 +595,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_INTERNAL_PACKAGES, ) def _internal_packages(self): - self.packager.install(packages=('iproute',)) + # self.packager.install(packages=('iproute',)) + pass @plugin.event( stage=plugin.Stages.STAGE_VALIDATION, @@ -771,27 +772,27 @@ class Plugin(plugin.PluginBase): interface = self._getInterfaceToInstallBasedOnDestination( address=self.environment[odeploycons.VdsmEnv.ENGINE_ADDRESS] ) - parameters = self._rhel_getInterfaceConfigParameters(name=interface) - - # The followin can be executed - # only at node as we won't reach here - # if we are not running on node - if ( - self.environment[odeploycons.VdsmEnv.OVIRT_NODE] and - self._interfaceIsBridge(name=interface) - ): - nic = interface.replace('br', '', 1) - self._removeBridge( - name=interface, - interface=nic, - ) - interface = nic - - self._createBridge( - name=self.environment[odeploycons.VdsmEnv.MANAGEMENT_BRIDGE_NAME], - interface=interface, - parameters=parameters, - ) + # parameters = self._rhel_getInterfaceConfigParameters(name=interface) + + # # The followin can be executed + # # only at node as we won't reach here + # # if we are not running on node + # if ( + # self.environment[odeploycons.VdsmEnv.OVIRT_NODE] and + # self._interfaceIsBridge(name=interface) + # ): + # nic = interface.replace('br', '', 1) + # self._removeBridge( + # name=interface, + # interface=nic, + # ) + # interface = nic + + # self._createBridge( + # name=self.environment[odeploycons.VdsmEnv.MANAGEMENT_BRIDGE_NAME], + # interface=interface, + # parameters=parameters, + # ) self._waitForRoute( host=( diff --git a/src/plugins/ovirt-host-deploy/vdsm/packages.py b/src/plugins/ovirt-host-deploy/vdsm/packages.py index d819caa..b526d4b 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/packages.py +++ b/src/plugins/ovirt-host-deploy/vdsm/packages.py @@ -68,7 +68,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_VALIDATION, ) def _validation(self): - result = self.packager.queryPackages(patterns=('vdsm',)) + # result = self.packager.queryPackages(patterns=('vdsm',)) + result = ({'version': '4.10.3', 'release': '1'},) if not result: raise RuntimeError( _( @@ -106,8 +107,8 @@ class Plugin(plugin.PluginBase): self.services.state('vdsmd', False) if self.services.exists('supervdsmd'): self.services.state('supervdsmd', False) - self.packager.install(('qemu-kvm-tools',)) - self.packager.installUpdate(('vdsm', 'vdsm-cli')) + # self.packager.install(('qemu-kvm-tools',)) + # self.packager.installUpdate(('vdsm', 'vdsm-cli')) @plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, @@ -119,7 +120,7 @@ class Plugin(plugin.PluginBase): self.services.state('libvirt-guests', False) self.services.startup('libvirt-guests', False) - self.services.startup('vdsmd', True) + # self.services.startup('vdsmd', True) if not self.services.supportsDependency: if self.services.exists('libvirtd'): self.services.startup('libvirtd', True) diff --git a/src/plugins/ovirt-host-deploy/vdsm/pki.py b/src/plugins/ovirt-host-deploy/vdsm/pki.py index f374a99..c013527 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/pki.py +++ b/src/plugins/ovirt-host-deploy/vdsm/pki.py @@ -208,7 +208,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.install(('m2crypto',)) + # self.packager.install(('m2crypto',)) + pass @plugin.event( stage=plugin.Stages.STAGE_MISC, diff --git a/src/plugins/ovirt-host-deploy/vdsm/software.py b/src/plugins/ovirt-host-deploy/vdsm/software.py index 2f0ec80..a226816 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/software.py +++ b/src/plugins/ovirt-host-deploy/vdsm/software.py @@ -65,6 +65,8 @@ class Plugin(plugin.PluginBase): version=ver, ) ) + elif dist == 'Ubuntu': + pass else: raise RuntimeError( _('Distribution {distribution} is not supported').format( diff --git a/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py b/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py index 328ad17..465212a 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py +++ b/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py @@ -78,7 +78,8 @@ class Plugin(plugin.PluginBase): ) def _packages(self): if platform.machine() in ('x86_64', 'i686'): - self.packager.install(('dmidecode',)) + # self.packager.install(('dmidecode',)) + pass @plugin.event( stage=plugin.Stages.STAGE_CUSTOMIZATION, -- 1.7.11.7 Hack patch for otopi.
From 3e7022b740f24d8053d3e32c20fa6d492631db80 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 17:55:39 +0800 Subject: [PATCH] Ubuntu Hacks
--- src/plugins/otopi/network/hostname.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/otopi/network/hostname.py b/src/plugins/otopi/network/hostname.py index bb07627..28b4866 100644 --- a/src/plugins/otopi/network/hostname.py +++ b/src/plugins/otopi/network/hostname.py @@ -63,7 +63,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_INTERNAL_PACKAGES, ) def _internal_packages(self): - self.packager.install(packages=['iproute']) + # self.packager.install(packages=['iproute']) + pass @plugin.event( stage=plugin.Stages.STAGE_VALIDATION, -- 1.7.11.7 -- Thanks and best regards! Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397

Hey, Most of the issues you mentioned in slides 11-13 (http://www.ovirt.org/images/5/57/Shanghai-VDSM-on-Ubuntu.pdf) are already solved (if not all of them), If there are more issues to solve can you please open RFE bz on them to close those gaps (like making the services' names configurable)? Thanks Yaniv Bronhaim. ----- Original Message -----
From: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> To: "engine-devel" <engine-devel@ovirt.org> Sent: Thursday, November 14, 2013 8:57:19 AM Subject: [Engine-devel] Things to be done to support Ubuntu hosts
Hi,
Recently Ubuntu support is added to VDSM, and .deb binray packages can be downloaded from launchpad.net PPA [1]. Most of the key features such as storage management and VM lifecycle work on Ubuntu. The cross distribution network management patches are upstream as well. One big piece left is making ovirt-host-deploy support Ubuntu, so that we can manage Ubuntu hosts from Engine, thus close the gap on host side.
In May 2013 I made some hacks to ovirt-host-deploy and otopi. I made it skipped parts not supported on Ubuntu and configure the environment manually, and successfully added Ubuntu host to Engine [2]. Unfortunately I have no plans to continue on it, but I'd like to make a summary of the things I hacked to help anyone who wants to submit patches in future. I was to add a WIKI page but I found there were not many items, so a mail would be enough.
1. Package management operations Both otopi and ovirt-host-deploy query for dependency packages and install them on demand. The otopi package management just supports yum, we need to add apt-get support. Package names are different in Ubuntu, so I made a list mapping the names. The list in in VDSM source directory, debian/dependencyMap.txt .
2. Network configuration operations ovirt-host-deploy asks VDSM's configNetwork.py to create bridge network. Cross distribution support patches for configNetwork.py are under review. ovirt-host-deploy supports Ubuntu bridge configuration as long as they are merged.
[1] https://launchpad.net/~zhshzhou/+archive/vdsm-ubuntu [2] http://www.ovirt.org/images/5/57/Shanghai-VDSM-on-Ubuntu.pdf
Here goes the detailed hack patch. The hack was base on v1.0.1, I rebased it to the latest master. The rebased patch are not tested. If you find this email useless, it's actually a good news, which means there is not a lot of work and problems ahead ;-)
Hack patch for ovirt-host-deploy.
From 120493a242046d19794ef3da83b32486d372aa39 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 18:02:26 +0800 Subject: [PATCH] Ubuntu Hacks
Change-Id: Ifb4ebc829101c92d06475619b1b5986e87b83d57 Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> --- src/plugins/ovirt-host-deploy/gluster/packages.py | 17 +++++---- src/plugins/ovirt-host-deploy/tune/tuned.py | 3 +- src/plugins/ovirt-host-deploy/vdsm/bridge.py | 45 ++++++++++++----------- src/plugins/ovirt-host-deploy/vdsm/packages.py | 9 +++-- src/plugins/ovirt-host-deploy/vdsm/pki.py | 3 +- src/plugins/ovirt-host-deploy/vdsm/software.py | 2 + src/plugins/ovirt-host-deploy/vdsm/vdsmid.py | 3 +- 7 files changed, 45 insertions(+), 37 deletions(-)
diff --git a/src/plugins/ovirt-host-deploy/gluster/packages.py b/src/plugins/ovirt-host-deploy/gluster/packages.py index 1fecfda..eb37744 100644 --- a/src/plugins/ovirt-host-deploy/gluster/packages.py +++ b/src/plugins/ovirt-host-deploy/gluster/packages.py @@ -60,13 +60,13 @@ class Plugin(plugin.PluginBase): ), ) def _validation(self): - if not self.packager.queryPackages(patterns=('vdsm-gluster',)): - raise RuntimeError( - _( - 'Cannot locate gluster packages, ' - 'possible cause is incorrect channels' - ) - ) + # if not self.packager.queryPackages(patterns=('vdsm-gluster',)): + # raise RuntimeError( + # _( + # 'Cannot locate gluster packages, ' + # 'possible cause is incorrect channels' + # ) + # ) self._enabled = True
@plugin.event( @@ -74,7 +74,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.installUpdate(('vdsm-gluster',)) + # self.packager.installUpdate(('vdsm-gluster',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, diff --git a/src/plugins/ovirt-host-deploy/tune/tuned.py b/src/plugins/ovirt-host-deploy/tune/tuned.py index d8e00c5..d0dcea5 100644 --- a/src/plugins/ovirt-host-deploy/tune/tuned.py +++ b/src/plugins/ovirt-host-deploy/tune/tuned.py @@ -70,7 +70,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.installUpdate(('tuned',)) + # self.packager.installUpdate(('tuned',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_MISC, diff --git a/src/plugins/ovirt-host-deploy/vdsm/bridge.py b/src/plugins/ovirt-host-deploy/vdsm/bridge.py index 3789d62..64cce40 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/bridge.py +++ b/src/plugins/ovirt-host-deploy/vdsm/bridge.py @@ -595,7 +595,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_INTERNAL_PACKAGES, ) def _internal_packages(self): - self.packager.install(packages=('iproute',)) + # self.packager.install(packages=('iproute',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_VALIDATION, @@ -771,27 +772,27 @@ class Plugin(plugin.PluginBase): interface = self._getInterfaceToInstallBasedOnDestination( address=self.environment[odeploycons.VdsmEnv.ENGINE_ADDRESS] ) - parameters = self._rhel_getInterfaceConfigParameters(name=interface) - - # The followin can be executed - # only at node as we won't reach here - # if we are not running on node - if ( - self.environment[odeploycons.VdsmEnv.OVIRT_NODE] and - self._interfaceIsBridge(name=interface) - ): - nic = interface.replace('br', '', 1) - self._removeBridge( - name=interface, - interface=nic, - ) - interface = nic - - self._createBridge( - name=self.environment[odeploycons.VdsmEnv.MANAGEMENT_BRIDGE_NAME], - interface=interface, - parameters=parameters, - ) + # parameters = self._rhel_getInterfaceConfigParameters(name=interface) + + # # The followin can be executed + # # only at node as we won't reach here + # # if we are not running on node + # if ( + # self.environment[odeploycons.VdsmEnv.OVIRT_NODE] and + # self._interfaceIsBridge(name=interface) + # ): + # nic = interface.replace('br', '', 1) + # self._removeBridge( + # name=interface, + # interface=nic, + # ) + # interface = nic + + # self._createBridge( + # name=self.environment[odeploycons.VdsmEnv.MANAGEMENT_BRIDGE_NAME], + # interface=interface, + # parameters=parameters, + # )
self._waitForRoute( host=( diff --git a/src/plugins/ovirt-host-deploy/vdsm/packages.py b/src/plugins/ovirt-host-deploy/vdsm/packages.py index d819caa..b526d4b 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/packages.py +++ b/src/plugins/ovirt-host-deploy/vdsm/packages.py @@ -68,7 +68,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_VALIDATION, ) def _validation(self): - result = self.packager.queryPackages(patterns=('vdsm',)) + # result = self.packager.queryPackages(patterns=('vdsm',)) + result = ({'version': '4.10.3', 'release': '1'},) if not result: raise RuntimeError( _( @@ -106,8 +107,8 @@ class Plugin(plugin.PluginBase): self.services.state('vdsmd', False) if self.services.exists('supervdsmd'): self.services.state('supervdsmd', False) - self.packager.install(('qemu-kvm-tools',)) - self.packager.installUpdate(('vdsm', 'vdsm-cli')) + # self.packager.install(('qemu-kvm-tools',)) + # self.packager.installUpdate(('vdsm', 'vdsm-cli'))
@plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, @@ -119,7 +120,7 @@ class Plugin(plugin.PluginBase): self.services.state('libvirt-guests', False) self.services.startup('libvirt-guests', False)
- self.services.startup('vdsmd', True) + # self.services.startup('vdsmd', True) if not self.services.supportsDependency: if self.services.exists('libvirtd'): self.services.startup('libvirtd', True) diff --git a/src/plugins/ovirt-host-deploy/vdsm/pki.py b/src/plugins/ovirt-host-deploy/vdsm/pki.py index f374a99..c013527 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/pki.py +++ b/src/plugins/ovirt-host-deploy/vdsm/pki.py @@ -208,7 +208,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.install(('m2crypto',)) + # self.packager.install(('m2crypto',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_MISC, diff --git a/src/plugins/ovirt-host-deploy/vdsm/software.py b/src/plugins/ovirt-host-deploy/vdsm/software.py index 2f0ec80..a226816 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/software.py +++ b/src/plugins/ovirt-host-deploy/vdsm/software.py @@ -65,6 +65,8 @@ class Plugin(plugin.PluginBase): version=ver, ) ) + elif dist == 'Ubuntu': + pass else: raise RuntimeError( _('Distribution {distribution} is not supported').format( diff --git a/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py b/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py index 328ad17..465212a 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py +++ b/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py @@ -78,7 +78,8 @@ class Plugin(plugin.PluginBase): ) def _packages(self): if platform.machine() in ('x86_64', 'i686'): - self.packager.install(('dmidecode',)) + # self.packager.install(('dmidecode',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_CUSTOMIZATION, -- 1.7.11.7
Hack patch for otopi.
From 3e7022b740f24d8053d3e32c20fa6d492631db80 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 17:55:39 +0800 Subject: [PATCH] Ubuntu Hacks
--- src/plugins/otopi/network/hostname.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/plugins/otopi/network/hostname.py b/src/plugins/otopi/network/hostname.py index bb07627..28b4866 100644 --- a/src/plugins/otopi/network/hostname.py +++ b/src/plugins/otopi/network/hostname.py @@ -63,7 +63,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_INTERNAL_PACKAGES, ) def _internal_packages(self): - self.packager.install(packages=['iproute']) + # self.packager.install(packages=['iproute']) + pass
@plugin.event( stage=plugin.Stages.STAGE_VALIDATION, -- 1.7.11.7
-- Thanks and best regards!
Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

on 2013/11/14 17:41, Yaniv Bronheim wrote:
Hey, Most of the issues you mentioned in slides 11-13 (http://www.ovirt.org/images/5/57/Shanghai-VDSM-on-Ubuntu.pdf) are already solved (if not all of them), If there are more issues to solve can you please open RFE bz on them to close those gaps (like making the services' names configurable)?
Hi, the slide 11-13 are about VDSM on Ubuntu compatibility. I believe almost all the problems are fixed now. The remaining part is ovirt-host-deploy. Indeed standalone VDSM installs and runs on Ubuntu well, but we need otopi and ovirt-host-deploy to make a Ubuntu host under the management of Engine. As I mentioned, the things left are adding apt-get support in otopi and finishing reviewing the upsteam configNetwork.py patches in VDSM. Do you mean I should open RFE bz of otopi and ovirt-host-deploy?
Thanks Yaniv Bronhaim.
----- Original Message -----
From: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> To: "engine-devel" <engine-devel@ovirt.org> Sent: Thursday, November 14, 2013 8:57:19 AM Subject: [Engine-devel] Things to be done to support Ubuntu hosts
Hi,
Recently Ubuntu support is added to VDSM, and .deb binray packages can be downloaded from launchpad.net PPA [1]. Most of the key features such as storage management and VM lifecycle work on Ubuntu. The cross distribution network management patches are upstream as well. One big piece left is making ovirt-host-deploy support Ubuntu, so that we can manage Ubuntu hosts from Engine, thus close the gap on host side.
In May 2013 I made some hacks to ovirt-host-deploy and otopi. I made it skipped parts not supported on Ubuntu and configure the environment manually, and successfully added Ubuntu host to Engine [2]. Unfortunately I have no plans to continue on it, but I'd like to make a summary of the things I hacked to help anyone who wants to submit patches in future. I was to add a WIKI page but I found there were not many items, so a mail would be enough.
1. Package management operations Both otopi and ovirt-host-deploy query for dependency packages and install them on demand. The otopi package management just supports yum, we need to add apt-get support. Package names are different in Ubuntu, so I made a list mapping the names. The list in in VDSM source directory, debian/dependencyMap.txt .
2. Network configuration operations ovirt-host-deploy asks VDSM's configNetwork.py to create bridge network. Cross distribution support patches for configNetwork.py are under review. ovirt-host-deploy supports Ubuntu bridge configuration as long as they are merged.
[1] https://launchpad.net/~zhshzhou/+archive/vdsm-ubuntu [2] http://www.ovirt.org/images/5/57/Shanghai-VDSM-on-Ubuntu.pdf
Here goes the detailed hack patch. The hack was base on v1.0.1, I rebased it to the latest master. The rebased patch are not tested. If you find this email useless, it's actually a good news, which means there is not a lot of work and problems ahead ;-)
Hack patch for ovirt-host-deploy.
From 120493a242046d19794ef3da83b32486d372aa39 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 18:02:26 +0800 Subject: [PATCH] Ubuntu Hacks
Change-Id: Ifb4ebc829101c92d06475619b1b5986e87b83d57 Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> --- src/plugins/ovirt-host-deploy/gluster/packages.py | 17 +++++---- src/plugins/ovirt-host-deploy/tune/tuned.py | 3 +- src/plugins/ovirt-host-deploy/vdsm/bridge.py | 45 ++++++++++++----------- src/plugins/ovirt-host-deploy/vdsm/packages.py | 9 +++-- src/plugins/ovirt-host-deploy/vdsm/pki.py | 3 +- src/plugins/ovirt-host-deploy/vdsm/software.py | 2 + src/plugins/ovirt-host-deploy/vdsm/vdsmid.py | 3 +- 7 files changed, 45 insertions(+), 37 deletions(-)
diff --git a/src/plugins/ovirt-host-deploy/gluster/packages.py b/src/plugins/ovirt-host-deploy/gluster/packages.py index 1fecfda..eb37744 100644 --- a/src/plugins/ovirt-host-deploy/gluster/packages.py +++ b/src/plugins/ovirt-host-deploy/gluster/packages.py @@ -60,13 +60,13 @@ class Plugin(plugin.PluginBase): ), ) def _validation(self): - if not self.packager.queryPackages(patterns=('vdsm-gluster',)): - raise RuntimeError( - _( - 'Cannot locate gluster packages, ' - 'possible cause is incorrect channels' - ) - ) + # if not self.packager.queryPackages(patterns=('vdsm-gluster',)): + # raise RuntimeError( + # _( + # 'Cannot locate gluster packages, ' + # 'possible cause is incorrect channels' + # ) + # ) self._enabled = True
@plugin.event( @@ -74,7 +74,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.installUpdate(('vdsm-gluster',)) + # self.packager.installUpdate(('vdsm-gluster',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, diff --git a/src/plugins/ovirt-host-deploy/tune/tuned.py b/src/plugins/ovirt-host-deploy/tune/tuned.py index d8e00c5..d0dcea5 100644 --- a/src/plugins/ovirt-host-deploy/tune/tuned.py +++ b/src/plugins/ovirt-host-deploy/tune/tuned.py @@ -70,7 +70,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.installUpdate(('tuned',)) + # self.packager.installUpdate(('tuned',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_MISC, diff --git a/src/plugins/ovirt-host-deploy/vdsm/bridge.py b/src/plugins/ovirt-host-deploy/vdsm/bridge.py index 3789d62..64cce40 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/bridge.py +++ b/src/plugins/ovirt-host-deploy/vdsm/bridge.py @@ -595,7 +595,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_INTERNAL_PACKAGES, ) def _internal_packages(self): - self.packager.install(packages=('iproute',)) + # self.packager.install(packages=('iproute',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_VALIDATION, @@ -771,27 +772,27 @@ class Plugin(plugin.PluginBase): interface = self._getInterfaceToInstallBasedOnDestination( address=self.environment[odeploycons.VdsmEnv.ENGINE_ADDRESS] ) - parameters = self._rhel_getInterfaceConfigParameters(name=interface) - - # The followin can be executed - # only at node as we won't reach here - # if we are not running on node - if ( - self.environment[odeploycons.VdsmEnv.OVIRT_NODE] and - self._interfaceIsBridge(name=interface) - ): - nic = interface.replace('br', '', 1) - self._removeBridge( - name=interface, - interface=nic, - ) - interface = nic - - self._createBridge( - name=self.environment[odeploycons.VdsmEnv.MANAGEMENT_BRIDGE_NAME], - interface=interface, - parameters=parameters, - ) + # parameters = self._rhel_getInterfaceConfigParameters(name=interface) + + # # The followin can be executed + # # only at node as we won't reach here + # # if we are not running on node + # if ( + # self.environment[odeploycons.VdsmEnv.OVIRT_NODE] and + # self._interfaceIsBridge(name=interface) + # ): + # nic = interface.replace('br', '', 1) + # self._removeBridge( + # name=interface, + # interface=nic, + # ) + # interface = nic + + # self._createBridge( + # name=self.environment[odeploycons.VdsmEnv.MANAGEMENT_BRIDGE_NAME], + # interface=interface, + # parameters=parameters, + # )
self._waitForRoute( host=( diff --git a/src/plugins/ovirt-host-deploy/vdsm/packages.py b/src/plugins/ovirt-host-deploy/vdsm/packages.py index d819caa..b526d4b 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/packages.py +++ b/src/plugins/ovirt-host-deploy/vdsm/packages.py @@ -68,7 +68,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_VALIDATION, ) def _validation(self): - result = self.packager.queryPackages(patterns=('vdsm',)) + # result = self.packager.queryPackages(patterns=('vdsm',)) + result = ({'version': '4.10.3', 'release': '1'},) if not result: raise RuntimeError( _( @@ -106,8 +107,8 @@ class Plugin(plugin.PluginBase): self.services.state('vdsmd', False) if self.services.exists('supervdsmd'): self.services.state('supervdsmd', False) - self.packager.install(('qemu-kvm-tools',)) - self.packager.installUpdate(('vdsm', 'vdsm-cli')) + # self.packager.install(('qemu-kvm-tools',)) + # self.packager.installUpdate(('vdsm', 'vdsm-cli'))
@plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, @@ -119,7 +120,7 @@ class Plugin(plugin.PluginBase): self.services.state('libvirt-guests', False) self.services.startup('libvirt-guests', False)
- self.services.startup('vdsmd', True) + # self.services.startup('vdsmd', True) if not self.services.supportsDependency: if self.services.exists('libvirtd'): self.services.startup('libvirtd', True) diff --git a/src/plugins/ovirt-host-deploy/vdsm/pki.py b/src/plugins/ovirt-host-deploy/vdsm/pki.py index f374a99..c013527 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/pki.py +++ b/src/plugins/ovirt-host-deploy/vdsm/pki.py @@ -208,7 +208,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.install(('m2crypto',)) + # self.packager.install(('m2crypto',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_MISC, diff --git a/src/plugins/ovirt-host-deploy/vdsm/software.py b/src/plugins/ovirt-host-deploy/vdsm/software.py index 2f0ec80..a226816 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/software.py +++ b/src/plugins/ovirt-host-deploy/vdsm/software.py @@ -65,6 +65,8 @@ class Plugin(plugin.PluginBase): version=ver, ) ) + elif dist == 'Ubuntu': + pass else: raise RuntimeError( _('Distribution {distribution} is not supported').format( diff --git a/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py b/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py index 328ad17..465212a 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py +++ b/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py @@ -78,7 +78,8 @@ class Plugin(plugin.PluginBase): ) def _packages(self): if platform.machine() in ('x86_64', 'i686'): - self.packager.install(('dmidecode',)) + # self.packager.install(('dmidecode',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_CUSTOMIZATION, -- 1.7.11.7
Hack patch for otopi.
From 3e7022b740f24d8053d3e32c20fa6d492631db80 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 17:55:39 +0800 Subject: [PATCH] Ubuntu Hacks
--- src/plugins/otopi/network/hostname.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/plugins/otopi/network/hostname.py b/src/plugins/otopi/network/hostname.py index bb07627..28b4866 100644 --- a/src/plugins/otopi/network/hostname.py +++ b/src/plugins/otopi/network/hostname.py @@ -63,7 +63,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_INTERNAL_PACKAGES, ) def _internal_packages(self): - self.packager.install(packages=['iproute']) + # self.packager.install(packages=['iproute']) + pass
@plugin.event( stage=plugin.Stages.STAGE_VALIDATION, -- 1.7.11.7
-- Thanks and best regards!
Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
-- Thanks and best regards! Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397

----- Original Message -----
From: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> To: "engine-devel" <engine-devel@ovirt.org> Cc: "Itamar Heim" <iheim@redhat.com>, "Alon Bar-Lev" <alonbl@redhat.com> Sent: Thursday, November 14, 2013 8:57:19 AM Subject: Things to be done to support Ubuntu hosts
Hi,
Recently Ubuntu support is added to VDSM, and .deb binray packages can be downloaded from launchpad.net PPA [1]. Most of the key features such as storage management and VM lifecycle work on Ubuntu. The cross distribution network management patches are upstream as well. One big piece left is making ovirt-host-deploy support Ubuntu, so that we can manage Ubuntu hosts from Engine, thus close the gap on host side.
In May 2013 I made some hacks to ovirt-host-deploy and otopi. I made it skipped parts not supported on Ubuntu and configure the environment manually, and successfully added Ubuntu host to Engine [2]. Unfortunately I have no plans to continue on it, but I'd like to make a summary of the things I hacked to help anyone who wants to submit patches in future. I was to add a WIKI page but I found there were not many items, so a mail would be enough.
1. Package management operations Both otopi and ovirt-host-deploy query for dependency packages and install them on demand. The otopi package management just supports yum, we need to add apt-get support. Package names are different in Ubuntu, so I made a list mapping the names. The list in in VDSM source directory, debian/dependencyMap.txt .
Please try putting the following file on host: /etc/ovirt-host-deploy.conf.d/10-ubuntu.conf --- ODEPLOY/offlinePackager=bool:True --- This will replace the disable section of packaging in your patch. It will make host-deploy not to install any package and assume all is pre-installed.
2. Network configuration operations ovirt-host-deploy asks VDSM's configNetwork.py to create bridge network. Cross distribution support patches for configNetwork.py are under review. ovirt-host-deploy supports Ubuntu bridge configuration as long as they are merged.
This is not happening any more at 3.3, so no need to change anything. I think that in 3.3 with the above offline packaging use, you can use vanilla otopi/host-deploy. Regards, Alon Bar-Lev
[1] https://launchpad.net/~zhshzhou/+archive/vdsm-ubuntu [2] http://www.ovirt.org/images/5/57/Shanghai-VDSM-on-Ubuntu.pdf
Here goes the detailed hack patch. The hack was base on v1.0.1, I rebased it to the latest master. The rebased patch are not tested. If you find this email useless, it's actually a good news, which means there is not a lot of work and problems ahead ;-)
Hack patch for ovirt-host-deploy.
From 120493a242046d19794ef3da83b32486d372aa39 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 18:02:26 +0800 Subject: [PATCH] Ubuntu Hacks
Change-Id: Ifb4ebc829101c92d06475619b1b5986e87b83d57 Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> --- src/plugins/ovirt-host-deploy/gluster/packages.py | 17 +++++---- src/plugins/ovirt-host-deploy/tune/tuned.py | 3 +- src/plugins/ovirt-host-deploy/vdsm/bridge.py | 45 ++++++++++++----------- src/plugins/ovirt-host-deploy/vdsm/packages.py | 9 +++-- src/plugins/ovirt-host-deploy/vdsm/pki.py | 3 +- src/plugins/ovirt-host-deploy/vdsm/software.py | 2 + src/plugins/ovirt-host-deploy/vdsm/vdsmid.py | 3 +- 7 files changed, 45 insertions(+), 37 deletions(-)
diff --git a/src/plugins/ovirt-host-deploy/gluster/packages.py b/src/plugins/ovirt-host-deploy/gluster/packages.py index 1fecfda..eb37744 100644 --- a/src/plugins/ovirt-host-deploy/gluster/packages.py +++ b/src/plugins/ovirt-host-deploy/gluster/packages.py @@ -60,13 +60,13 @@ class Plugin(plugin.PluginBase): ), ) def _validation(self): - if not self.packager.queryPackages(patterns=('vdsm-gluster',)): - raise RuntimeError( - _( - 'Cannot locate gluster packages, ' - 'possible cause is incorrect channels' - ) - ) + # if not self.packager.queryPackages(patterns=('vdsm-gluster',)): + # raise RuntimeError( + # _( + # 'Cannot locate gluster packages, ' + # 'possible cause is incorrect channels' + # ) + # ) self._enabled = True
@plugin.event( @@ -74,7 +74,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.installUpdate(('vdsm-gluster',)) + # self.packager.installUpdate(('vdsm-gluster',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, diff --git a/src/plugins/ovirt-host-deploy/tune/tuned.py b/src/plugins/ovirt-host-deploy/tune/tuned.py index d8e00c5..d0dcea5 100644 --- a/src/plugins/ovirt-host-deploy/tune/tuned.py +++ b/src/plugins/ovirt-host-deploy/tune/tuned.py @@ -70,7 +70,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.installUpdate(('tuned',)) + # self.packager.installUpdate(('tuned',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_MISC, diff --git a/src/plugins/ovirt-host-deploy/vdsm/bridge.py b/src/plugins/ovirt-host-deploy/vdsm/bridge.py index 3789d62..64cce40 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/bridge.py +++ b/src/plugins/ovirt-host-deploy/vdsm/bridge.py @@ -595,7 +595,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_INTERNAL_PACKAGES, ) def _internal_packages(self): - self.packager.install(packages=('iproute',)) + # self.packager.install(packages=('iproute',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_VALIDATION, @@ -771,27 +772,27 @@ class Plugin(plugin.PluginBase): interface = self._getInterfaceToInstallBasedOnDestination( address=self.environment[odeploycons.VdsmEnv.ENGINE_ADDRESS] ) - parameters = self._rhel_getInterfaceConfigParameters(name=interface) - - # The followin can be executed - # only at node as we won't reach here - # if we are not running on node - if ( - self.environment[odeploycons.VdsmEnv.OVIRT_NODE] and - self._interfaceIsBridge(name=interface) - ): - nic = interface.replace('br', '', 1) - self._removeBridge( - name=interface, - interface=nic, - ) - interface = nic - - self._createBridge( - name=self.environment[odeploycons.VdsmEnv.MANAGEMENT_BRIDGE_NAME], - interface=interface, - parameters=parameters, - ) + # parameters = self._rhel_getInterfaceConfigParameters(name=interface) + + # # The followin can be executed + # # only at node as we won't reach here + # # if we are not running on node + # if ( + # self.environment[odeploycons.VdsmEnv.OVIRT_NODE] and + # self._interfaceIsBridge(name=interface) + # ): + # nic = interface.replace('br', '', 1) + # self._removeBridge( + # name=interface, + # interface=nic, + # ) + # interface = nic + + # self._createBridge( + # name=self.environment[odeploycons.VdsmEnv.MANAGEMENT_BRIDGE_NAME], + # interface=interface, + # parameters=parameters, + # )
self._waitForRoute( host=( diff --git a/src/plugins/ovirt-host-deploy/vdsm/packages.py b/src/plugins/ovirt-host-deploy/vdsm/packages.py index d819caa..b526d4b 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/packages.py +++ b/src/plugins/ovirt-host-deploy/vdsm/packages.py @@ -68,7 +68,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_VALIDATION, ) def _validation(self): - result = self.packager.queryPackages(patterns=('vdsm',)) + # result = self.packager.queryPackages(patterns=('vdsm',)) + result = ({'version': '4.10.3', 'release': '1'},) if not result: raise RuntimeError( _( @@ -106,8 +107,8 @@ class Plugin(plugin.PluginBase): self.services.state('vdsmd', False) if self.services.exists('supervdsmd'): self.services.state('supervdsmd', False) - self.packager.install(('qemu-kvm-tools',)) - self.packager.installUpdate(('vdsm', 'vdsm-cli')) + # self.packager.install(('qemu-kvm-tools',)) + # self.packager.installUpdate(('vdsm', 'vdsm-cli'))
@plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, @@ -119,7 +120,7 @@ class Plugin(plugin.PluginBase): self.services.state('libvirt-guests', False) self.services.startup('libvirt-guests', False)
- self.services.startup('vdsmd', True) + # self.services.startup('vdsmd', True) if not self.services.supportsDependency: if self.services.exists('libvirtd'): self.services.startup('libvirtd', True) diff --git a/src/plugins/ovirt-host-deploy/vdsm/pki.py b/src/plugins/ovirt-host-deploy/vdsm/pki.py index f374a99..c013527 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/pki.py +++ b/src/plugins/ovirt-host-deploy/vdsm/pki.py @@ -208,7 +208,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.install(('m2crypto',)) + # self.packager.install(('m2crypto',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_MISC, diff --git a/src/plugins/ovirt-host-deploy/vdsm/software.py b/src/plugins/ovirt-host-deploy/vdsm/software.py index 2f0ec80..a226816 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/software.py +++ b/src/plugins/ovirt-host-deploy/vdsm/software.py @@ -65,6 +65,8 @@ class Plugin(plugin.PluginBase): version=ver, ) ) + elif dist == 'Ubuntu': + pass else: raise RuntimeError( _('Distribution {distribution} is not supported').format( diff --git a/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py b/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py index 328ad17..465212a 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py +++ b/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py @@ -78,7 +78,8 @@ class Plugin(plugin.PluginBase): ) def _packages(self): if platform.machine() in ('x86_64', 'i686'): - self.packager.install(('dmidecode',)) + # self.packager.install(('dmidecode',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_CUSTOMIZATION, -- 1.7.11.7
Hack patch for otopi.
From 3e7022b740f24d8053d3e32c20fa6d492631db80 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 17:55:39 +0800 Subject: [PATCH] Ubuntu Hacks
--- src/plugins/otopi/network/hostname.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/plugins/otopi/network/hostname.py b/src/plugins/otopi/network/hostname.py index bb07627..28b4866 100644 --- a/src/plugins/otopi/network/hostname.py +++ b/src/plugins/otopi/network/hostname.py @@ -63,7 +63,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_INTERNAL_PACKAGES, ) def _internal_packages(self): - self.packager.install(packages=['iproute']) + # self.packager.install(packages=['iproute']) + pass
@plugin.event( stage=plugin.Stages.STAGE_VALIDATION, -- 1.7.11.7
-- Thanks and best regards!
Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397

on 2013/11/16 02:52, Alon Bar-Lev wrote:
----- Original Message -----
From: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> To: "engine-devel" <engine-devel@ovirt.org> Cc: "Itamar Heim" <iheim@redhat.com>, "Alon Bar-Lev" <alonbl@redhat.com> Sent: Thursday, November 14, 2013 8:57:19 AM Subject: Things to be done to support Ubuntu hosts
Hi,
Recently Ubuntu support is added to VDSM, and .deb binray packages can be downloaded from launchpad.net PPA [1]. Most of the key features such as storage management and VM lifecycle work on Ubuntu. The cross distribution network management patches are upstream as well. One big piece left is making ovirt-host-deploy support Ubuntu, so that we can manage Ubuntu hosts from Engine, thus close the gap on host side.
In May 2013 I made some hacks to ovirt-host-deploy and otopi. I made it skipped parts not supported on Ubuntu and configure the environment manually, and successfully added Ubuntu host to Engine [2]. Unfortunately I have no plans to continue on it, but I'd like to make a summary of the things I hacked to help anyone who wants to submit patches in future. I was to add a WIKI page but I found there were not many items, so a mail would be enough.
1. Package management operations Both otopi and ovirt-host-deploy query for dependency packages and install them on demand. The otopi package management just supports yum, we need to add apt-get support. Package names are different in Ubuntu, so I made a list mapping the names. The list in in VDSM source directory, debian/dependencyMap.txt .
Please try putting the following file on host:
/etc/ovirt-host-deploy.conf.d/10-ubuntu.conf --- ODEPLOY/offlinePackager=bool:True ---
This will replace the disable section of packaging in your patch. It will make host-deploy not to install any package and assume all is pre-installed.
Great! Do we have plan to implement apt-get support in ovirt-host-deploy?
2. Network configuration operations ovirt-host-deploy asks VDSM's configNetwork.py to create bridge network. Cross distribution support patches for configNetwork.py are under review. ovirt-host-deploy supports Ubuntu bridge configuration as long as they are merged.
This is not happening any more at 3.3, so no need to change anything.
I think that in 3.3 with the above offline packaging use, you can use vanilla otopi/host-deploy.
Regards, Alon Bar-Lev
[1] https://launchpad.net/~zhshzhou/+archive/vdsm-ubuntu [2] http://www.ovirt.org/images/5/57/Shanghai-VDSM-on-Ubuntu.pdf
Here goes the detailed hack patch. The hack was base on v1.0.1, I rebased it to the latest master. The rebased patch are not tested. If you find this email useless, it's actually a good news, which means there is not a lot of work and problems ahead ;-)
Hack patch for ovirt-host-deploy.
From 120493a242046d19794ef3da83b32486d372aa39 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 18:02:26 +0800 Subject: [PATCH] Ubuntu Hacks
Change-Id: Ifb4ebc829101c92d06475619b1b5986e87b83d57 Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> --- src/plugins/ovirt-host-deploy/gluster/packages.py | 17 +++++---- src/plugins/ovirt-host-deploy/tune/tuned.py | 3 +- src/plugins/ovirt-host-deploy/vdsm/bridge.py | 45 ++++++++++++----------- src/plugins/ovirt-host-deploy/vdsm/packages.py | 9 +++-- src/plugins/ovirt-host-deploy/vdsm/pki.py | 3 +- src/plugins/ovirt-host-deploy/vdsm/software.py | 2 + src/plugins/ovirt-host-deploy/vdsm/vdsmid.py | 3 +- 7 files changed, 45 insertions(+), 37 deletions(-)
diff --git a/src/plugins/ovirt-host-deploy/gluster/packages.py b/src/plugins/ovirt-host-deploy/gluster/packages.py index 1fecfda..eb37744 100644 --- a/src/plugins/ovirt-host-deploy/gluster/packages.py +++ b/src/plugins/ovirt-host-deploy/gluster/packages.py @@ -60,13 +60,13 @@ class Plugin(plugin.PluginBase): ), ) def _validation(self): - if not self.packager.queryPackages(patterns=('vdsm-gluster',)): - raise RuntimeError( - _( - 'Cannot locate gluster packages, ' - 'possible cause is incorrect channels' - ) - ) + # if not self.packager.queryPackages(patterns=('vdsm-gluster',)): + # raise RuntimeError( + # _( + # 'Cannot locate gluster packages, ' + # 'possible cause is incorrect channels' + # ) + # ) self._enabled = True
@plugin.event( @@ -74,7 +74,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.installUpdate(('vdsm-gluster',)) + # self.packager.installUpdate(('vdsm-gluster',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, diff --git a/src/plugins/ovirt-host-deploy/tune/tuned.py b/src/plugins/ovirt-host-deploy/tune/tuned.py index d8e00c5..d0dcea5 100644 --- a/src/plugins/ovirt-host-deploy/tune/tuned.py +++ b/src/plugins/ovirt-host-deploy/tune/tuned.py @@ -70,7 +70,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.installUpdate(('tuned',)) + # self.packager.installUpdate(('tuned',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_MISC, diff --git a/src/plugins/ovirt-host-deploy/vdsm/bridge.py b/src/plugins/ovirt-host-deploy/vdsm/bridge.py index 3789d62..64cce40 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/bridge.py +++ b/src/plugins/ovirt-host-deploy/vdsm/bridge.py @@ -595,7 +595,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_INTERNAL_PACKAGES, ) def _internal_packages(self): - self.packager.install(packages=('iproute',)) + # self.packager.install(packages=('iproute',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_VALIDATION, @@ -771,27 +772,27 @@ class Plugin(plugin.PluginBase): interface = self._getInterfaceToInstallBasedOnDestination( address=self.environment[odeploycons.VdsmEnv.ENGINE_ADDRESS] ) - parameters = self._rhel_getInterfaceConfigParameters(name=interface) - - # The followin can be executed - # only at node as we won't reach here - # if we are not running on node - if ( - self.environment[odeploycons.VdsmEnv.OVIRT_NODE] and - self._interfaceIsBridge(name=interface) - ): - nic = interface.replace('br', '', 1) - self._removeBridge( - name=interface, - interface=nic, - ) - interface = nic - - self._createBridge( - name=self.environment[odeploycons.VdsmEnv.MANAGEMENT_BRIDGE_NAME], - interface=interface, - parameters=parameters, - ) + # parameters = self._rhel_getInterfaceConfigParameters(name=interface) + + # # The followin can be executed + # # only at node as we won't reach here + # # if we are not running on node + # if ( + # self.environment[odeploycons.VdsmEnv.OVIRT_NODE] and + # self._interfaceIsBridge(name=interface) + # ): + # nic = interface.replace('br', '', 1) + # self._removeBridge( + # name=interface, + # interface=nic, + # ) + # interface = nic + + # self._createBridge( + # name=self.environment[odeploycons.VdsmEnv.MANAGEMENT_BRIDGE_NAME], + # interface=interface, + # parameters=parameters, + # )
self._waitForRoute( host=( diff --git a/src/plugins/ovirt-host-deploy/vdsm/packages.py b/src/plugins/ovirt-host-deploy/vdsm/packages.py index d819caa..b526d4b 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/packages.py +++ b/src/plugins/ovirt-host-deploy/vdsm/packages.py @@ -68,7 +68,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_VALIDATION, ) def _validation(self): - result = self.packager.queryPackages(patterns=('vdsm',)) + # result = self.packager.queryPackages(patterns=('vdsm',)) + result = ({'version': '4.10.3', 'release': '1'},) if not result: raise RuntimeError( _( @@ -106,8 +107,8 @@ class Plugin(plugin.PluginBase): self.services.state('vdsmd', False) if self.services.exists('supervdsmd'): self.services.state('supervdsmd', False) - self.packager.install(('qemu-kvm-tools',)) - self.packager.installUpdate(('vdsm', 'vdsm-cli')) + # self.packager.install(('qemu-kvm-tools',)) + # self.packager.installUpdate(('vdsm', 'vdsm-cli'))
@plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, @@ -119,7 +120,7 @@ class Plugin(plugin.PluginBase): self.services.state('libvirt-guests', False) self.services.startup('libvirt-guests', False)
- self.services.startup('vdsmd', True) + # self.services.startup('vdsmd', True) if not self.services.supportsDependency: if self.services.exists('libvirtd'): self.services.startup('libvirtd', True) diff --git a/src/plugins/ovirt-host-deploy/vdsm/pki.py b/src/plugins/ovirt-host-deploy/vdsm/pki.py index f374a99..c013527 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/pki.py +++ b/src/plugins/ovirt-host-deploy/vdsm/pki.py @@ -208,7 +208,8 @@ class Plugin(plugin.PluginBase): condition=lambda self: self._enabled, ) def _packages(self): - self.packager.install(('m2crypto',)) + # self.packager.install(('m2crypto',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_MISC, diff --git a/src/plugins/ovirt-host-deploy/vdsm/software.py b/src/plugins/ovirt-host-deploy/vdsm/software.py index 2f0ec80..a226816 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/software.py +++ b/src/plugins/ovirt-host-deploy/vdsm/software.py @@ -65,6 +65,8 @@ class Plugin(plugin.PluginBase): version=ver, ) ) + elif dist == 'Ubuntu': + pass else: raise RuntimeError( _('Distribution {distribution} is not supported').format( diff --git a/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py b/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py index 328ad17..465212a 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py +++ b/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py @@ -78,7 +78,8 @@ class Plugin(plugin.PluginBase): ) def _packages(self): if platform.machine() in ('x86_64', 'i686'): - self.packager.install(('dmidecode',)) + # self.packager.install(('dmidecode',)) + pass
@plugin.event( stage=plugin.Stages.STAGE_CUSTOMIZATION, -- 1.7.11.7
Hack patch for otopi.
From 3e7022b740f24d8053d3e32c20fa6d492631db80 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 17:55:39 +0800 Subject: [PATCH] Ubuntu Hacks
--- src/plugins/otopi/network/hostname.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/plugins/otopi/network/hostname.py b/src/plugins/otopi/network/hostname.py index bb07627..28b4866 100644 --- a/src/plugins/otopi/network/hostname.py +++ b/src/plugins/otopi/network/hostname.py @@ -63,7 +63,8 @@ class Plugin(plugin.PluginBase): stage=plugin.Stages.STAGE_INTERNAL_PACKAGES, ) def _internal_packages(self): - self.packager.install(packages=['iproute']) + # self.packager.install(packages=['iproute']) + pass
@plugin.event( stage=plugin.Stages.STAGE_VALIDATION, -- 1.7.11.7
-- Thanks and best regards!
Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397
-- Thanks and best regards! Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397

----- Original Message -----
From: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> To: "Alon Bar-Lev" <alonbl@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org> Sent: Wednesday, November 20, 2013 3:53:17 AM Subject: Re: Things to be done to support Ubuntu hosts
on 2013/11/16 02:52, Alon Bar-Lev wrote:
----- Original Message -----
From: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> To: "engine-devel" <engine-devel@ovirt.org> Cc: "Itamar Heim" <iheim@redhat.com>, "Alon Bar-Lev" <alonbl@redhat.com> Sent: Thursday, November 14, 2013 8:57:19 AM Subject: Things to be done to support Ubuntu hosts
Hi,
Recently Ubuntu support is added to VDSM, and .deb binray packages can be downloaded from launchpad.net PPA [1]. Most of the key features such as storage management and VM lifecycle work on Ubuntu. The cross distribution network management patches are upstream as well. One big piece left is making ovirt-host-deploy support Ubuntu, so that we can manage Ubuntu hosts from Engine, thus close the gap on host side.
In May 2013 I made some hacks to ovirt-host-deploy and otopi. I made it skipped parts not supported on Ubuntu and configure the environment manually, and successfully added Ubuntu host to Engine [2]. Unfortunately I have no plans to continue on it, but I'd like to make a summary of the things I hacked to help anyone who wants to submit patches in future. I was to add a WIKI page but I found there were not many items, so a mail would be enough.
1. Package management operations Both otopi and ovirt-host-deploy query for dependency packages and install them on demand. The otopi package management just supports yum, we need to add apt-get support. Package names are different in Ubuntu, so I made a list mapping the names. The list in in VDSM source directory, debian/dependencyMap.txt .
Please try putting the following file on host:
/etc/ovirt-host-deploy.conf.d/10-ubuntu.conf --- ODEPLOY/offlinePackager=bool:True ---
This will replace the disable section of packaging in your patch. It will make host-deploy not to install any package and assume all is pre-installed.
Great! Do we have plan to implement apt-get support in ovirt-host-deploy?
Plans - yes. Not sure when exactly. I prefer first to handle the ovirt-engine porting to ubuntu at first opportunity.
2. Network configuration operations ovirt-host-deploy asks VDSM's configNetwork.py to create bridge network. Cross distribution support patches for configNetwork.py are under review. ovirt-host-deploy supports Ubuntu bridge configuration as long as they are merged.
This is not happening any more at 3.3, so no need to change anything.
I think that in 3.3 with the above offline packaging use, you can use vanilla otopi/host-deploy.
Regards, Alon Bar-Lev
[1] https://launchpad.net/~zhshzhou/+archive/vdsm-ubuntu [2] http://www.ovirt.org/images/5/57/Shanghai-VDSM-on-Ubuntu.pdf
Here goes the detailed hack patch. The hack was base on v1.0.1, I rebased it to the latest master. The rebased patch are not tested. If you find this email useless, it's actually a good news, which means there is not a lot of work and problems ahead ;-)
Hack patch for ovirt-host-deploy.
From 120493a242046d19794ef3da83b32486d372aa39 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 18:02:26 +0800 Subject: [PATCH] Ubuntu Hacks

Would it make sense to leverage packagekit to abstract away the distro packaging differences? http://www.packagekit.org/pk-using.html ----- Original Message -----
From: "Alon Bar-Lev" <alonbl@redhat.com> To: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> Cc: "engine-devel" <engine-devel@ovirt.org> Sent: Wednesday, November 20, 2013 9:53:29 AM Subject: Re: [Engine-devel] Things to be done to support Ubuntu hosts
----- Original Message -----
From: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> To: "Alon Bar-Lev" <alonbl@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org> Sent: Wednesday, November 20, 2013 3:53:17 AM Subject: Re: Things to be done to support Ubuntu hosts
on 2013/11/16 02:52, Alon Bar-Lev wrote:
----- Original Message -----
From: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> To: "engine-devel" <engine-devel@ovirt.org> Cc: "Itamar Heim" <iheim@redhat.com>, "Alon Bar-Lev" <alonbl@redhat.com> Sent: Thursday, November 14, 2013 8:57:19 AM Subject: Things to be done to support Ubuntu hosts
Hi,
Recently Ubuntu support is added to VDSM, and .deb binray packages can be downloaded from launchpad.net PPA [1]. Most of the key features such as storage management and VM lifecycle work on Ubuntu. The cross distribution network management patches are upstream as well. One big piece left is making ovirt-host-deploy support Ubuntu, so that we can manage Ubuntu hosts from Engine, thus close the gap on host side.
In May 2013 I made some hacks to ovirt-host-deploy and otopi. I made it skipped parts not supported on Ubuntu and configure the environment manually, and successfully added Ubuntu host to Engine [2]. Unfortunately I have no plans to continue on it, but I'd like to make a summary of the things I hacked to help anyone who wants to submit patches in future. I was to add a WIKI page but I found there were not many items, so a mail would be enough.
1. Package management operations Both otopi and ovirt-host-deploy query for dependency packages and install them on demand. The otopi package management just supports yum, we need to add apt-get support. Package names are different in Ubuntu, so I made a list mapping the names. The list in in VDSM source directory, debian/dependencyMap.txt .
Please try putting the following file on host:
/etc/ovirt-host-deploy.conf.d/10-ubuntu.conf --- ODEPLOY/offlinePackager=bool:True ---
This will replace the disable section of packaging in your patch. It will make host-deploy not to install any package and assume all is pre-installed.
Great! Do we have plan to implement apt-get support in ovirt-host-deploy?
Plans - yes. Not sure when exactly. I prefer first to handle the ovirt-engine porting to ubuntu at first opportunity.
2. Network configuration operations ovirt-host-deploy asks VDSM's configNetwork.py to create bridge network. Cross distribution support patches for configNetwork.py are under review. ovirt-host-deploy supports Ubuntu bridge configuration as long as they are merged.
This is not happening any more at 3.3, so no need to change anything.
I think that in 3.3 with the above offline packaging use, you can use vanilla otopi/host-deploy.
Regards, Alon Bar-Lev
[1] https://launchpad.net/~zhshzhou/+archive/vdsm-ubuntu [2] http://www.ovirt.org/images/5/57/Shanghai-VDSM-on-Ubuntu.pdf
Here goes the detailed hack patch. The hack was base on v1.0.1, I rebased it to the latest master. The rebased patch are not tested. If you find this email useless, it's actually a good news, which means there is not a lot of work and problems ahead ;-)
Hack patch for ovirt-host-deploy.
From 120493a242046d19794ef3da83b32486d372aa39 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 18:02:26 +0800 Subject: [PATCH] Ubuntu Hacks
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

----- Original Message -----
From: "Antoni Segura Puimedon" <asegurap@redhat.com> To: "Alon Bar-Lev" <alonbl@redhat.com> Cc: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com>, "engine-devel" <engine-devel@ovirt.org> Sent: Wednesday, November 20, 2013 1:50:46 PM Subject: Re: [Engine-devel] Things to be done to support Ubuntu hosts
Would it make sense to leverage packagekit to abstract away the distro packaging differences? http://www.packagekit.org/pk-using.html
Not really... as it is egg and chicken... How do I install this package on vanilla host? And... it does not support gentoo as far as I can see :)))
----- Original Message -----
From: "Alon Bar-Lev" <alonbl@redhat.com> To: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> Cc: "engine-devel" <engine-devel@ovirt.org> Sent: Wednesday, November 20, 2013 9:53:29 AM Subject: Re: [Engine-devel] Things to be done to support Ubuntu hosts
----- Original Message -----
From: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> To: "Alon Bar-Lev" <alonbl@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org> Sent: Wednesday, November 20, 2013 3:53:17 AM Subject: Re: Things to be done to support Ubuntu hosts
on 2013/11/16 02:52, Alon Bar-Lev wrote:
----- Original Message -----
From: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> To: "engine-devel" <engine-devel@ovirt.org> Cc: "Itamar Heim" <iheim@redhat.com>, "Alon Bar-Lev" <alonbl@redhat.com> Sent: Thursday, November 14, 2013 8:57:19 AM Subject: Things to be done to support Ubuntu hosts
Hi,
Recently Ubuntu support is added to VDSM, and .deb binray packages can be downloaded from launchpad.net PPA [1]. Most of the key features such as storage management and VM lifecycle work on Ubuntu. The cross distribution network management patches are upstream as well. One big piece left is making ovirt-host-deploy support Ubuntu, so that we can manage Ubuntu hosts from Engine, thus close the gap on host side.
In May 2013 I made some hacks to ovirt-host-deploy and otopi. I made it skipped parts not supported on Ubuntu and configure the environment manually, and successfully added Ubuntu host to Engine [2]. Unfortunately I have no plans to continue on it, but I'd like to make a summary of the things I hacked to help anyone who wants to submit patches in future. I was to add a WIKI page but I found there were not many items, so a mail would be enough.
1. Package management operations Both otopi and ovirt-host-deploy query for dependency packages and install them on demand. The otopi package management just supports yum, we need to add apt-get support. Package names are different in Ubuntu, so I made a list mapping the names. The list in in VDSM source directory, debian/dependencyMap.txt .
Please try putting the following file on host:
/etc/ovirt-host-deploy.conf.d/10-ubuntu.conf --- ODEPLOY/offlinePackager=bool:True ---
This will replace the disable section of packaging in your patch. It will make host-deploy not to install any package and assume all is pre-installed.
Great! Do we have plan to implement apt-get support in ovirt-host-deploy?
Plans - yes. Not sure when exactly. I prefer first to handle the ovirt-engine porting to ubuntu at first opportunity.
2. Network configuration operations ovirt-host-deploy asks VDSM's configNetwork.py to create bridge network. Cross distribution support patches for configNetwork.py are under review. ovirt-host-deploy supports Ubuntu bridge configuration as long as they are merged.
This is not happening any more at 3.3, so no need to change anything.
I think that in 3.3 with the above offline packaging use, you can use vanilla otopi/host-deploy.
Regards, Alon Bar-Lev
[1] https://launchpad.net/~zhshzhou/+archive/vdsm-ubuntu [2] http://www.ovirt.org/images/5/57/Shanghai-VDSM-on-Ubuntu.pdf
Here goes the detailed hack patch. The hack was base on v1.0.1, I rebased it to the latest master. The rebased patch are not tested. If you find this email useless, it's actually a good news, which means there is not a lot of work and problems ahead ;-)
Hack patch for ovirt-host-deploy.
From 120493a242046d19794ef3da83b32486d372aa39 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 18:02:26 +0800 Subject: [PATCH] Ubuntu Hacks
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

----- Original Message -----
From: "Alon Bar-Lev" <alonbl@redhat.com> To: "Antoni Segura Puimedon" <asegurap@redhat.com> Cc: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com>, "engine-devel" <engine-devel@ovirt.org> Sent: Wednesday, November 20, 2013 1:03:05 PM Subject: Re: [Engine-devel] Things to be done to support Ubuntu hosts
----- Original Message -----
From: "Antoni Segura Puimedon" <asegurap@redhat.com> To: "Alon Bar-Lev" <alonbl@redhat.com> Cc: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com>, "engine-devel" <engine-devel@ovirt.org> Sent: Wednesday, November 20, 2013 1:50:46 PM Subject: Re: [Engine-devel] Things to be done to support Ubuntu hosts
Would it make sense to leverage packagekit to abstract away the distro packaging differences? http://www.packagekit.org/pk-using.html
Not really... as it is egg and chicken... How do I install this package on vanilla host? True And... it does not support gentoo as far as I can see :))) Yeah... I guess writing a backend for gentoo's ebuilds or for Arch's AUR would be quite a challenge.
----- Original Message -----
From: "Alon Bar-Lev" <alonbl@redhat.com> To: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> Cc: "engine-devel" <engine-devel@ovirt.org> Sent: Wednesday, November 20, 2013 9:53:29 AM Subject: Re: [Engine-devel] Things to be done to support Ubuntu hosts
----- Original Message -----
From: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> To: "Alon Bar-Lev" <alonbl@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org> Sent: Wednesday, November 20, 2013 3:53:17 AM Subject: Re: Things to be done to support Ubuntu hosts
on 2013/11/16 02:52, Alon Bar-Lev wrote:
----- Original Message -----
From: "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com> To: "engine-devel" <engine-devel@ovirt.org> Cc: "Itamar Heim" <iheim@redhat.com>, "Alon Bar-Lev" <alonbl@redhat.com> Sent: Thursday, November 14, 2013 8:57:19 AM Subject: Things to be done to support Ubuntu hosts
Hi,
Recently Ubuntu support is added to VDSM, and .deb binray packages can be downloaded from launchpad.net PPA [1]. Most of the key features such as storage management and VM lifecycle work on Ubuntu. The cross distribution network management patches are upstream as well. One big piece left is making ovirt-host-deploy support Ubuntu, so that we can manage Ubuntu hosts from Engine, thus close the gap on host side.
In May 2013 I made some hacks to ovirt-host-deploy and otopi. I made it skipped parts not supported on Ubuntu and configure the environment manually, and successfully added Ubuntu host to Engine [2]. Unfortunately I have no plans to continue on it, but I'd like to make a summary of the things I hacked to help anyone who wants to submit patches in future. I was to add a WIKI page but I found there were not many items, so a mail would be enough.
1. Package management operations Both otopi and ovirt-host-deploy query for dependency packages and install them on demand. The otopi package management just supports yum, we need to add apt-get support. Package names are different in Ubuntu, so I made a list mapping the names. The list in in VDSM source directory, debian/dependencyMap.txt .
Please try putting the following file on host:
/etc/ovirt-host-deploy.conf.d/10-ubuntu.conf --- ODEPLOY/offlinePackager=bool:True ---
This will replace the disable section of packaging in your patch. It will make host-deploy not to install any package and assume all is pre-installed.
Great! Do we have plan to implement apt-get support in ovirt-host-deploy?
Plans - yes. Not sure when exactly. I prefer first to handle the ovirt-engine porting to ubuntu at first opportunity.
2. Network configuration operations ovirt-host-deploy asks VDSM's configNetwork.py to create bridge network. Cross distribution support patches for configNetwork.py are under review. ovirt-host-deploy supports Ubuntu bridge configuration as long as they are merged.
This is not happening any more at 3.3, so no need to change anything.
I think that in 3.3 with the above offline packaging use, you can use vanilla otopi/host-deploy.
Regards, Alon Bar-Lev
[1] https://launchpad.net/~zhshzhou/+archive/vdsm-ubuntu [2] http://www.ovirt.org/images/5/57/Shanghai-VDSM-on-Ubuntu.pdf
Here goes the detailed hack patch. The hack was base on v1.0.1, I rebased it to the latest master. The rebased patch are not tested. If you find this email useless, it's actually a good news, which means there is not a lot of work and problems ahead ;-)
Hack patch for ovirt-host-deploy.
From 120493a242046d19794ef3da83b32486d372aa39 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Date: Wed, 13 Nov 2013 18:02:26 +0800 Subject: [PATCH] Ubuntu Hacks
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

On Wed, Nov 20, 2013 at 07:03:05AM -0500, Alon Bar-Lev wrote:
Antoni Segura Puimedon wrote:
Would it make sense to leverage packagekit to abstract away the distro packaging differences? http://www.packagekit.org/pk-using.html
Not really... as it is egg and chicken... How do I install this package on vanilla host?
Plus it's still likely that package names differ. I still think some abstraction here could help. Try some autodetection on package managers and prefer packagekit, then try yum, then apt-get, then aptitude for example.
And... it does not support gentoo as far as I can see :)))
As a Gentoo user, I don't find this suprising. The whole concept of USE-flags looks hard to abstract away and still be compatible with all the other distributions. Especially if there's USE-dependencies in the mix.

----- Original Message -----
From: "Ewoud Kohl van Wijngaarden" <ewoud+ovirt@kohlvanwijngaarden.nl> To: "Alon Bar-Lev" <alonbl@redhat.com> Cc: "Antoni Segura Puimedon" <asegurap@redhat.com>, "Zhou Zheng Sheng" <zhshzhou@linux.vnet.ibm.com>, "engine-devel" <engine-devel@ovirt.org> Sent: Wednesday, November 20, 2013 2:49:17 PM Subject: Re: [Engine-devel] Things to be done to support Ubuntu hosts
On Wed, Nov 20, 2013 at 07:03:05AM -0500, Alon Bar-Lev wrote:
Antoni Segura Puimedon wrote:
Would it make sense to leverage packagekit to abstract away the distro packaging differences? http://www.packagekit.org/pk-using.html
Not really... as it is egg and chicken... How do I install this package on vanilla host?
Plus it's still likely that package names differ.
This is another issue, which I don't think that package manager abstraction solves. But it is easy to solve by adding name mapping within current host-deploy implementation.
I still think some abstraction here could help. Try some autodetection on package managers and prefer packagekit, then try yum, then apt-get, then aptitude for example.
It is not that easy... we currently use the yum api to be able to participate in yum transaction, we also require to manage the version lock legacy hack and we need to know before installation if we can revert to previous version. So it is not that simple to use abstraction, well, until our product will behave better, for example it will support previous database schema so that no need to run setup for upgrade and mess up with packaging. For now, I truly think that it is easier to just execute apt-get or any other tool, otopi already built under that assumption.
And... it does not support gentoo as far as I can see :)))
As a Gentoo user, I don't find this suprising. The whole concept of USE-flags looks hard to abstract away and still be compatible with all the other distributions. Especially if there's USE-dependencies in the mix.
participants (5)
-
Alon Bar-Lev
-
Antoni Segura Puimedon
-
Ewoud Kohl van Wijngaarden
-
Yaniv Bronheim
-
Zhou Zheng Sheng