Revision 4665b94f lib/cmdlib/instance.py
b/lib/cmdlib/instance.py | ||
---|---|---|
563 | 563 |
""" |
564 | 564 |
if self.op.opportunistic_locking: |
565 | 565 |
# Only consider nodes for which a lock is held |
566 |
node_whitelist = list(self.owned_locks(locking.LEVEL_NODE)) |
|
566 |
node_name_whitelist = self.cfg.GetNodeNames( |
|
567 |
self.owned_locks(locking.LEVEL_NODE)) |
|
567 | 568 |
else: |
568 |
node_whitelist = None |
|
569 |
node_name_whitelist = None
|
|
569 | 570 |
|
570 | 571 |
#TODO Export network to iallocator so that it chooses a pnode |
571 | 572 |
# in a nodegroup that has the desired network connected to |
572 | 573 |
req = _CreateInstanceAllocRequest(self.op, self.disks, |
573 | 574 |
self.nics, self.be_full, |
574 |
self.cfg.GetNodeNames(node_whitelist))
|
|
575 |
node_name_whitelist)
|
|
575 | 576 |
ial = iallocator.IAllocator(self.cfg, self.rpc, req) |
576 | 577 |
|
577 | 578 |
ial.Run(self.op.iallocator) |
Also available in: Unified diff