From f1a83620bb66557fa182f5a686efeb6d40785061 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Wed, 25 Feb 2015 10:37:24 +0100 Subject: [PATCH] Bug #3627: onehost --sync should not try to update hybrid hosts --- src/cli/one_helper/onehost_helper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/cli/one_helper/onehost_helper.rb b/src/cli/one_helper/onehost_helper.rb index 6fc314d84d..729721448e 100644 --- a/src/cli/one_helper/onehost_helper.rb +++ b/src/cli/one_helper/onehost_helper.rb @@ -223,6 +223,16 @@ class OneHostHelper < OpenNebulaHelper::OneHelper next if host['CLUSTER_ID'].to_i != cluster_id end + vm_mad = host['VM_MAD'].downcase + remote_remotes = host['TEMPLATE/REMOTE_REMOTES'] + + # Skip this host from remote syncing unless: + # - the host is type "KVM" + # - the host is type "XEN" + # - the host has REMOTE_REMOTES defined in the template (useful + # for custom defined VMM types) + next unless remote_remotes || vm_mad == "kvm" || vm_mad == "xen" + host_version=host['TEMPLATE/VERSION'] begin