commit 88786dc4849c6efc546f5be41b20226207eab23b
Merge: c8feab6 cd0d5ce
Author: Klaus Aehlig <[email protected]>
Date: Thu Oct 16 13:32:56 2014 +0200
Merge branch 'stable-2.11' into stable-2.12
* stable-2.11
break too long line
Read if IPv6 is used directly in SshRunner
* stable-2.10
Check the return value of query in ConnectToInstanceConsole
Conflicts:
lib/client/gnt_instance.py
Resolution:
follow the client switch
Signed-off-by: Klaus Aehlig <[email protected]>
diff --cc lib/client/gnt_instance.py
index dfe6fc5,1cf6e3f..5e92927
--- a/lib/client/gnt_instance.py
+++ b/lib/client/gnt_instance.py
@@@ -862,16 -862,23 +862,19 @@@ def ConnectToInstanceConsole(opts, args
instance_name = args[0]
cl = GetClient()
- qcl = GetClient(query=True)
try:
cluster_name = cl.QueryConfigValues(["cluster_name"])[0]
- ((console_data, oper_state), ) = \
- cl.QueryInstances([instance_name], ["console", "oper_state"], False)
- idata = \
- qcl.QueryInstances([instance_name], ["console", "oper_state"], False)
++ idata = cl.QueryInstances([instance_name], ["console", "oper_state"],
False)
+ if not idata:
+ raise errors.OpPrereqError("Instance '%s' does not exist" %
instance_name,
+ errors.ECODE_NOENT)
finally:
# Ensure client connection is closed while external commands are run
cl.Close()
- qcl.Close()
del cl
- del qcl
+ ((console_data, oper_state), ) = idata
if not console_data:
if oper_state:
# Instance is running
--
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores