Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1059,11 +1059,14 @@ private void createPreFencePendingTag(HaStartVmInstanceMsg msg) {
String suspectHostUuid = StringUtils.trimToNull(CollectionUtils.isEmpty(msg.getSoftAvoidHostUuids()) ?
self.getLastHostUuid() : msg.getSoftAvoidHostUuids().get(0));
String peerHostUuid = StringUtils.trimToNull(msg.getAccessiblePeerHostUuid());
if (suspectHostUuid == null || peerHostUuid == null) {
logger.debug(String.format("HA-start vm[%s]: skip creating pre-fence tag because suspect host[%s] or peer host[%s] is absent",
self.getUuid(), suspectHostUuid, peerHostUuid));
if (suspectHostUuid == null) {
logger.debug(String.format("HA-start vm[%s]: skip creating pre-fence tag because suspect host is absent",
self.getUuid()));
return;
}
if (peerHostUuid == null) {
peerHostUuid = VmSystemTags.HA_PRE_FENCE_ACCESSIBLE_PEER_HOST_UUID_NONE;
}

Map<String, String> tokens = new HashMap<>();
tokens.put(VmSystemTags.HA_PRE_FENCE_SUSPECT_HOST_UUID_TOKEN, suspectHostUuid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ public String desensitizeTag(SystemTag systemTag, String tag) {

public static String HA_PRE_FENCE_SUSPECT_HOST_UUID_TOKEN = "suspectHostUuid";
public static String HA_PRE_FENCE_ACCESSIBLE_PEER_HOST_UUID_TOKEN = "accessiblePeerHostUuid";
public static String HA_PRE_FENCE_ACCESSIBLE_PEER_HOST_UUID_NONE = "none";
public static PatternedSystemTag HA_PRE_FENCE_PENDING =
new PatternedSystemTag(String.format("haPreFencePending::{%s}::{%s}",
HA_PRE_FENCE_SUSPECT_HOST_UUID_TOKEN,
Expand Down