Bug #5205
onehost sync should skip hosts in OFFLINE state or using vcenter driver
| Status: | Closed | Start date: | 06/27/2017 | |
|---|---|---|---|---|
| Priority: | Sponsored | Due date: | ||
| Assignee: | % 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
B #5205: do not sync remotes on offline hosts
B #5205: do not sync remotes on offline hosts
(cherry picked from commit 079ef241efb411c20ac424659a36b80f2b26c2ff)
B #5205: simplify host offline detection in onehost sync
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