Revision c42be2c0 lib/cmdlib/instance_operation.py
b/lib/cmdlib/instance_operation.py | ||
---|---|---|
430 | 430 |
self.cfg.MarkInstanceUp(self.instance.uuid) |
431 | 431 |
|
432 | 432 |
|
433 |
def GetInstanceConsole(cluster, instance, primary_node): |
|
433 |
def GetInstanceConsole(cluster, instance, primary_node, node_group):
|
|
434 | 434 |
"""Returns console information for an instance. |
435 | 435 |
|
436 | 436 |
@type cluster: L{objects.Cluster} |
437 | 437 |
@type instance: L{objects.Instance} |
438 | 438 |
@type primary_node: L{objects.Node} |
439 |
@type node_group: L{objects.NodeGroup} |
|
439 | 440 |
@rtype: dict |
440 | 441 |
|
441 | 442 |
""" |
... | ... | |
444 | 445 |
# instance and then saving the defaults in the instance itself. |
445 | 446 |
hvparams = cluster.FillHV(instance) |
446 | 447 |
beparams = cluster.FillBE(instance) |
447 |
console = hyper.GetInstanceConsole(instance, primary_node, hvparams, beparams) |
|
448 |
console = hyper.GetInstanceConsole(instance, primary_node, node_group, |
|
449 |
hvparams, beparams) |
|
448 | 450 |
|
449 | 451 |
assert console.instance == instance.name |
450 | 452 |
assert console.Validate() |
... | ... | |
503 | 505 |
logging.debug("Connecting to console of %s on %s", self.instance.name, |
504 | 506 |
self.cfg.GetNodeName(node_uuid)) |
505 | 507 |
|
506 |
return GetInstanceConsole(self.cfg.GetClusterInfo(), self.instance, |
|
507 |
self.cfg.GetNodeInfo(self.instance.primary_node)) |
|
508 |
node = self.cfg.GetNodeInfo(self.instance.primary_node) |
|
509 |
group = self.cfg.GetNodeGroup(node.group) |
|
510 |
return GetInstanceConsole(self.cfg.GetClusterInfo(), |
|
511 |
self.instance, node, group) |
Also available in: Unified diff