Revision 8d9c3bef lib/config.py
b/lib/config.py | ||
---|---|---|
48 | 48 |
_config_lock = locking.SharedLock() |
49 | 49 |
|
50 | 50 |
# job id used for resource management at config upgrade time |
51 |
_UPGRADE_CONFIG_JID="jid-cfg-upgrade"
|
|
51 |
_UPGRADE_CONFIG_JID = "jid-cfg-upgrade"
|
|
52 | 52 |
|
53 | 53 |
|
54 | 54 |
def _ValidateConfig(data): |
... | ... | |
200 | 200 |
return self._temporary_secrets.Generate(self._AllDRBDSecrets(), |
201 | 201 |
utils.GenerateSecret, |
202 | 202 |
ec_id) |
203 |
|
|
203 | 204 |
def _AllLVs(self): |
204 | 205 |
"""Compute the list of all LVs. |
205 | 206 |
|
... | ... | |
1002 | 1003 |
|
1003 | 1004 |
return self._config_data.nodes[node_name] |
1004 | 1005 |
|
1005 |
|
|
1006 | 1006 |
@locking.ssynchronized(_config_lock, shared=1) |
1007 | 1007 |
def GetNodeInfo(self, node_name): |
1008 | 1008 |
"""Get the configuration of a node, as stored in the config. |
... | ... | |
1028 | 1028 |
""" |
1029 | 1029 |
return self._config_data.nodes.keys() |
1030 | 1030 |
|
1031 |
|
|
1032 | 1031 |
@locking.ssynchronized(_config_lock, shared=1) |
1033 | 1032 |
def GetNodeList(self): |
1034 | 1033 |
"""Return the list of nodes which are in the configuration. |
... | ... | |
1195 | 1194 |
# only called at config init time, without the lock held |
1196 | 1195 |
self.DropECReservations(_UPGRADE_CONFIG_JID) |
1197 | 1196 |
|
1198 |
|
|
1199 | 1197 |
def _DistributeConfig(self, feedback_fn): |
1200 | 1198 |
"""Distribute the configuration to the other nodes. |
1201 | 1199 |
|
Also available in: Unified diff