Revision 81a49123 lib/config.py
b/lib/config.py | ||
---|---|---|
646 | 646 |
|
647 | 647 |
instance.serial_no = 1 |
648 | 648 |
self._config_data.instances[instance.name] = instance |
649 |
self._config_data.cluster.serial_no += 1 |
|
649 | 650 |
self._UnlockedReleaseDRBDMinors(instance.name) |
650 | 651 |
self._WriteConfig() |
651 | 652 |
|
... | ... | |
680 | 681 |
if instance_name not in self._config_data.instances: |
681 | 682 |
raise errors.ConfigurationError("Unknown instance '%s'" % instance_name) |
682 | 683 |
del self._config_data.instances[instance_name] |
684 |
self._config_data.cluster.serial_no += 1 |
|
683 | 685 |
self._WriteConfig() |
684 | 686 |
|
685 | 687 |
@locking.ssynchronized(_config_lock) |
... | ... | |
1064 | 1066 |
|
1065 | 1067 |
""" |
1066 | 1068 |
fn = "\n".join |
1069 |
instance_names = utils.NiceSort(self._UnlockedGetInstanceList()) |
|
1067 | 1070 |
node_names = utils.NiceSort(self._UnlockedGetNodeList()) |
1068 | 1071 |
node_info = [self._UnlockedGetNodeInfo(name) for name in node_names] |
1069 | 1072 |
|
1073 |
instance_data = fn(instance_names) |
|
1070 | 1074 |
off_data = fn(node.name for node in node_info if node.offline) |
1075 |
on_data = fn(node.name for node in node_info if not node.offline) |
|
1071 | 1076 |
mc_data = fn(node.name for node in node_info if node.master_candidate) |
1072 | 1077 |
node_data = fn(node_names) |
1073 | 1078 |
|
... | ... | |
1081 | 1086 |
constants.SS_MASTER_NODE: cluster.master_node, |
1082 | 1087 |
constants.SS_NODE_LIST: node_data, |
1083 | 1088 |
constants.SS_OFFLINE_NODES: off_data, |
1089 |
constants.SS_ONLINE_NODES: on_data, |
|
1090 |
constants.SS_INSTANCE_LIST: instance_data, |
|
1084 | 1091 |
constants.SS_RELEASE_VERSION: constants.RELEASE_VERSION, |
1085 | 1092 |
} |
1086 | 1093 |
|
Also available in: Unified diff