mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 13:15:14 +09:00
improve rescue of VM when node fail is detected
* Introduce new LCM states PROLOG_MIGRATE_UNKNOWN and PROLOG_MIGRATE_UNKNOWN_FAILURE
* Change VM migrate logic for when state is ACTIVE and lcm_state is UNKNOWN to
call TM's PROLOG_MIGR action before VMM's BOOT
All core TM drivers that are not empty are skipping disks so there is no impact on
the default behaviour
The datastore addon drivers that implement access to raw block devices should check
if the LCM_STATE == 60 (PROLOG_MIGRATE_UNKNOWN) and to remove block device access
from the failed node and provide access to the current node.
There is a simple script function added to get LCM_STATE that can be used as follow
```bash
LCM_STATE=$(lcm_state)
if [ "$LCM_STATE" = "60" ]
fi
```
(cherry picked from commit 676f36e0aa)
This commit is contained in:
1 parent
d2b66f0ec5
commit
f9375eccab
16 files changed
+91
-24
No files matched your search
@@ -139,7 +139,9 @@ public class VirtualMachine extends PoolElement{
|
||||
"DISK_SNAPSHOT_DELETE_SUSPENDED",
|
||||
"DISK_SNAPSHOT",
|
||||
"DISK_SNAPSHOT_REVERT",
|
||||
"DISK_SNAPSHOT_DELETE"
|
||||
"DISK_SNAPSHOT_DELETE",
|
||||
"PROLOG_MIGRATE_UNKNOWN",
|
||||
"PROLOG_MIGRATE_UNKNOWN_FAILURE"
|
||||
};
|
||||
|
||||
private static final String[] SHORT_LCM_STATES =
|
||||
@@ -203,7 +205,9 @@ public class VirtualMachine extends PoolElement{
|
||||
"snap", // DISK_SNAPSHOT_DELETE_SUSPENDED
|
||||
"snap", // DISK_SNAPSHOT
|
||||
"snap", // DISK_SNAPSHOT_REVERT
|
||||
"snap" // DISK_SNAPSHOT_DELETE
|
||||
"snap", // DISK_SNAPSHOT_DELETE
|
||||
"migr", // PROLOG_MIGRATE_UNKNOWN
|
||||
"fail" // PROLOG_MIGRATE_UNKNOWN_FAILURE
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user