Revision 87ed6b79 lib/server/masterd.py
b/lib/server/masterd.py | ||
---|---|---|
489 | 489 |
object.__setattr__(self, name, value) |
490 | 490 |
|
491 | 491 |
def AddNode(self, node, ec_id): |
492 |
"""Adds a node to the configuration and lock manager.
|
|
492 |
"""Adds a node to the configuration. |
|
493 | 493 |
|
494 | 494 |
""" |
495 | 495 |
# Add it to the configuration |
... | ... | |
498 | 498 |
# If preseeding fails it'll not be added |
499 | 499 |
self.jobqueue.AddNode(node) |
500 | 500 |
|
501 |
# Add the new node to the Ganeti Lock Manager |
|
502 |
self.glm.add(locking.LEVEL_NODE, node.uuid) |
|
503 |
self.glm.add(locking.LEVEL_NODE_RES, node.uuid) |
|
504 |
|
|
505 | 501 |
def ReaddNode(self, node): |
506 | 502 |
"""Updates a node that's already in the configuration |
507 | 503 |
|
... | ... | |
519 | 515 |
# Notify job queue |
520 | 516 |
self.jobqueue.RemoveNode(node.name) |
521 | 517 |
|
522 |
# Remove the node from the Ganeti Lock Manager |
|
523 |
self.glm.remove(locking.LEVEL_NODE, node.uuid) |
|
524 |
self.glm.remove(locking.LEVEL_NODE_RES, node.uuid) |
|
525 |
|
|
526 | 518 |
|
527 | 519 |
def _SetWatcherPause(context, until): |
528 | 520 |
"""Creates or removes the watcher pause file. |
Also available in: Unified diff