ports[net_port] = []
ports[net_port].append((instance.name, "network port"))
+ # instance disk verify
+ for idx, disk in enumerate(instance.disks):
+ result.extend(["instance '%s' disk %d error: %s" %
+ (instance.name, idx, msg) for msg in disk.Verify()])
+
# cluster-wide pool of free ports
for free_port in data.cluster.tcpudp_port_pool:
if free_port not in ports:
duplicates = []
my_dict = dict((node, {}) for node in self._config_data.nodes)
+ for instance in self._config_data.instances.itervalues():
+ for disk in instance.disks:
+ duplicates.extend(_AppendUsedPorts(instance.name, disk, my_dict))
for (node, minor), instance in self._temporary_drbds.iteritems():
- if minor in my_dict[node]:
+ if minor in my_dict[node] and my_dict[node][minor] != instance:
duplicates.append((node, minor, instance, my_dict[node][minor]))
else:
my_dict[node][minor] = instance
- for instance in self._config_data.instances.itervalues():
- for disk in instance.disks:
- duplicates.extend(_AppendUsedPorts(instance.name, disk, my_dict))
return my_dict, duplicates
@locking.ssynchronized(_config_lock)
instance.serial_no = 1
self._config_data.instances[instance.name] = instance
+ self._config_data.cluster.serial_no += 1
self._UnlockedReleaseDRBDMinors(instance.name)
self._WriteConfig()
if instance_name not in self._config_data.instances:
raise errors.ConfigurationError("Unknown instance '%s'" % instance_name)
del self._config_data.instances[instance_name]
+ self._config_data.cluster.serial_no += 1
self._WriteConfig()
@locking.ssynchronized(_config_lock)
"""
fn = "\n".join
+ instance_names = utils.NiceSort(self._UnlockedGetInstanceList())
node_names = utils.NiceSort(self._UnlockedGetNodeList())
node_info = [self._UnlockedGetNodeInfo(name) for name in node_names]
+ instance_data = fn(instance_names)
off_data = fn(node.name for node in node_info if node.offline)
+ on_data = fn(node.name for node in node_info if not node.offline)
mc_data = fn(node.name for node in node_info if node.master_candidate)
node_data = fn(node_names)
constants.SS_MASTER_NODE: cluster.master_node,
constants.SS_NODE_LIST: node_data,
constants.SS_OFFLINE_NODES: off_data,
+ constants.SS_ONLINE_NODES: on_data,
+ constants.SS_INSTANCE_LIST: instance_data,
constants.SS_RELEASE_VERSION: constants.RELEASE_VERSION,
}