From aba62644a7c2411e8f7e126bccbe748b98c84b75 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Fri, 7 Jul 2017 12:29:34 +0200 Subject: [PATCH] B #5205: do not sync remotes on offline hosts (cherry picked from commit 079ef241efb411c20ac424659a36b80f2b26c2ff) --- src/cli/one_helper/onehost_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cli/one_helper/onehost_helper.rb b/src/cli/one_helper/onehost_helper.rb index f557bdb05b..6de9961721 100644 --- a/src/cli/one_helper/onehost_helper.rb +++ b/src/cli/one_helper/onehost_helper.rb @@ -262,10 +262,14 @@ class OneHostHelper < OpenNebulaHelper::OneHelper vm_mad = host['VM_MAD'].downcase remote_remotes = host['TEMPLATE/REMOTE_REMOTES'] + state = host['STATE'] # Skip this host from remote syncing if it's a PUBLIC_CLOUD host next if host['TEMPLATE/PUBLIC_CLOUD'] == 'YES' + # Skip this host from remote syncing if it's OFFLINE + next if self.class.state_to_str(state) == 'off' + host_version=host['TEMPLATE/VERSION'] begin