From 3e6435b6e8f4c835fd2956737de958adc63e83a9 Mon Sep 17 00:00:00 2001 From: Pranav Saxena Date: Fri, 4 Jan 2013 18:22:09 +0530 Subject: [PATCH 1/6] CLOUDSTACK-720:Fail to load a png image when accessing the web console --- ui/css/cloudstack3.css | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index 6156f47be3a..e1c9c86a04f 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -2062,7 +2062,6 @@ div.detail-group.actions td { float: right; margin-top: 8px; display: inline-block; - background: url(../images/citrix-logo-darkbg.png) no-repeat 97% 8px; padding: 0 96px 0 0; } From 7240204a507cce8143c248e6aa635da6dad60ed0 Mon Sep 17 00:00:00 2001 From: Wido den Hollander Date: Fri, 4 Jan 2013 14:31:25 +0100 Subject: [PATCH 2/6] Pass on the destination host in StartCommand I added this in commit bc94948e0604e0e5931759be3c3d3155e84686f6 to be able to bind the VNC on KVM on the Private IP Address of the Hypervisor. This got (accidentally) reverted in commit 110903a91a21c04b931a26354a04bd7f534ba050 breaking this behaviour with KVM. By passing the destination host again in StartCommand we are able to bind the VNC to the private IP address of the hypervisor. This makes sure the VNC is not open for the world and users don't have to firewall these ports, nor do they have to change "vnc_listen" in their qemu.conf libvirt settings. --- server/src/com/cloud/vm/VirtualMachineManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java index 9230f4ae729..4d94fc57d02 100755 --- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -764,7 +764,7 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene VirtualMachineTO vmTO = hvGuru.implement(vmProfile); cmds = new Commands(OnError.Stop); - cmds.addCommand(new StartCommand(vmTO)); + cmds.addCommand(new StartCommand(vmTO, dest.getHost())); vmGuru.finalizeDeployment(cmds, vmProfile, dest, ctx); From 0055d80211def39d3e174d5cad7e1b3839c19b15 Mon Sep 17 00:00:00 2001 From: Noa Resare Date: Fri, 4 Jan 2013 12:20:06 -0500 Subject: [PATCH 3/6] CLOUDSTACK-771: maven: add mysql version reference to enable non-snapshot builds If you update your build to build a version with a name not ending in -SNAPSHOT, you are required to declare versions on all your depdendencies. There is already a cs.mysql.version property, this patch makes sure it is used where appropriate. Signed-off-by: Chip Childers --- awsapi/pom.xml | 1 + client/pom.xml | 1 + server/pom.xml | 1 + utils/pom.xml | 1 + 4 files changed, 4 insertions(+) diff --git a/awsapi/pom.xml b/awsapi/pom.xml index 06c9d7e058a..3ab595211d4 100644 --- a/awsapi/pom.xml +++ b/awsapi/pom.xml @@ -266,6 +266,7 @@ mysql mysql-connector-java + ${cs.mysql.version} runtime diff --git a/client/pom.xml b/client/pom.xml index 77077066f9a..3d126984d3f 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -104,6 +104,7 @@ mysql mysql-connector-java + ${cs.mysql.version} runtime diff --git a/server/pom.xml b/server/pom.xml index 5ae926f9111..f8a1ae0aac2 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -45,6 +45,7 @@ mysql mysql-connector-java + ${cs.mysql.version} provided diff --git a/utils/pom.xml b/utils/pom.xml index 1ee8b7e50e3..0b3392d3aed 100644 --- a/utils/pom.xml +++ b/utils/pom.xml @@ -132,6 +132,7 @@ mysql mysql-connector-java + ${cs.mysql.version} test From 569ca6d7a360196553f598836d8405f6b48bfc2e Mon Sep 17 00:00:00 2001 From: Pranav Saxena Date: Sat, 5 Jan 2013 04:19:48 +0530 Subject: [PATCH 4/6] CLOUDSTACK-725:UI-Error when the Egress rules tab is selected for a network:Hiding the egress rules tab --- ui/scripts/network.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/scripts/network.js b/ui/scripts/network.js index c8979d05c48..4103c3e2b6e 100755 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -867,9 +867,9 @@ hiddenTabs.push("addloadBalancer"); } - if (isVPC || isAdvancedSGZone || hasSRXFirewall) { + // if (isVPC || isAdvancedSGZone || hasSRXFirewall) { hiddenTabs.push('egressRules'); - } + // } return hiddenTabs; }, From 9a66beb6589634ae4e0792706a332e447e6ba6dc Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 4 Jan 2013 14:51:08 -0800 Subject: [PATCH 5/6] CLOUDSTACK-717: Fix response json handling in cloudmonkey - Fixes response handling - Sorts alphabetically, count and id are on top if available - Fix colors Signed-off-by: Rohit Yadav --- tools/cli/cloudmonkey/cloudmonkey.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/tools/cli/cloudmonkey/cloudmonkey.py b/tools/cli/cloudmonkey/cloudmonkey.py index edb62ccc801..e1fc63eeb83 100644 --- a/tools/cli/cloudmonkey/cloudmonkey.py +++ b/tools/cli/cloudmonkey/cloudmonkey.py @@ -160,11 +160,11 @@ class CloudMonkeyShell(cmd.Cmd, object): elif 'type' in arg: print colored.green(arg), elif 'state' in arg or 'count' in arg: - print colored.yellow(arg), - elif 'id =' in arg: - print colored.cyan(arg), - elif 'name =' in arg: print colored.magenta(arg), + elif 'id =' in arg: + print colored.yellow(arg), + elif 'name =' in arg: + print colored.cyan(arg), else: print arg, else: @@ -203,7 +203,8 @@ class CloudMonkeyShell(cmd.Cmd, object): print printer def print_result_as_dict(result, result_filter=None): - for key in result.keys(): + for key in sorted(result.keys(), + key=lambda x: x!='id' and x!='count' and x): if not (isinstance(result[key], list) or isinstance(result[key], dict)): self.print_shell("%s = %s" % (key, result[key])) @@ -268,7 +269,11 @@ class CloudMonkeyShell(cmd.Cmd, object): while timeout > 0: response = process_json(conn.make_request_with_auth(command, requests)) - result = response[response.keys()[0]] + responsekeys = filter(lambda x: 'response' in x, + response.keys()) + if len(responsekeys) < 1: + continue + result = response[responsekeys[0]] jobstatus = result['jobstatus'] if jobstatus == 2: jobresult = result["jobresult"] @@ -346,9 +351,9 @@ class CloudMonkeyShell(cmd.Cmd, object): if result is None: return try: - # Response is in the key "apiname+response" (lowercase) - self.print_result(result[api_name.lower() + 'response'], - field_filter) + responsekeys = filter(lambda x: 'response' in x, result.keys()) + for responsekey in responsekeys: + self.print_result(result[responsekey], field_filter) print except Exception as e: self.print_shell("🙈 Error on parsing and printing", e) From c7563cb7bd5f813332cfe7bbdf96bc235d56c1ff Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 4 Jan 2013 15:15:21 -0800 Subject: [PATCH 6/6] cli: Show progress during polling for async jobs If asyncblock is set to true, prints dots as polling requests are made. When result is obtained, dots are wiped and result is printed. Signed-off-by: Rohit Yadav --- tools/cli/cloudmonkey/cloudmonkey.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/cli/cloudmonkey/cloudmonkey.py b/tools/cli/cloudmonkey/cloudmonkey.py index e1fc63eeb83..3bc87169f63 100644 --- a/tools/cli/cloudmonkey/cloudmonkey.py +++ b/tools/cli/cloudmonkey/cloudmonkey.py @@ -266,7 +266,11 @@ class CloudMonkeyShell(cmd.Cmd, object): command = "queryAsyncJobResult" requests = {'jobid': jobId} timeout = int(self.timeout) + pollperiod = 3 while timeout > 0: + progress = int((int(self.timeout) - timeout) / pollperiod ) + 1 + print '\r' + '.' * progress, + sys.stdout.flush() response = process_json(conn.make_request_with_auth(command, requests)) responsekeys = filter(lambda x: 'response' in x, @@ -282,9 +286,10 @@ class CloudMonkeyShell(cmd.Cmd, object): jobresult["errortext"]) return elif jobstatus == 1: + print '\r', return response - time.sleep(4) - timeout = timeout - 4 + time.sleep(pollperiod) + timeout = timeout - pollperiod logger.debug("job: %s to timeout in %ds" % (jobId, timeout)) self.print_shell("Error:", "Async query timeout for jobid=", jobId)