Bug #5205

onehost sync should skip hosts in OFFLINE state or using vcenter driver

Added by OpenNebula Systems Support Team about 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:06/27/2017
Priority:SponsoredDue date:
Assignee:Javi Fontan% Done:

0%

Category:CLI
Target version:Release 5.4
Resolution:fixed Pull request:
Affected Versions:OpenNebula 5.2

Description

A patch to skip hosts in OFFLINE state:

diff --git a/src/cli/one_helper/onehost_helper.rb b/src/cli/one_helper/onehost_helper.rb
index 1973f6aa2..3ed52e69e 100644
--- a/src/cli/one_helper/onehost_helper.rb
+++ b/src/cli/one_helper/onehost_helper.rb
@@ -230,10 +230,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 state == '8'
+
             host_version=host['TEMPLATE/VERSION']

             begin

Associated revisions

Revision 079ef241
Added by Javi Fontan about 4 years ago

B #5205: do not sync remotes on offline hosts

Revision aba62644
Added by Javi Fontan about 4 years ago

B #5205: do not sync remotes on offline hosts

(cherry picked from commit 079ef241efb411c20ac424659a36b80f2b26c2ff)

Revision 11bebb6e
Added by Javi Fontan about 4 years ago

B #5205: simplify host offline detection in onehost sync

Revision f3b5f20a
Added by Javi Fontan about 4 years ago

B #5205: simplify host offline detection in onehost sync

(cherry picked from commit 11bebb6e689fd403c99d03e04fde28e967de8c02)

History

#1 Updated by Juan Jose Montiel Cano about 4 years ago

  • Assignee set to Javi Fontan

#2 Updated by Javi Fontan about 4 years ago

  • Resolution set to fixed

Change done to one-5.2 and master branches.

#3 Updated by Javi Fontan about 4 years ago

  • Status changed from Pending to Closed

Also available in: Atom PDF