From b091ea6ead7cc7be3c66d2173bfd2cab232a47ad Mon Sep 17 00:00:00 2001 From: Pranav Saxena Date: Fri, 22 Feb 2013 02:07:08 +0530 Subject: [PATCH 01/22] scale UP CPU and memory UI --- ui/css/cloudstack3.css | 6 ++++-- ui/scripts/instances.js | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index efdae3523bf..0753cc4ed07 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -11277,7 +11277,8 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it background-position: -168px -31px; } -.reset .icon { +.reset .icon , +.scaleUp .icon{ background-position: -168px -31px; } @@ -11286,7 +11287,8 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it background-position: -168px -613px; } -.reset:hover .icon { +.reset:hover .icon, +.scaleUp:hover .icon { background-position: -168px -613px; } diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 264b5a1cbbe..c21e0319f85 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -1240,6 +1240,44 @@ } }, + scaleUp:{ + label:'scaleUp VM', + action: function(args) { + $.ajax({ + url: createURL("scaleVirtualMachine&id=" + args.context.instances[0].id), + dataType: "json", + async: true, + success: function(json) { + var jid = json.scaleupvirtualmachineresponse.jobid; + args.response.success( + {_custom: + {jobId: jid, + getUpdatedItem: function(json) { + return json.queryasyncjobresultresponse.jobresult.virtualmachine; + }, + getActionFilter: function() { + return vmActionfilter; + } + } + } + ); + } + }); + }, + messages: { + confirm: function(args) { + return 'Do you really want to scale Up your instance ?'; + }, + notification: function(args) { + return 'Instance Scaled Up'; + } + }, + notification: { + poll: pollAsyncJobResult + } + + }, + viewConsole: { label: 'label.view.console', action: { @@ -1488,6 +1526,7 @@ allowedActions.push("destroy"); allowedActions.push("changeService"); allowedActions.push("reset"); + allowedactions.push("scaleUp"); if (isAdmin()) allowedActions.push("migrate"); @@ -1511,6 +1550,8 @@ allowedActions.push("destroy"); allowedActions.push("reset"); allowedActions.push("snapshot"); + allowedActions.push("scaleUp"); + if(isAdmin()) allowedActions.push("migrateToAnotherStorage"); From 534f5540a33d47ea5bd84c58c94def2abfc0e9db Mon Sep 17 00:00:00 2001 From: Pranav Saxena Date: Fri, 22 Feb 2013 02:16:20 +0530 Subject: [PATCH 02/22] scale UP CPU and memory UI --- ui/scripts/instances.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index c21e0319f85..a25e2405460 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -1526,7 +1526,7 @@ allowedActions.push("destroy"); allowedActions.push("changeService"); allowedActions.push("reset"); - allowedactions.push("scaleUp"); + allowedActions.push("scaleUp"); if (isAdmin()) allowedActions.push("migrate"); From eacc0d7a89ea678d1f5d03c6f4e278b680fd9457 Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Fri, 5 Apr 2013 08:46:39 +0200 Subject: [PATCH 03/22] CLOUDSTACK-1917: Both MidoNet and NiciraNvp have a network guru that must be loaded --- client/tomcatconf/componentContext.xml.in | 2 ++ client/tomcatconf/nonossComponentContext.xml.in | 2 ++ 2 files changed, 4 insertions(+) diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in index a0067088b43..bea2f787c17 100644 --- a/client/tomcatconf/componentContext.xml.in +++ b/client/tomcatconf/componentContext.xml.in @@ -225,6 +225,8 @@ + + diff --git a/client/tomcatconf/nonossComponentContext.xml.in b/client/tomcatconf/nonossComponentContext.xml.in index 5aec8887ffe..187446c44f3 100644 --- a/client/tomcatconf/nonossComponentContext.xml.in +++ b/client/tomcatconf/nonossComponentContext.xml.in @@ -306,6 +306,8 @@ + + From 7ea0d7bce4b542bd8caada727416ec73e60f4977 Mon Sep 17 00:00:00 2001 From: Kishan Kavala Date: Fri, 5 Apr 2013 13:57:27 +0530 Subject: [PATCH 04/22] CLOUDSTACK-1874: Removed region_id column from cloud_usage db account table --- setup/db/db/schema-40to410.sql | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup/db/db/schema-40to410.sql b/setup/db/db/schema-40to410.sql index a04bbc576b8..fc15b94493e 100644 --- a/setup/db/db/schema-40to410.sql +++ b/setup/db/db/schema-40to410.sql @@ -263,8 +263,6 @@ CREATE TABLE `cloud`.`region` ( INSERT INTO `cloud`.`region` values ('1','Local','http://localhost:8080/client/'); -ALTER TABLE `cloud_usage`.`account` ADD COLUMN `region_id` int unsigned NOT NULL DEFAULT '1'; - CREATE TABLE `cloud`.`nicira_nvp_router_map` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `logicalrouter_uuid` varchar(255) NOT NULL UNIQUE COMMENT 'nicira uuid of logical router', From 8d6bb9538a98e8811925f718cde19955ea99d741 Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Fri, 5 Apr 2013 10:49:38 +0200 Subject: [PATCH 05/22] Packaging: db-enc.properties is gone --- packaging/centos63/cloud.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec index aa4a15c3574..1a68d9c324c 100644 --- a/packaging/centos63/cloud.spec +++ b/packaging/centos63/cloud.spec @@ -454,7 +454,6 @@ fi %config(noreplace) %{_sysconfdir}/%{name}/management/catalina.policy %config(noreplace) %{_sysconfdir}/%{name}/management/catalina.properties %config(noreplace) %{_sysconfdir}/%{name}/management/classpath.conf -%config(noreplace) %{_sysconfdir}/%{name}/management/db-enc.properties %config(noreplace) %{_sysconfdir}/%{name}/management/server-nonssl.xml %config(noreplace) %{_sysconfdir}/%{name}/management/server-ssl.xml %config(noreplace) %{_sysconfdir}/%{name}/management/tomcat-users.xml From 085846af94b14a752ed99d6347f3f068df6f58b3 Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Fri, 5 Apr 2013 13:28:15 +0200 Subject: [PATCH 06/22] Cleanup: Found some waf remnants --- tools/waf/javadir.py | 38 ------------ tools/waf/mkisofs.py | 84 ------------------------- tools/waf/tar.py | 79 ------------------------ tools/waf/tomcat.py | 57 ----------------- tools/waf/usermgmt.py | 140 ------------------------------------------ 5 files changed, 398 deletions(-) delete mode 100644 tools/waf/javadir.py delete mode 100644 tools/waf/mkisofs.py delete mode 100644 tools/waf/tar.py delete mode 100644 tools/waf/tomcat.py delete mode 100644 tools/waf/usermgmt.py diff --git a/tools/waf/javadir.py b/tools/waf/javadir.py deleted file mode 100644 index 7b0bb2b8927..00000000000 --- a/tools/waf/javadir.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -import Options, Utils -import os - -def detect(conf): - conf.check_message_1('Detecting JAVADIR') - javadir = getattr(Options.options, 'JAVADIR', '') - if javadir: - conf.env.JAVADIR = javadir - conf.check_message_2("%s (forced through --javadir)"%conf.env.JAVADIR,"GREEN") - else: - conf.env.JAVADIR = os.path.join(conf.env.DATADIR,'java') - conf.check_message_2("%s (using default ${DATADIR}/java directory)"%conf.env.JAVADIR,"GREEN") - -def set_options(opt): - inst_dir = opt.get_option_group('--datadir') # get the group that contains bindir - if not inst_dir: raise Utils.WafError, "DATADIR not set. Did you load the gnu_dirs tool options with opt.tool_options('gnu_dirs') before running opt.tool_options('javadir')?" - inst_dir.add_option('--javadir', # add javadir to the group that contains bindir - help = 'Java class and jar files [Default: ${DATADIR}/java]', - default = '', - dest = 'JAVADIR') diff --git a/tools/waf/mkisofs.py b/tools/waf/mkisofs.py deleted file mode 100644 index 334845f4b49..00000000000 --- a/tools/waf/mkisofs.py +++ /dev/null @@ -1,84 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import Utils -from TaskGen import feature, before -from Configure import ConfigurationError -import Task -import os - -# fixme: this seems to hang waf with 100% CPU - -def detect(conf): - conf.find_program("mkisofs",var='MKISOFS') - if not conf.env.MKISOFS: conf.find_program("genisoimage",mandatory=True,var='MKISOFS') - -def iso_up(task): - tgt = task.outputs[0].bldpath(task.env) - if os.path.exists(tgt): os.unlink(tgt) - inps = [] - for inp in task.inputs: - if inp.id&3==Node.BUILD: - src = inp.bldpath(task.env) - srcname = src - srcname = sep.join(srcname.split(sep)[1:]) # chop off default/ - else: - src = inp.srcpath(task.env) - srcname = src - srcname = sep.join(srcname.split(sep)[1:]) # chop off ../ - if task.generator.rename: srcname = task.generator.rename(srcname) - inps.append(srcname+'='+src) - ret = Utils.exec_command( - [ - task.generator.env.MKISOFS, - "-quiet", - "-r", - "-graft-points", - "-o",tgt, - ] + inps, shell=False) - if ret != 0: return ret - -def apply_iso(self): - Utils.def_attrs(self,fun=iso_up) - self.default_install_path=0 - lst=self.to_list(self.source) - self.meths.remove('apply_core') - self.dict=getattr(self,'dict',{}) - out = self.path.find_or_declare(self.target) - ins = [] - for x in Utils.to_list(self.source): - node = self.path.find_resource(x) - if not node:raise Utils.WafError('cannot find input file %s for processing'%x) - ins.append(node) - if self.dict and not self.env['DICT_HASH']: - self.env=self.env.copy() - keys=list(self.dict.keys()) - keys.sort() - lst=[self.dict[x]for x in keys] - self.env['DICT_HASH']=str(Utils.h_list(lst)) - tsk=self.create_task('iso',ins,out) - tsk.fun=self.fun - tsk.dict=self.dict - tsk.dep_vars=['DICT_HASH'] - tsk.install_path=self.install_path - tsk.chmod=self.chmod - if not tsk.env: - tsk.debug() - raise Utils.WafError('task without an environment') - -Task.task_type_from_func('iso',func=iso_up) -feature('iso')(apply_iso) -before('apply_core')(apply_iso) diff --git a/tools/waf/tar.py b/tools/waf/tar.py deleted file mode 100644 index d2d6d5d1551..00000000000 --- a/tools/waf/tar.py +++ /dev/null @@ -1,79 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import Utils -import Options -import tarfile -from TaskGen import feature, before -import Task -import os, sys - -# construct a tar file containing them -# for as long as the build node appears later than the source node (this is an implementation detail of waf we are relying on) -def tar_up(task): - tgt = task.outputs[0].bldpath(task.env) - if os.path.exists(tgt): os.unlink(tgt) - if tgt.lower().endswith(".bz2"): z = tarfile.open(tgt,"w:bz2") - elif tgt.lower().endswith(".gz"): z = tarfile.open(tgt,"w:gz") - elif tgt.lower().endswith(".tgz"): z = tarfile.open(tgt,"w:gz") - else: z = tarfile.open(tgt,"w") - fileset = {} - for inp in task.inputs: - src = inp.srcpath(task.env) - if src.startswith(".."): - srcname = Utils.relpath(src,os.path.join("..",".")) # file in source dir - else: - srcname = Utils.relpath(src,os.path.join(task.env.variant(),".")) # file in artifacts dir - srcname = srcname.split(os.path.sep,len(task.generator.root.split(os.path.sep)))[-1] - if task.generator.rename: srcname = task.generator.rename(srcname) - fileset[srcname] = src - for srcname,src in fileset.items(): - ti = tarfile.TarInfo(srcname) - ti.mode = 0755 - ti.size = os.path.getsize(src) - openmode = 'r' - if Options.platform == 'win32': openmode = openmode + 'b' - f = file(src,openmode) - z.addfile(ti,fileobj=f) - f.close() - z.close() - if task.chmod: os.chmod(tgt,task.chmod) - return 0 - -def apply_tar(self): - Utils.def_attrs(self,fun=tar_up) - self.default_install_path=0 - lst=self.to_list(self.source) - self.meths.remove('apply_core') - self.dict=getattr(self,'dict',{}) - out = self.path.find_or_declare(self.target) - ins = [] - for x in Utils.to_list(self.source): - node = self.path.find_resource(x) - if not node:raise Utils.WafError('cannot find input file %s for processing'%x) - ins.append(node) - tsk=self.create_task('tar',ins,out) - tsk.fun=self.fun - tsk.dict=self.dict - tsk.install_path=self.install_path - tsk.chmod=self.chmod - if not tsk.env: - tsk.debug() - raise Utils.WafError('task without an environment') - -Task.task_type_from_func('tar',func=tar_up) -feature('tar')(apply_tar) -before('apply_core')(apply_tar) diff --git a/tools/waf/tomcat.py b/tools/waf/tomcat.py deleted file mode 100644 index 8454b45f89c..00000000000 --- a/tools/waf/tomcat.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -import Options, Utils -import os - -def detect(conf): - if not conf.env.DATADIR: - conf.fatal("DATADIR not found in the environment. Did you run conf.check_tool('gnu_dirs') before running check_tool('tomcat')?") - conf.check_message_1('Detecting Tomcat') - conf.env.TOMCATHOME = '' - tomcathome = getattr(Options.options, 'TOMCATHOME', '') - if tomcathome: - conf.env.TOMCATHOME = tomcathome - method = "forced through --with-tomcat" - else: - if "TOMCAT_HOME" in conf.environ and conf.environ['TOMCAT_HOME'].strip(): - conf.env.TOMCATHOME = conf.environ["TOMCAT_HOME"] - method = 'got through environment variable %TOMCAT_HOME%' - elif "CATALINA_HOME" in conf.environ and conf.environ['CATALINA_HOME'].strip(): - conf.env.TOMCATHOME = conf.environ['CATALINA_HOME'] - method = 'got through environment variable %CATALINA_HOME%' - elif os.path.isdir(os.path.join(conf.env.DATADIR,"tomcat6")): - conf.env.TOMCATHOME = os.path.join(conf.env.DATADIR,"tomcat6") - method = 'detected existence of Tomcat directory under $DATADIR' - elif os.path.isdir("/usr/share/tomcat6"): - conf.env.TOMCATHOME = "/usr/share/tomcat6" - method = 'detected existence of standard Linux system directory' - if not conf.env.TOMCATHOME: - conf.fatal("Could not detect Tomcat") - elif not os.path.isdir(conf.env.TOMCATHOME): - conf.fatal("Tomcat cannot be found at %s"%conf.env.TOMCATHOME) - else: - conf.check_message_2("%s (%s)"%(conf.env.TOMCATHOME,method),"GREEN") - -def set_options(opt): - inst_dir = opt.get_option_group('--datadir') # get the group that contains bindir - if not inst_dir: raise Utils.WafError, "DATADIR not set. Did you load the gnu_dirs tool options with opt.tool_options('gnu_dirs') before running opt.tool_options('tomcat')?" - inst_dir.add_option('--with-tomcat', # add javadir to the group that contains bindir - help = 'Path to installed Tomcat 6 environment [Default: ${DATADIR}/tomcat6 (unless %%CATALINA_HOME%% is set)]', - default = '', - dest = 'TOMCATHOME') diff --git a/tools/waf/usermgmt.py b/tools/waf/usermgmt.py deleted file mode 100644 index a231e0a86a9..00000000000 --- a/tools/waf/usermgmt.py +++ /dev/null @@ -1,140 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import Utils, Build -from TaskGen import feature, before -from Configure import ConfigurationError -import Options -import Task -import os - -def detect(conf): - if Options.platform == 'win32': raise Utils.WafError('the usermgmt tool only works on Linux') - if Options.platform == 'darwin': raise Utils.WafError('the usermgmt tool only works on Linux') - path_list = ["/usr/local/sbin","/usr/sbin","/sbin"] + os.environ.get('PATH','').split(os.pathsep) - conf.find_program("useradd",var='USERADD',mandatory=True,path_list=path_list) - conf.find_program("userdel",var='USERDEL',mandatory=True,path_list=path_list) - -def set_options(opt): - if Options.platform == 'win32': raise Utils.WafError('the usermgmt tool only works on Linux') - if Options.platform == 'darwin': raise Utils.WafError('the usermgmt tool only works on Linux') - og = opt.get_option_group('--force') - og.add_option('--nochown', - action = 'store_true', - help = 'do not create or remove user accounts or change file ownership on installed files', - default = False, - dest = 'NOUSERMGMT') - -def _subst_add_destdir(x,bld): - a = "${DESTDIR}" + x - a = a.replace("${DESTDIR}",Options.options.destdir) - a = Utils.subst_vars(a,bld.env) - if a.startswith("//"): a = a[1:] - return a -Build.BuildContext.subst_add_destdir = staticmethod(_subst_add_destdir) - -def _setownership(ctx,path,owner,group,mode=None): - if Options.platform == 'win32': return - if Options.platform == 'darwin': return - if not hasattr(os,"getuid"): return - if os.getuid() != 0: return - if Options.options.NOUSERMGMT: return - - import pwd - import grp - import stat - from os import chown as _chown, chmod as _chmod - - def f(bld,path,owner,group,mode): - - try: uid = pwd.getpwnam(owner).pw_uid - except KeyError,e: - raise Utils.WafError("Before using setownership() you have to create the user with bld.createuser(username...)") - try: gid = grp.getgrnam(group).gr_gid - except KeyError,e: - raise Utils.WafError("Before using setownership() you have to create the user with bld.createuser(username...)") - - path = bld.subst_add_destdir(path,bld) - current_uid,current_gid = os.stat(path).st_uid,os.stat(path).st_gid - if current_uid != uid: - Utils.pprint("GREEN","* setting owner of %s to UID %s"%(path,uid)) - _chown(path,uid,current_gid) - current_uid = uid - if current_gid != gid: - Utils.pprint("GREEN","* setting group of %s to GID %s"%(path,gid)) - _chown(path,current_uid,gid) - current_gid = gid - if mode is not None: - current_mode = stat.S_IMODE(os.stat(path).st_mode) - if current_mode != mode: - Utils.pprint("GREEN","* adjusting permissions on %s to mode %o"%(path,mode)) - _chmod(path,mode) - current_mode = mode - - if ctx.is_install > 0: - ctx.add_post_fun(lambda ctx: f(ctx,path,owner,group,mode)) -Build.BuildContext.setownership = _setownership - -def _createuser(ctx,user,homedir,shell): - if Options.platform == 'win32': return - if Options.platform == 'darwin': return - if not hasattr(os,"getuid"): return - if os.getuid() != 0: return - if Options.options.NOUSERMGMT: return - - def f(ctx,user,homedir,shell): - import pwd - try: - pwd.getpwnam(user).pw_uid - user_exists = True - except KeyError,e: - user_exists = False - if user_exists: return - - Utils.pprint("GREEN","* creating user %s"%user) - cmd = [ - ctx.env.USERADD, - '-M', - '-r', - '-s',shell, - '-d',homedir, - user, - ] - ret = Utils.exec_command(cmd) - if ret: raise Utils.WafError("Failed to run command %s"%cmd) - - def g(ctx,user,homedir,shell): - import pwd - try: - pwd.getpwnam(user).pw_uid - user_exists = True - except KeyError,e: - user_exists = False - if not user_exists: return - - Utils.pprint("GREEN","* removing user %s"%user) - cmd = [ - ctx.env.USERDEL, - user, - ] - ret = Utils.exec_command(cmd) - if ret: raise Utils.WafError("Failed to run command %s"%cmd) - - if ctx.is_install > 0: - ctx.add_pre_fun(lambda ctx: f(ctx,user,homedir,shell)) - elif ctx.is_install < 0: - ctx.add_pre_fun(lambda ctx: g(ctx,user,homedir,shell)) -Build.BuildContext.createuser = _createuser From 89d3808a182c422e59eacb89585d32704df6b606 Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Fri, 5 Apr 2013 16:08:11 +0200 Subject: [PATCH 07/22] packaging: move jasypt jar to cloudstack-common Continuation of the work done in a35f7c7bd179a33e833d3d93f61f94ee7124c3f1 --- packaging/centos63/cloud.spec | 5 +---- setup/bindir/cloud-setup-databases.in | 2 +- setup/bindir/cloud-setup-encryption.in | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec index 1a68d9c324c..d08a1aed062 100644 --- a/packaging/centos63/cloud.spec +++ b/packaging/centos63/cloud.spec @@ -248,8 +248,7 @@ mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classe ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost/client install python/bindir/cloud-external-ipallocator.py ${RPM_BUILD_ROOT}%{_bindir}/%{name}-external-ipallocator.py -install -D client/target/pythonlibs/jasypt-1.9.0.jar ${RPM_BUILD_ROOT}%{_javadir}/jasypt-1.9.0.jar -install -D client/target/pythonlibs/jasypt-1.8.jar ${RPM_BUILD_ROOT}%{_javadir}/jasypt-1.8.jar +install -D client/target/pythonlibs/jasypt-1.9.0.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/jasypt-1.9.0.jar install -D packaging/centos63/cloud-ipallocator.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-ipallocator install -D packaging/centos63/cloud-management.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-management @@ -485,8 +484,6 @@ fi %{_datadir}/%{name}-management/setup/db/*.sql %{_datadir}/%{name}-management/setup/*.sh %{_datadir}/%{name}-management/setup/server-setup.xml -%{_javadir}/jasypt-1.9.0.jar -%{_javadir}/jasypt-1.8.jar %attr(0755,root,root) %{_bindir}/%{name}-external-ipallocator.py %attr(0755,root,root) %{_initrddir}/%{name}-ipallocator %dir %attr(0770,root,root) %{_localstatedir}/log/%{name}/ipallocator diff --git a/setup/bindir/cloud-setup-databases.in b/setup/bindir/cloud-setup-databases.in index 0b5cbaca249..b58dc24ed04 100755 --- a/setup/bindir/cloud-setup-databases.in +++ b/setup/bindir/cloud-setup-databases.in @@ -67,7 +67,7 @@ class DBDeployer(object): dbDotProperties = {} dbDotPropertiesIndex = 0 encryptionKeyFile = '@MSCONF@/key' - encryptionJarPath = '@JAVADIR@/jasypt-1.9.0.jar' + encryptionJarPath = '@COMMONLIBDIR@/lib/jasypt-1.9.0.jar' success = False magicString = 'This_is_a_magic_string_i_think_no_one_will_duplicate' tmpMysqlFile = os.path.join(os.path.expanduser('~/'), 'cloudstackmysql.tmp.sql') diff --git a/setup/bindir/cloud-setup-encryption.in b/setup/bindir/cloud-setup-encryption.in index 19ad721ccbe..cf27b37103c 100755 --- a/setup/bindir/cloud-setup-encryption.in +++ b/setup/bindir/cloud-setup-encryption.in @@ -63,7 +63,7 @@ class DBDeployer(object): dbDotProperties = {} dbDotPropertiesIndex = 0 encryptionKeyFile = '@MSCONF@/key' - encryptionJarPath = '@JAVADIR@/cloud-jasypt-1.8.jar:@JAVADIR@/jasypt-1.8.jar:@JAVADIR@/jasypt-1.9.0.jar' + encryptionJarPath = '@COMMONLIBDIR@/lib/jasypt-1.9.0.jar' success = False magicString = 'This_is_a_magic_string_i_think_no_one_will_duplicate' From a773ed88b7290829eb070c678c26cba4d045dc33 Mon Sep 17 00:00:00 2001 From: Wido den Hollander Date: Fri, 5 Apr 2013 14:55:14 +0200 Subject: [PATCH 08/22] debian: Management server packaging fixes We should be carefull what we package since all configuration should be in /etc/cloudstack/management Signed-off-by: Wido den Hollander --- client/tomcatconf/server.xml.in | 231 -------------------------- debian/cloudstack-management.install | 2 - debian/cloudstack-management.postinst | 9 +- debian/rules | 7 +- 4 files changed, 7 insertions(+), 242 deletions(-) delete mode 100644 client/tomcatconf/server.xml.in diff --git a/client/tomcatconf/server.xml.in b/client/tomcatconf/server.xml.in deleted file mode 100644 index 30e6a6cd6f9..00000000000 --- a/client/tomcatconf/server.xml.in +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/debian/cloudstack-management.install b/debian/cloudstack-management.install index b42343ad5a4..6d87748c757 100644 --- a/debian/cloudstack-management.install +++ b/debian/cloudstack-management.install @@ -15,7 +15,6 @@ # specific language governing permissions and limitations # under the License. -/etc/cloudstack/server/* /etc/cloudstack/management/* /etc/init.d/cloudstack-management /etc/security/limits.d/cloudstack-limits.conf @@ -31,4 +30,3 @@ /usr/bin/cloud-setup-databases /usr/bin/cloud-migrate-databases /usr/share/cloudstack-management/* -/usr/share/tomcat6/lib/* diff --git a/debian/cloudstack-management.postinst b/debian/cloudstack-management.postinst index 08df3c7a465..a1219cc789f 100644 --- a/debian/cloudstack-management.postinst +++ b/debian/cloudstack-management.postinst @@ -6,9 +6,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -27,10 +27,7 @@ if [ "$1" = configure ]; then /var/cache/cloudstack/management/work \ /var/cache/cloudstack/management/temp \ /var/log/cloudstack/management \ - /etc/cloudstack/management/Catalina \ - /etc/cloudstack/management/Catalina/localhost \ - /var/lib/cloudstack/management \ - /etc/cloudstack/management/Catalina/localhost/client + /var/lib/cloudstack/management do chmod 0770 $i chgrp cloud $i diff --git a/debian/rules b/debian/rules index 2cf037645fe..912ec7fa605 100755 --- a/debian/rules +++ b/debian/rules @@ -98,14 +98,15 @@ install: chmod 0440 $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/cloudstack ln -s tomcat6-nonssl.conf $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/tomcat6.conf - mkdir -p $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/Catalina/localhost/client - mkdir -p ${DESTDIR}/usr/share/tomcat6/lib + ln -s server-nonssl.xml $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/server.xml install -D packaging/debian/init/cloud-management $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-management install -D client/bindir/cloud-update-xenserver-licenses.in $(DESTDIR)/usr/bin/cloud-update-xenserver-licenses ln -s /usr/share/tomcat6/bin $(DESTDIR)/usr/share/$(PACKAGE)-management/bin + # Remove configuration in /ur/share/cloudstack-management/webapps/client/WEB-INF + # This should all be in /etc/cloudstack/management + rm $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps/client/WEB-INF/classes/*.* ln -s ../../..$(SYSCONFDIR)/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/conf ln -s ../../../usr/share/tomcat6/lib $(DESTDIR)/usr/share/$(PACKAGE)-management/lib - ln -s ../../java/$(PACKAGE)-server.jar $(DESTDIR)/usr/share/tomcat6/lib/$(PACKAGE)-server.jar ln -s ../../../var/log/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/logs ln -s ../../../var/cache/$(PACKAGE)/management/temp $(DESTDIR)/usr/share/$(PACKAGE)-management/temp ln -s ../../../var/cache/$(PACKAGE)/management/work $(DESTDIR)/usr/share/$(PACKAGE)-management/work From 09f278f9099326016e6f766de6ff7e3d6a14bfa0 Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Fri, 5 Apr 2013 16:42:42 +0200 Subject: [PATCH 09/22] packaging: spark404 should test his commits --- packaging/centos63/cloud.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec index d08a1aed062..8109812e249 100644 --- a/packaging/centos63/cloud.spec +++ b/packaging/centos63/cloud.spec @@ -248,7 +248,7 @@ mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classe ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost/client install python/bindir/cloud-external-ipallocator.py ${RPM_BUILD_ROOT}%{_bindir}/%{name}-external-ipallocator.py -install -D client/target/pythonlibs/jasypt-1.9.0.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/jasypt-1.9.0.jar +install -D client/target/pythonlibs/jasypt-1.9.0.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/lib/jasypt-1.9.0.jar install -D packaging/centos63/cloud-ipallocator.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-ipallocator install -D packaging/centos63/cloud-management.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-management From 171a967437431dca420b33ebf62a249876eeb05f Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Fri, 5 Apr 2013 17:08:15 +0200 Subject: [PATCH 10/22] packaging: Three times is a charm Sorry about this, my packaging test system is out of order :-( --- packaging/centos63/cloud.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec index 8109812e249..328ce59b2bd 100644 --- a/packaging/centos63/cloud.spec +++ b/packaging/centos63/cloud.spec @@ -510,6 +510,7 @@ fi %attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloud_utils.py %attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloud_utils.pyc %attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudutils/* +%attr(0644, root, root) %{_datadir}/%{name}-common/lib/jasypt-1.9.0.jar %doc LICENSE %doc NOTICE From b1c9a340a14c7e4b378dfe9ec4c5af83ad8d4fb6 Mon Sep 17 00:00:00 2001 From: Joe Brockmeier Date: Fri, 5 Apr 2013 10:23:30 -0500 Subject: [PATCH 11/22] adding changes to release notes from work on 4.1. --- docs/en-US/Book_Info_Release_Notes_4-0.xml | 7 +- docs/en-US/Release_Notes.xml | 1963 +------------------ docs/publican-cloudstack/en-US/Feedback.xml | 56 +- 3 files changed, 82 insertions(+), 1944 deletions(-) diff --git a/docs/en-US/Book_Info_Release_Notes_4-0.xml b/docs/en-US/Book_Info_Release_Notes_4-0.xml index 0d57fb6d9a8..9655986cc99 100644 --- a/docs/en-US/Book_Info_Release_Notes_4-0.xml +++ b/docs/en-US/Book_Info_Release_Notes_4-0.xml @@ -18,14 +18,13 @@ specific language governing permissions and limitations under the License. --> - - Version 4.0.0-incubating Release Notes - Revised October 17, 2012 19:49 UTC + + Version 4.1.0 Release Notes Apache CloudStack - Release notes for the Apache CloudStack 4.0.0-incubating release. + Release notes for the Apache CloudStack 4.1.0 release. diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml index 2cedb90a763..f11598f02df 100644 --- a/docs/en-US/Release_Notes.xml +++ b/docs/en-US/Release_Notes.xml @@ -19,26 +19,36 @@ under the License. --> - - - Submitting Feedback and Getting Help - The Apache CloudStack project has mailing lists for users and developers. These are the - official channels of communication for the project and are the best way to get answers about - using and contributing to CloudStack. It's a good idea to subscribe to the cloudstack-users - mailing list if you've deployed or are deploying CloudStack into production, and even for test - deployments. - The CloudStack developer's mailing list (cloudstack-dev) is for discussions about - CloudStack development, and is the best list for discussing possible bugs in CloudStack. - Anyone contributing to CloudStack should be on this mailing list. - You can also report bugs in CloudStack using the Apache Defect Tracking - System. - To posts to the lists, you'll need to be subscribed. See the CloudStack Web site - for instructions. + + + + Welcome to &PRODUCT; 4.1 + Welcome to the 4.1.0 release of &PRODUCT;, the first major release from the Apache CloudStack project since its graduation from the Apache Incubator. + This document contains information specific to this release of &PRODUCT;, including upgrade instructions from prior releases, new features added to &PRODUCT;, API changes, and issues fixed in the release. For installation instructions, please see the Installation Guide. For usage and administration instructions, please see the &PRODUCT; Administrator's Guide. Developers and users who wish to work with the API will find instruction in the &PRODUCT; API Developer's Guide + If you find any errors or problems in this guide, please see . We hope you enjoy working with &PRODUCT;! - Upgrade Instructions + Upgrade Instructions + This section contains upgrade instructions from prior versions of CloudStack to Apache CloudStack 4.1.0. We include instructions on upgrading to Apache CloudStack from pre-Apache versions of Citrix CloudStack (last version prior to Apache is 3.0.2) and from the releases made while CloudStack was in the Apache Incubator. + If you run into any issues during upgrades, please feel free to ask questions on users@apache.cloudstack.org or dev@apache.cloudstack.org. +
+ Upgrade from 4.0.x to 4.1.0 + This section will guide you from Apache CloudStack 4.0.x versions (4.0.0-incubating, 4.0.1-incubating, and 4.0.2) to &PRODUCT; 4.1.0. + Any steps that are hypervisor-specific will be called out with a note. + + + Create RPM or Debian packages (as appropriate) and a repository from the 4.1.0 source, or check the Apache CloudStack downloads page at http://cloudstack.apache.org/downloads.html for package repositories supplied by community members. Instructions for creating packages from the &PRODUCT; source are in the Installation Guide. + + + Stop your management server or servers. Run this on all management server hosts: + # service cloud-management stop + + + Make a backup of your MySQL database. If you run into any issues or need to roll back the upgrade, this will assist in debugging or restoring your existing environment. You'll be prompted for your password. + # mysqldump -u root -p cloud > cloudstack-backup.sql + + +
Upgrade from 3.0.2 to 4.0.0-incubating Perform the following to upgrade from version 3.0.2 to version 4.0.0-incubating. Note @@ -544,8 +554,8 @@ KVM - Name: systemvm-kvm-3.0.0 - Description: systemvm-kvm-3.0.0 + Name: systemvm-kvm-4.1.0 + Description: systemvm-kvm-4.1.0 URL: http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 Zone: Choose the zone where this hypervisor is used @@ -560,8 +570,8 @@ VMware - Name: systemvm-vmware-3.0.0 - Description: systemvm-vmware-3.0.0 + Name: systemvm-vmware-4.1.0 + Description: systemvm-vmware-4.1.0 URL: http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova Zone: Choose the zone where this hypervisor is used @@ -979,369 +989,18 @@ Done restarting router(s).
- - Version 4.0.0-incubating -
- What’s New in 4.0.0-incubating - Apache CloudStack 4.0.0-incubating includes the following new features: -
- Inter-VLAN Routing - Inter-VLAN Routing is the capability to route network traffic between VLANs. This - feature enables you to set up Virtual Private Clouds (VPC) that can hold multi-tier - applications. These tiers are deployed on different VLANs that can communicate with each - other. You can provision VLANs to the tiers your create, and VMs can be deployed on - different tiers, such as Web, Application, or Database. The VLANs are connected to a - virtual router, which facilitates communication between the VMs. In effect, you can - segment VMs by means of VLANs into different networks that can host multi-tier - applications. Such segmentation by means of VLANs logically separate application VMs for - higher security and lower broadcasts, while remaining physically connected to the same - device. - This feature is supported on XenServer and VMware hypervisors. -
-
- Site-to-Site VPN - A Site-to-Site VPN connection helps you establish a secure connection from an - enterprise datacenter to the cloud infrastructure. This allows users to access the guest - VMs by establishing a VPN connection to the virtual router of the account from a device in - the datacenter of the enterprise. Having this facility eliminates the need to establish - VPN connections to individual VMs. - The supported endpoints on the remote datacenters are: - - - Cisco ISR with IOS 12.4 or later - - - Juniper J-Series routers with JunOS 9.5 or later - - -
-
- Local Storage Support for Data Volumes - You can now create data volumes on local storage. The data volume is placed on the - same XenServer host as the VM instance that is attached to the data volume. These local - data volumes can be attached to virtual machines, detached, re-attached, and deleted just - as with the other types of data volume. In earlier releases of CloudStack, only the root - disk could be placed in local storage. - Local storage is ideal for scenarios where persistence of data volumes and HA is not - required. Some of the benefits include reduced disk I/O latency and cost reduction from - using inexpensive local disks. - In order for local volumes to be used, the feature must be enabled for the - zone. - You can create a data disk offering for local storage. When a user creates a new VM, - they can select this disk offering in order to cause the data disk volume to be placed in - local storage. - You can not migrate a VM that has a volume in local storage to a different host, nor - migrate the volume itself away to a different host. If you want to put a host into - maintenance mode, you must first stop any VMs with local data volumes on that host. - Local storage support for volumes is available for XenServer, KVM, and VMware - hypervisors. -
-
- Tags - A tag is a key-value pair that stores metadata about a resource in the cloud. Tags are - useful for categorizing resources. For example, you can tag a user VM with a value that - indicates the user's city of residence. In this case, the key would be "city" and the - value might be "Toronto" or "Tokyo." You can then request CloudStack to find all resources - that have a given tag; for example, VMs for users in a given city. - You can tag a user virtual machine, volume, snapshot, guest network, template, ISO, - firewall rule, port forwarding rule, public IP address, security group, load balancer - rule, project, VPC, network ACL, or static route. You can not tag a remote access - VPN. - You can work with tags through the UI or through the new API commands createTags, - deleteTags, and listTags. You can define multiple tags for each resource. There is no - limit on the number of tags you can define. Each tag can be up to 255 characters long. - Users can define tags on the resources they own, and administrators can define tags on any - resources in the cloud. - A new optional input parameter, "tags," has been added to many of the list* API - commands. The following example shows how to use this new parameter to find all the - volumes having tag region=canada OR tag city=Toronto: - command=listVolumes -&listAll=true -&tags[0].key=region -&tags[0].value=canada -&tags[1].key=city -&tags[1].value=Toronto - The following API commands have the new "tags" input parameter: - - - listVirtualMachines - - - listVolumes - - - listSnapshots - - - listNetworks - - - listTemplates - - - listIsos - - - listFirewallRules - - - listPortForwardingRules - - - listPublicIpAddresses - - - listSecurityGroups - - - listLoadBalancerRules - - - listProjects - - - listVPCs - - - listNetworkACLs - - - listStaticRoutes - - -
-
- AWS API Changes for Tags - Some changes have been made to the Amazon Web Services API compatibility support in - order to accommodate the new tagging feature. - New APIs: - - - - - - - - New API - - - Description - - - - - - - ec2-create-tags - - - Add tags to one or more resources. - - - - - ec2-delete-tags - - - Remove tags from one or more resources. - - - - ec2-describe-tags - - Show currently defined tags. - - - - - - Changed APIs: - - - - - - - - Changed API - - - Description - - - - - - ec2-describe-images - - Output now shows tags defined for each image. - - - - - ec2-describe-instances - - - Output now shows tags defined for each image. - The following filters can now be passed in to limit the output result set: - tag-key, tag-value and tag:key - - - - - ec2-describe-snapshots - - - Output now shows tags defined for each image. - The following filters can now be passed in to limit the output result set: - tag-key, tag-value and tag:key - - - - ec2-describe-volumes - - Output now shows tags defined for each image. - The following filters can now be passed in to limit the output result set: - tag-key, tag-value and tag:key - - - - - -
-
- Secure Console Access on XenServer - With the addition of Secure Console feature, users can now securely access the VM - consoles on the XenServer hypervisor. You can either SSH or use the View Console option in - the Management Server to securely connect to the VMs on the XenServer host. The Management - Server uses the xapi API to stream the VM consoles. However, there is no change in the way - you can access the console of a VM. This feature is supported on XenServer 5.6 and 6.0 - versions. -
-
- Stopped VM - This release supports creating VMs without starting them on the backend. You can - determine whether the VM needs to be started as part of the VM deployment. A VM can be - deployed in two ways: create and start a VM (the default method); create a VM and leave it - in the stopped state. - A new request parameter, startVM, is introduced in the deployVm API to support the - stopped VM feature. The possible values are: - - - true - The VM starts as a part of the VM deployment - - - false - The VM is left in stopped state at the end of the VM deployment - - -
-
- Uploading an Existing Volume to a Virtual Machine - Existing data can now be made accessible to a virtual machine. This is called - uploading a volume to the VM. For example, this is useful to upload data from a local file - system and attach it to a VM. Root administrators, domain administrators, and end users - can all upload existing volumes to VMs. The upload is performed by using HTTP. The - uploaded volume is placed in the zone's secondary storage. - This functionality is supported for the following hypervisors: - - - Hypervisor : Disk Image Format - - - XenServer : VHD - - - VMware : OVA - - - KVM : QCOW2 - - - -
-
- Dedicated High-Availability Hosts - One or more hosts can now be designated for use only by high-availability (HA) enabled - VMs that are restarted due to a host failure. Setting up a pool of such dedicated HA hosts - as the recovery destination for all HA-enabled VMs make it easier to determine which VMs - are restarted as part of the high-availability function. You can designate a host as a - dedicated-HA restart node only if the Dedicated HA Hosts feature is enabled by setting the - appropriate global configuration parameter. -
-
- Support for Amazon Web Services API - This release supports Amazon Web Services APIs, including Elastic Compute Cloud (EC2) - API. Fidelity with the EC2 API and the installation experience for this functionality are - both enhanced. In prior releases, users were required to install a separate component - called CloudBridge, in addition to installing the Management Server. For new installations - of CloudStack 4.0.0-incubating, this software is installed automatically along with - CloudStack and runs in a more closely integrated fashion. The feature is disabled by - default, but can be easily enabled by setting the appropriate global configuration - parameter and performing a few setup steps. -
-
- The Nicira NVP Plugin - The Nicira NVP plug-in allows CloudStack to use the Nicira solution for virtualized - network as a provider for CloudStack networks and services. In CloudStack 4.0.0-incubating - this plug-in supports the Connectivity service. This service is responsible for creating - Layer 2 networks supporting the networks created by guests. When a tenant creates a new - network, instead of a traditional VLAN, a logical network will be created by sending the - appropriate calls to the Nicira NVP Controller. The plug-in has been tested with Nicira - NVP versions 2.1.0, 2.2.0 and 2.2.1. -
-
- The BigSwitch Controller Plugin - The BigSwitch Controller plug-in adds OpenFlow based solution for network virtualization - to CloudStack. The plugin supports both BigSwitch commercial controller and the opensource - Floodlight controller. The plugin functions as a provider for CloudStack networks and Connectivity - service. This service is responsible for creating Layer 2 networks supporting the networks - created by guests. When a tenant creates a new network, a virutal network segment will be - created by sending the appropriate calls to the BigSwitch Controller. -
-
- Support for CAStor Cluster - CloudStack 4.0.0-incubating supports using a CAStor cluster as the back-end storage - system for a CloudStack S3 front-end. The CAStor back-end storage for CloudStack extends - the existing storage classes and allows the storage configuration attribute to point to a - CAStor cluster. This feature makes use of the CloudStack server's local disk to spool - files before writing them to CAStor when handling the PUT operations. However, a file must - be successfully written into the CAStor cluster prior to the return of a success code to - the S3 client to ensure that the transaction outcome is correctly reported. - The S3 multipart file upload is not supported in this release. You are prompted with - proper error message if a multipart upload is attempted. -
-
- Clustered Logical Volume Manager Support for KVM - This release adds Clustered Logical Volume Manager (CLVM) storage support for KVM - hosts. With this support, you can use CLVM as primary storage. - The CLVM support for KVM allows root and data disks (primary storage) to reside on - Linux logical volumes. The administrators are required to configure CLVM on the KVM hosts - independent of CloudStack. When the volume groups are available, an administrator can - simply add primary storage of type CLVM, providing the volume group name. Then CloudStack - creates and manages logical volumes as needed. - CLVM also supports Snapshots. CloudStack creates an LVM snapshot, copy the applicable - logical volume to the secondary storage in the qcow2 format, and then delete the LVM - snapshot. -
-
- Rados Block Device Support for KVM - You can now use Rados Block Device (RBD) to run instances on Apache CloudStack - 4.0.0-incubating. This can be done by adding a RBD pool as primary storage. Before using - RBD, ensure that Qemu is compiled with RBD enabled, and the libvirt version is at least - 0.10 with RBD enabled on the KVM host - Create a disk offering for RBD so that you can ensure that StoragePoolAllocator - chooses the RBD pool to deploy instances. -
+ + Version 4.1.0 +
+ What’s New in 4.1 + Apache CloudStack 4.1.0 includes many new features. This section covers the most prominent new features and changes.
- Issues Fixed in 4.0.0-incubating - Many bugs include a defect number that reflects the bug number that was held in the bug - tracker run by Citrix (bugs.cloudstack.org). The Apache CloudStack project now uses Jira to manage its bugs, so - some of the bugs that are referenced here may not be available to view. However, we are - still including them for completeness. + Issues Fixed in 4.1.0 + Apache CloudStack uses Jira + to track its issues. All new features and bugs for 4.1.0 have been tracked in Jira, and have + a standard naming convention of "CLOUDSTACK-NNNN" where "NNNN" is the issue number. + This section includes a summary of known issues against 4.0.0 that were fixed in 4.1.0. @@ -1357,660 +1016,16 @@ Done restarting router(s). - - Many - vSphere 5.0 now has GA support. Formerly only Beta support was - provided. - CS-16135 Creating volumes after upgrading from snapshot taken in 2.2.14 no longer deletes the snapshot physically from the secondary storage. - - CS-16122 - In a site-to-site VPN setup, alerts are generated when the VPC virtual - router is rebooted with multiple vpn connections. - - - CS-16022 - If host connection fails due to a database error, host now disconnects - and the Managerment Server id is removed. - - - CS-16011 - Name of network offering is no longer truncated due to too-narrow field - width in Add Guest Network dialog box. - - - - CS-15978 - When the virtual router and its host go down, the high availability - mechanism now works for the virtual router. - - - - CS-15921 - The 2.2.x security group script now accounts for the VMs created in the - version 2.1 timeframe. - - - - CS-15919 - A level parameter is added to the listVolumes command; therefore queries - return the response more quickly. - - - CS-15904 - Upgrade from version 2.2.14 to CloudStack-3.0.5-0.2944-rhel5 works as - expected. The upgrade script, - /usr/share/cloud/setup/db/schema-2214to30-cleanup.sql, works as - expected. - - - CS-15879 - The database upgrade from version 3.0.4 to 3.0.5 works as - expected. - - - - CS-15807 - Network label for OVM now available in UI. - - - - CS-15779 - When the thumbnail is requested, the console session will not be - terminated. - - - - CS-15778 - Fetching a VM thumbnail now gets a thumbnail of appropriate visual - dimensions. - - - - CS-15734 - KVM Snapshots no longer shows incorrect disk usage. - - - CS-15733 - The domainId parameter for the listNetworks command now lists the - resources belonging to the domain specified. - - - CS-15676 - Stopping the router no longer fails with the null pointer - exception. - - - - CS-15648 - If creating a volume from a snapshot fails, the error is reported on the - UI but the volume is stuck in the creating state. - - - - CS-15646 - createFirewallRule API no longer causes null pointer - exception. - - - CS-15628 - In a KVM host, the high availability mechanism no longer takes a long - time to migrate VMs to another KVM host if there are multiple storage - pools. - - - CS-15627 - Metadata instance-id and vm-id for existing VMs stays the same after - upgrade. - - - CS-15621 - Solved difficulty with allocating disk volumes when running multiple VM - deployment in parallel. - - - CS-15603 - CloudStack now stop the VMs when destroyVM command is - called. - - - CS-15586 - Public Vlan for an account no longer fails if multiple physical networks - are present. - - - CS-15582 - The dns-name filter is now supported for ec2-describe-instances in the - Amazon Web Services API compatibility commands. The filter maps to the name of a - user VM. - - - CS-15503 - An IP address which has static NAT rules can now be released. - Subsequently, restarting this network after it was shutdown can - succeed. - - - CS-15464 - Can now delete static route whose state is set to Revoke. - - - CS-15443 - Creating a firewall rule no longer fails with an internal server - error. - - - CS-15398 - Corrected technique for programming DNS on the user VMs. - - - CS-15356 - Internal DNS 2 entry now correctly shown in UI. - - - CS-15335 - The CloudBridge S3 Engine now connects to the database by using the - deciphered password in the db.properties file. - - - CS-15318 - UI now correctly prevents the user from stopping a VM that is in the - Starting state. - - - CS-15307 - Fixed Japanese localization of instance statuses in the Instances - menu. - - - CS-15278 - The deployment planner no longer takes long time to locate a suitable - host to deploy VMs when large number of clusters are present. - - - CS-15274 - Creating a VLAN range using Zone ID without network ID now - succeeds. - - - CS-15243 - Now check to be sure source NAT and VPN have same - provider. - - - CS-15232 - Ensure that networks using external load balancer/firewall in 2.2.14 or - earlier can properly upgrade. - - - CS-15200 - No exception when trying to attach the same volume while attaching the - first volume is in progress. - - - CS-15173 - Additional cluster can no longer be added with same VSM IP address as - another cluster. - - - CS-15167 - AWS API calls now honor the admin account's ability to view or act on the - resources owned by the regular users. - - - CS-15163 - The minimum limit is not honored when there is not enough capacity to - deploy all the VMs and the ec2-run-instances command with the -n >n1 -n2> - option is used to deploy multiple VMs. - - - CS-15157 - Can now add/enable service providers for multiple physical networks - through the UI. - - - CS-15145 - AWS API call ec2-register has better error handling for negative - cases. - - - CS-15122 - Filters now supported for AWS API call - ec2-describe-availability-zones. - - - CS-15120 - Actions column in UI of Volume page now shows action - links. - - - CS-15099 - Buttons no longer overlap text on Account Deletion confirmation page in - UI. - - - CS-15095 - Ensures you can not create a VM with a CPU frequency greater than the - host CPU frequency. - - - CS-15094 - CPU cap now set properly in VMware. - - - CS-15077 - NullPointerException is no longer observed while executing the command to - list the public IP in a basic zone created with the default shared NetScaler EIP - and ELB network offering. - - - CS-15044 - UI now provides option to view the list of instances which are part of - the guest network. - - - CS-15026 - UI in Deploy VM dialog now lists only templates or ISOs depending on - which is selected in previous dialog. - - - CS-14989 - In KVM, the Create Instance wizard now shows only templates from the - current (KVM) zone. - - - CS-14986, CS-14985 - Listing filters works as expected in the ec2-describe-volumes and - ec2-describe-snapshots commands. - - - CS-14964 - Automatically starting the Console Proxy no longer fails due to its - missing volume on the primary storage - - - CS-14907 - User is now correctly prevented from trying to download an uploaded - volume which has not yet been moved to primary storage. - - - CS-14879 - When a user VM is stopped or terminated, the static NAT associated with - this VM is now disabled. This public IP address is no longer owned by this account - and can be associated to any other user VM. - - - CS-14854 - Only the admin user can change the template permission to Public, so this - option is removed from the UI for domain Admins and regular Users. - - - CS-14817 - While checking if network has any external provider, CloudStack will - consider all providers in the network. - - - CS-14796 - When deploying a VM with ec2-run-instances, userdata is now - encoded. - - - CS-14770 - The API returns the keypair information when a VM is deployed with - sshkey. This affects the API commands related to virtual machines - (deployVirtualMachine, listVirtualMachines, ... *VirtualMachine), as well as the - corresponding AWS APIs. - - - CS-14724 - UI no longer displays the dropdown list of isolation method choices if - sdn.ovs.controller is false. - - - CS-14345 - Logout API returns XML header. - - - CS-14724 - Host IPs now associated with appropriate IPs according to traffic - type. - - - CS-14253 - Can now delete and re-create port forwarding rule on same - firewall. - - - CS-14724 - UI no longer displays the dropdown list of isolation method choices if - sdn.ovs.controller is false. - - - CS-14452 - Data disk volumes are now automatically copied from one cluster to - another. - - - CS-13539 - Windows VM can get IP after reboot. - - - CS-13537 - When user tries to delete a domain that contains sub-domains, an error - message is now sent to convey the reason for the delete failure. - - - CS-13153 - System VMs support HTTP proxy. - - - CS-12642 - Added Close button to Select Project list view popup in - UI. - - - CS-12510 - Deleting and reinserting host_details no longer causes - deadlocks. - - - CS-12407 - F5 and Netscaler - when dedicated is selected, capacity field is - disabled. - - - CS-12111 - Email validation for edit user form. - - - CS-10928 - Network read/write values now always positive numbers. - - - CS-15376, CS-15373 - The AWS APIs (EC2 and S3) now listen on the 7080 port and send request to - CloudStack on the 8080 port just as any other clients of - CloudStack. - - - CS-13944 - The CloudStack 2.2.x to 3.0.x database upgrade for multiple physical - networks is now supported. - - - CS-15300 - The admin accounts of a domain now honour the limits imposed on that - domain just like the regular accounts do. A domain admin now is not allowed to - create an unlimited number of instances, volumes, snapshots, and so - on. - - - CS-15396 - The CloudStack database now contain the UUD information after the 2.2.14 - to 3.0.4 upgrade. - - - CS-15450 - Upgrade from 2.2.14 to 3.0.4 no longer fails on a VMware - host. - - - CS-15449 - Running cloudstack-aws-api-register no longer fails with the "User - registration failed with error: [Errno 113] No route to host" - error. - - - CS-15455 - The iptable rules are configured to open the awsapi port (7080) as part - of the installation. - - - CS-15429 - While creating an instance with data volume, disk offering also is - considered while checking the account limit on volume resources. - - - CS-15414 - After the 2.2.14 to 3.0.4 upgrade, the value of the global parameter - xen.guest.network.device is now decrypted before setting the traffic - label. - - - CS-15382 - During 2.2.14 to 3.0.4 upgrade, the hosts no longer go to the Alert state - if destroyed networks existed with non-existent tags prior to - upgrade. - - - CS-15323 - CloudStack supports the following Citrix XenServer hotfixes: XS602E003, - XS602E004, and XS602E005. - - - CS-15430 - Create snapshot now fails if creating a snapshot exceeds the snapshot - resource limit for a domain admin or a user account. - - - CS-14256 - Virtual Router no longer remains in starting state for subdomain or user - on a KVM 3.0.1 prerlease host on RHEL 6.2. - - - CS-7495 - Implemented a variety of Xen management host improvements. - - - CS-8105 - NFS v4 for primary storage now works as expected on KVM - hosts. - - - CS-9989 - The error messages returned during VM deployment failure will have much - more details than before. - - - CS-12584 - You can no longer add security groups not supported by the hypervisor in - use. - - - CS-12705 - When creating a Network offering by using SRX as the service provider for - SourceNAT servcies, an option is given in the CloudStack UI now to set the - source_nat type to "per Zone"/"per account". - - - CS-12782 - Assigning a VM from Basic to Advanced zone no longer ignores the network - ID. A warning message is displayed for VM movements across zones. - - - CS-12591 - Broadcast Address on the Second Public IP NIC is now - corrected. - - - CS-13272 - When a user is deleted, all the associated properties, such as IPs and - virtual routers, are now deleted. - - - CS-13377 - Creating template from a root disk of a stopped instance now provides an - option to make it a "Featured template". - - - CS-13500 - Reaching the first guest VM by using its public IP from the second guest - VM no longer fails. - - - CS-13853 - The default gateway can no longer be 0.0.0.0 in the Secondary Storage VM - (SSVM). - - - CS-13863 - The queryAsyncJobResult command in XML format now returns the correct - UUIDs. - - - CS-13867 - Corrected CSP xenserver-cloud-supp.tgz for XenServer 5.6 and - 6.0. - - - CS-13904 - Labels and values for the service offerings CPU and memory are now - consistent. - - - CS-13998 - The SSVM kernel panic issue is fixed on XenServer. - - - CS-14090 - The issue is fixed where running the VMware snapshots randomly fails with - the ArrayIndexOutOfBoundsException error. - - - CS-14021 - The java.lang.OutOfMemoryError is fixed on the Management - Server. - - - CS-14025 - The Python Eggs are provided to easily package the test client for each - branch of CloudStack. - - - CS-14068 - Resetting the VM password through the CloudStack UI no longer causes any - error. - - - CS-14156 - The pod which has the administrator's virtual router is no longer - selected while creating the virtual routers for guests. - - - CS-14182 - The users can now delete their ISOs as normal users. - - - CS-14185 - The listOSTypes API now filters out the types of operating system by - using the keywords. - - - CS-14204 - The cloud-setup-bonding.sh command no longer generates the "command not - found" error. - - - CS-14214 - The Specify VLAN option cannot be enabled now for an isolated Network - offering with SourceNAT enabled. - - - CS-14234 - Sending project invite email to an account now requires SMTP configured - in CloudStack. - - - CS-14237 - The garbage collector of the primary storage no longer fails when the - first host in the cluster is not up. - - - CS-14241 - Custom Volume Disk Offering is now matching the Global configuration - value. - - - CS-14270 - The listNetworks API no longer assumes that the broadcast type is always - VLAN. - - - CS-14319 - The internal name of the VM is no longer present in the error message - that is displayed to a domain administrator. - - - CS-14321 - The listVolumes API call now returns a valid value for the isExtractable - parameter for the ISO-derived disk and data disk volumes. - - - CS-14323 - Invalid API calls will now give valid response in json/xml - format. - - - CS-14339 - Custom Disk Size will now allow values larger than 100GB. - - - CS-14357 - The ConsoleProxyLoadReportCommand is no longer fired - continuously. - - - CS-14421 - Fixed the issue of virtual router deployments. The DHCP entries can now - be assigned to the router. - - - CS-14555 - Unzipped downloaded template MD5SUM will no longer override the zipped - template MD5SUM in the database. - - - CS-14598 - The complete screen of the running VM is now displayed in the console - proxy. - - - CS-14600 - Windows or Linux based consoles are no longer lost upon rebooting - VMs. - - - CS-14784 - Multiple subnets with the same VLAN now work as expected. - - - CS-13303, 14874, 13897, 13944, 14088, 14190 - A variety of upgrade issues have been fixed in release - 3.0.3. - - - CS-15080 - Setting a private network on a VLAN for VMWare environment is now - supported. - - - CS-15168 - The console proxy now works as expected and no exception is shown in the - log after upgrading from version 2.2.14 to 3.0.2. - - - CS-15172 - Version 3.0.2 now accepts the valid public key. -
-
+
Known Issues in 4.0.0-incubating @@ -2035,898 +1050,12 @@ Done restarting router(s). environment. The functionality is not complete at this time. - - CLOUDSTACK-368 - OVM - cannot create guest VM - This source code release has regressed from the CloudStack 2.2.x code - and is unable to support Oracle VM (OVM). - - - - CLOUDSTACK-279 - Deleting a project fails when executed by the regular user. This works as - expected for root/domain admin. To workaround, perform either of the - following: - - Use the account cleanup thread which will eventually complete the project - deletion. - - - Execute the call as the root/domain admin on behalf of the regular - user. - - - - - - CS-16067 - The command=listTags&key=city command does not work as expected. The - command does not return tags for the resources of the account with the tag, city - - - - - CS-16063 - The current values of volumes and snapshots are incorrect when using KVM - as a host. To fix this, the database upgrade codes, volumes.size and - snapshots.size, should be changed to show the virtual sizes. - - - - CS-16058 - Null pointer Exception while deleting the host after moving the host to - maintenance state. - - - - CS-16045 - Only the root administrator can handle the API keys. The domain - administrators are not allowed to create, delete, or retrieve API keys for the - users in their domain. - - - - CS-16019 - CIDR list in the Add VPN Customer Gateway dialog does not prompt the user - that they can provide a comma separated CIDRs if multiple CIDRs have to be - supplied. - - - - CS-16015 - Deleting a network is not supported when its network providers are - disabled. - - - - CS-16012 - Unable to delete a zone in the UI because the necessary cleanup cannot be - completed. When the hosts are removed, the expunge process fails to delete the - volumes as no hosts are present to send the commands to. Therefore, the storage - pool removal fails, and zone can't be cleaned and deleted. - - - - CS-16011 - Name of network offering might be truncated due to too-narrow field width - in Add Guest Network dialog box. - - - - CS-15789 - Invalid global setting prevents management server to restart. For - example, if you configure the "project.invite.timeout" parameter to "300" and - attempt to restart management server, it fails without throwing a warning or - setting the value to the default. - - - - CS-15749 - Restarting VPC is resulting in intermittent connection loss to the port - forwarding and StaticNAT rules. - - - - CS-15690 - The IpAssoc command failed as a part of starting the virtual router, but - the final start result is reported as succes. - - - - CS-15672, CS-15635 - The FQDN of the VM is not configured if it is deployed as a part of - default shared network and isolated guest network - (DefaultIsolatedNetworkOfferingWithSourceNatService). - - - - CS-15634 - The FQDN of a VM that is deployed as a part of both a shared network and - default isolated guest network has the suffix of the shared network instead of the - default isolated guest network. - - - - CS-15576 - Stopping a VM on XenServer creates a backlog of API commands. For - example, the Attach volume calls become delayed while waiting for the - stopVirtualMachine command to be executed. - - - - CS-15569 - Misleading error message in the exception when creating a StaticNAT rule - fails in a VPC. - - - - CS-15566 - External device such as Netscaler is not supported in VPC. - - - CS-15557 - Intermittent traffic loss in the VPN connection if Juniper is the remote - router and the life time is 300 seconds. - - - - CS-15361 - Egress rules are not working in NetScaler loadbalancer. - - - - CS-15163 - The minimum limit is not honored when there is not enough capacity to - deploy all the VMs and the ec2-run-instances command with the -n >n1 -n2> - option is used to deploy multiple VMs. - - - CS-15105 - The cloud-sysvmadm script does not work if the integration.api.port - parameter is set to any port other than 8096. - - - CS-15092 - Connecting to the guest VMs through SSH is extremely slow, and it results - in connection timeout. - - - CS-15037 - Hairpin NAT is not supported when NetScaler is used for - EIP. - - - CS-15009 - The port_profile table will not be populated with port profile - information. In this release, CloudStack directly connects to the VSM for all the - port profile operations; therefore, no port profile information is - cached. - - - CS-14939 - Adding a VMware cluster is not supported when the Management Network is - migrated to the Distributed Virtual Switch environment. - - - CS-14780 - You are allowed to ping the elastic IP address of the VM even though no - ingress rule is set that allows the ICMP protocol. - - - CS-14756 - Installing KVM on RHEL 6.2 will result in unreliable network performance. - Workaround: blacklist vhost-net. Edit /etc/modprobe.d/blacklist-kvm.conf and - include vhost-net. - - - CS-14346 - The UpdateVirtualMachine API call does not check whether the VM is - stopped. Therefore, stop the VM manually before issuing this call. - - - CS-14303 (was 14537) - The IP addresses for a shared network are still being consumed even if no - services are defined for that network. - - - CS-14296 (was 14530) - OVM: Network traffic labels are not supported. - - - CS-14291 (was 14523) - The EIP/ELB network offering for basic zones does not support multiple - NetScalers. - - - CS-14275 (was 14506) - F5: Unable to properly remove a F5 device. - - - CS-14201 (was 14430) - VMWare: Template sizes are being reported different depending on whether - the primary storage is using ISCSI or NFS. - - - CS-13758 (was 13963) - vSphere: template download from templates created off of the root volume - does not work properly. - - - CS-13733 (was 13935) - vSphere: detaching an ISO from a restored VM instance - fails. - - - CS-13682 (was 13883) - Multiple NetScalers are not supported in Basic Networking. - - - CS-13599 (was 13359) - Programming F5/NetScaler rules can be better optimized. - - - CS-13337 (was 13518) - Security Groups are not supported in Advanced Networking - - - CS-13173 (was 13336) - vSphere: cross cluster volume migration does not work - properly. - - - CS-12714 (was 12840) - Capacity view is not available for pods or clusters. - - - CS-12624 (was 12741) - vSphere: maintenance mode will not live migrate system VM to another - host. - - - - CS-15476 - - - The 2.2.14 to 4.0.0-incubating upgrade fails if multiple untagged physical - networks exist before the upgrade. - - - - - CS-15407 - - - After the 2.2.14 to 4.0.0-incubating upgrade, VLAN allocation on multiple - physical networks does not happen as expected. - To workaround this issue, follow the instructions given below: - - - Revert to your 2.2.14 setup. - - - Stop all the VMs with the isolated virtual networks in your cloud - setup. - - - Run following query to find if any networks still have the NICs - allocated: - - - Check if any virtual guest networks have the NICs allocated: - #SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual'; - - - If this returns any network IDs, then ensure the following: - - - All the VMs are stopped. - - - No new VM is started. - - - Shutdown the Management Server. - - - - - Remove the NICs count for the virtual network IDs returned in step - (a), and set the NIC count to 0: - UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE id = enter id of virtual network - - - Restart the Management Server, and wait for all the networks to shut - down. - - Networks shutdown is determined by the network.gc.interval and - network.gc.wait parameters. - - - - - - Ensure that all the networks are shut down and all the guest VNETs are - free. - - - Run the upgrade script. - This allocates all your guest VNET ranges to the first physical - network. - - - By using the updatePhysicalNetwork API, reconfigure the VNET ranges for - each physical network as desired. - - - Start all the VMs. - - - - - - - CS-14680 - - - CloudStack and LDAP user validation cannot happen simultaneously because the - user password is hashed and stored in the database, and LDAP requires the - passwords in plain text. - To work with the LDAP user, the MD5 hash should be disabled in the login - process by commenting the following variable in sharedFunctions.js file available - at /usr/share/cloud/management/webapps/client/scripts, and restart the - cloud-management service. - var md5HashedLogin = false; - However, if md5HashedLogin is set to false, the end user can login with the - LDAP credentials but not with the CloudStack user credentials. - - - - CS-14346 - The UpdateVirtualMachine API call does not check whether the VM is - stopped. Therefore, stop the VM manually before issuing this call. - - - CS-15130 - Data disk volumes are not automatically copied from one cluster to - another. - - - CS-14780 - You are allowed to ping the elastic IP address of the VM even though no - ingress rule is set that allows the ICMP protocol. - - - CS-14939 - Adding a VMware cluster is not supported when the Management Network is - migrated to the Distributed Virtual Switch environment. - - - CS-15009 - The port_profile table will not be populated with port profile - information. In this release, CloudStack directly connects to the VSM for all the - port profile operations; therefore, no port profile information is - cached. - - - CS-15037 - Hairpin NAT is not supported when NetScaler is used for - EIP. - - - CS-15092 - Connecting to the guest VMs through SSH is extremely slow, and it results - in connection timeout. - - - CS-15105 - The cloud-sysvmadm script does not work if the integration.api.port - parameter is set to any port other than 8096. - - - CS-15163 - The minimum limit is not honored when there is not enough capacity to - deploy all the VMs and the ec2-run-instances command with the -n >n1 -n2> - option is used to deploy multiple VMs. - - - - -
- - - API Changes from 3.0.2 to 4.0.0-incubating -
- New API Commands in 4.0.0-incubating - - - createCounter (Adds metric counter) - - - deleteCounter (Deletes a counter) - - - listCounters (List the counters) - - - createCondition (Creates a condition) - - - deleteCondition (Removes a condition) - - - listConditions (List Conditions for the specific user) - - - createTags. Add tags to one or more resources. Example: - command=createTags -&resourceIds=1,10,12 -&resourceType=userVm -&tags[0].key=region -&tags[0].value=canada -&tags[1].key=city -&tags[1].value=Toronto - - - deleteTags. Remove tags from one or more resources. Example: - command=deleteTags -&resourceIds=1,12 -&resourceType=Snapshot -&tags[0].key=city - - - listTags (Show currently defined resource tags) - - - createVPC (Creates a VPC) - - - listVPCs (Lists VPCs) - - - deleteVPC (Deletes a VPC) - - - updateVPC (Updates a VPC) - - - restartVPC (Restarts a VPC) - - - createVPCOffering (Creates VPC offering) - - - updateVPCOffering (Updates VPC offering) - - - deleteVPCOffering (Deletes VPC offering) - - - listVPCOfferings (Lists VPC offerings) - - - createPrivateGateway (Creates a private gateway) - - - listPrivateGateways (List private gateways) - - - deletePrivateGateway (Deletes a Private gateway) - - - createNetworkACL (Creates a ACL rule the given network (the network has to belong to - VPC)) - - - deleteNetworkACL (Deletes a Network ACL) - - - listNetworkACLs (Lists all network ACLs) - - - createStaticRoute (Creates a static route) - - - deleteStaticRoute (Deletes a static route) - - - listStaticRoutes (Lists all static routes) - - - createVpnCustomerGateway (Creates site to site vpn customer gateway) - - - createVpnGateway (Creates site to site vpn local gateway) - - - createVpnConnection (Create site to site vpn connection) - - - deleteVpnCustomerGateway (Delete site to site vpn customer gateway) - - - deleteVpnGateway (Delete site to site vpn gateway) - - - deleteVpnConnection (Delete site to site vpn connection) - - - updateVpnCustomerGateway (Update site to site vpn customer gateway) - - - resetVpnConnection (Reset site to site vpn connection) - - - listVpnCustomerGateways (Lists site to site vpn customer gateways) - - - listVpnGateways (Lists site 2 site vpn gateways) - - - listVpnConnections (Lists site to site vpn connection gateways) - - - markDefaultZoneForAccount (Marks a default zone for the current account) - - - uploadVolume (Uploads a data disk) - - -
-
- Changed API Commands in 4.0.0-incubating - - - - - - - API Commands - Description - - - - - - copyTemplate - prepareTemplate - registerTemplate - updateTemplate - createProject - activateProject - suspendProject - updateProject - listProjectAccounts - createVolume - migrateVolume - attachVolume - detachVolume - uploadVolume - createSecurityGroup - registerIso - copyIso - updateIso - createIpForwardingRule - listIpForwardingRules - createLoadBalancerRule - updateLoadBalancerRule - createSnapshot - - - The commands in this list have a single new response parameter, and no other - changes. - New response parameter: tags(*) - - Many other commands also have the new tags(*) parameter in addition to other - changes; those commands are listed separately. - - - - - rebootVirtualMachine - attachIso - detachIso - listLoadBalancerRuleInstances - resetPasswordForVirtualMachine - changeServiceForVirtualMachine - recoverVirtualMachine - startVirtualMachine - migrateVirtualMachine - deployVirtualMachine - assignVirtualMachine - updateVirtualMachine - restoreVirtualMachine - stopVirtualMachine - destroyVirtualMachine - - - The commands in this list have two new response parameters, and no other - changes. - New response parameters: keypair, tags(*) - - - - - listSecurityGroups - listFirewallRules - listPortForwardingRules - listSnapshots - listIsos - listProjects - listTemplates - listLoadBalancerRules - - The commands in this list have the following new parameters, and no other - changes. - New request parameter: tags (optional) - New response parameter: tags(*) - - - - - listF5LoadBalancerNetworks - listNetscalerLoadBalancerNetworks - listSrxFirewallNetworks - updateNetwork - - - The commands in this list have three new response parameters, and no other - changes. - New response parameters: canusefordeploy, vpcid, tags(*) - - - - - createZone - updateZone - - The commands in this list have the following new parameters, and no other - changes. - New request parameter: localstorageenabled (optional) - New response parameter: localstorageenabled - - - - listZones - New response parameter: localstorageenabled - - - - rebootRouter - changeServiceForRouter - startRouter - destroyRouter - stopRouter - - The commands in this list have two new response parameters, and no other - changes. - New response parameters: vpcid, nic(*) - - - - updateAccount - disableAccount - listAccounts - markDefaultZoneForAccount - enableAccount - - The commands in this list have three new response parameters, and no - other changes. - New response parameters: vpcavailable, vpclimit, vpctotal - - - listRouters - - New request parameters: forvpc (optional), vpcid (optional) - New response parameters: vpcid, nic(*) - - - - listNetworkOfferings - - New request parameters: forvpc (optional) - New response parameters: forvpc - - - - listVolumes - - New request parameters: details (optional), tags (optional) - New response parameters: tags(*) - - - - addTrafficMonitor - - New request parameters: excludezones (optional), includezones - (optional) - - - - createNetwork - - New request parameters: vpcid (optional) - New response parameters: canusefordeploy, vpcid, tags(*) - - - - listPublicIpAddresses - - New request parameters: tags (optional), vpcid (optional) - New response parameters: vpcid, tags(*) - - - - listNetworks - - New request parameters: canusefordeploy (optional), forvpc (optional), tags - (optional), vpcid (optional) - New response parameters: canusefordeploy, vpcid, tags(*) - - - - restartNetwork - - New response parameters: vpcid, tags(*) - - - - enableStaticNat - - New request parameter: networkid (optional) - - - - createDiskOffering - - New request parameter: storagetype (optional) - New response parameter: storagetype - - - - listDiskOfferings - - New response parameter: storagetype - - - - updateDiskOffering - - New response parameter: storagetype - - - - createFirewallRule - - Changed request parameters: ipaddressid (old version - optional, new version - - required) - New response parameter: tags(*) - - - - listVirtualMachines - - New request parameters: isoid (optional), tags (optional), templateid - (optional) - New response parameters: keypair, tags(*) - - - - updateStorageNetworkIpRange - - New response parameters: id, endip, gateway, netmask, networkid, podid, - startip, vlan, zoneid - - - - reconnectHost - A new response parameter is added: hahost. - - - addCluster - The following request parameters are added: - - - vsmipaddress (optional) - - - vsmpassword (optional) - - - vsmusername (optional) - - - The following parameter is made mandatory: podid - - - - listVolumes - A new response parameter is added: status - - - migrateVolume - A new response parameter is added: status - - - prepareHostForMaintenance - A new response parameter is added: hahost. - - - addSecondaryStorage - A new response parameter is added: hahost. - - - enableAccount - A new response parameter is added: defaultzoneid - - - attachVolume - A new response parameter is added: status - - - cancelHostMaintenance - A new response parameter is added: hahost - - - addSwift - A new response parameter is added: hahost - - - listSwifts - A new response parameter is added: hahost - - - listExternalLoadBalancers - A new response parameter is added: hahost - - - createVolume - A new response parameter is added: status - - - listCapabilities - A new response parameter is added: - customdiskofferingmaxsize - - - disableAccount - A new response parameter is added: defaultzoneid - - - deployVirtualMachine - A new request parameter is added: startvm (optional) - - - deleteStoragePool - A new request parameter is added: forced (optional) - - - updateAccount - A new response parameter is added: defaultzoneid - - - addHost - A new response parameter is added: hahost - - - updateHost - A new response parameter is added: hahost - - - detachVolume - A new response parameter is added: status - - - listAccounts - A new response parameter is added: defaultzoneid - - - listHosts - A new response parameter is added: hahostA new request - parameter is added: hahost (optional) -
+ diff --git a/docs/publican-cloudstack/en-US/Feedback.xml b/docs/publican-cloudstack/en-US/Feedback.xml index fb457a9ca86..8aa5f67dc2b 100644 --- a/docs/publican-cloudstack/en-US/Feedback.xml +++ b/docs/publican-cloudstack/en-US/Feedback.xml @@ -2,33 +2,43 @@ -
- We Need Feedback! - +
+ Submitting Feedback and Getting Help + feedback1 - contact information for this brand + contact information for this brand - If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a bug: https://issues.apache.org/jira/browse/CLOUDSTACK against the component Doc. + If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a bug: https://issues.apache.org/jira/browse/CLOUDSTACK against the component Doc. If you have a suggestion for improving the documentation, try to be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily. - Better yet, feel free to submit a patch if you would like to enhance the documentation. Our documentation is, along with the rest of the CloudStack source code, kept in the project's git repository. + Better yet, feel free to submit a patch if you would like to enhance the documentation. Our documentation is, along with the rest of the &PRODUCT; source code, kept in the project's git repository. + The most efficient way to get help with &PRODUCT; is to ask on the mailing lists. + The Apache CloudStack project has mailing lists for users and developers. These are the + official channels of communication for the project and are the best way to get answers about + using and contributing to CloudStack. It's a good idea to subscribe to the + users@cloudstack.apache.org mailing list if you've deployed or are deploying + CloudStack into production, and even for test deployments. + The CloudStack developer's mailing list (dev@cloudstack.apache.org) is for discussions + about CloudStack development, and is the best list for discussing possible bugs in CloudStack. + Anyone contributing to CloudStack should be on this mailing list. + To posts to the lists, you'll need to be subscribed. See the + CloudStack Web site + for instructions.
- - From 5610749e2957b74a8ebbdfa2b3c4ba5074be29dc Mon Sep 17 00:00:00 2001 From: Prasanna Santhanam Date: Fri, 5 Apr 2013 21:04:51 +0530 Subject: [PATCH 12/22] simulator context : finalize the simulator spring context This context is similar to the componentContext.xml.in but loads simulator components for the marvin tests. --- .../simulatorComponentContext.xml.in | 223 ++++++++---------- 1 file changed, 104 insertions(+), 119 deletions(-) diff --git a/client/tomcatconf/simulatorComponentContext.xml.in b/client/tomcatconf/simulatorComponentContext.xml.in index 1cb9f6f2b63..fc5cf540bd0 100644 --- a/client/tomcatconf/simulatorComponentContext.xml.in +++ b/client/tomcatconf/simulatorComponentContext.xml.in @@ -1,22 +1,22 @@ + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> - - + + + + - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - - - - - + + + @@ -140,7 +106,10 @@ - + + + + @@ -149,13 +118,9 @@ - - - - - - - + + + @@ -164,13 +129,62 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -183,39 +197,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + From 348afc8aaf39a969bdad19d54026c293b38dbd67 Mon Sep 17 00:00:00 2001 From: Chip Childers Date: Fri, 5 Apr 2013 16:44:08 +0100 Subject: [PATCH 13/22] Removing waf legal docs Signed-off-by: Chip Childers --- LICENSE | 64 ---------------------- tools/whisker/LICENSE | 64 ---------------------- tools/whisker/descriptor-for-packaging.xml | 24 -------- tools/whisker/descriptor.xml | 24 -------- 4 files changed, 176 deletions(-) diff --git a/LICENSE b/LICENSE index 6b81a9140e9..2094d029e90 100644 --- a/LICENSE +++ b/LICENSE @@ -180,70 +180,6 @@ Copyright (c) 2013 The Apache Software Foundation This distribution contains third party resources. -Within the . directory - licensed under the BSD (3-clause) http://www.opensource.org/licenses/BSD-3-Clause (as follows) - - Copyright (c) 2005-2010 Thomas Nagy - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. - - from Thomas Nagy http://code.google.com/p/waf/ - waf - -Within the awsapi directory - licensed under the BSD (3-clause) http://www.opensource.org/licenses/BSD-3-Clause (as follows) - - Copyright (c) 2005-2010 Thomas Nagy - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. - - from Thomas Nagy http://code.google.com/p/waf/ - waf - Within the console-proxy/js directory licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) diff --git a/tools/whisker/LICENSE b/tools/whisker/LICENSE index 2e17633f464..299b53bb70b 100644 --- a/tools/whisker/LICENSE +++ b/tools/whisker/LICENSE @@ -180,70 +180,6 @@ Copyright (c) 2013 The Apache Software Foundation This distribution contains third party resources. -Within the . directory - licensed under the BSD (3-clause) http://www.opensource.org/licenses/BSD-3-Clause (as follows) - - Copyright (c) 2005-2010 Thomas Nagy - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. - - from Thomas Nagy http://code.google.com/p/waf/ - waf - -Within the awsapi directory - licensed under the BSD (3-clause) http://www.opensource.org/licenses/BSD-3-Clause (as follows) - - Copyright (c) 2005-2010 Thomas Nagy - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. - - from Thomas Nagy http://code.google.com/p/waf/ - waf - Within the console-proxy/js directory licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) diff --git a/tools/whisker/descriptor-for-packaging.xml b/tools/whisker/descriptor-for-packaging.xml index ed2c9360112..66099ae61a1 100644 --- a/tools/whisker/descriptor-for-packaging.xml +++ b/tools/whisker/descriptor-for-packaging.xml @@ -2275,10 +2275,6 @@ Innovation Centre, 2006 (http://www.it-innovation.soton.ac.uk). id='apache.org.2' name='The Apache Software Foundation' url='http://www.apache.org/'/> - - - - -Copyright (c) 2005-2010 Thomas Nagy - - - - - - @@ -2646,16 +2632,6 @@ Copyright (c) 2012 John Resig, Jörn Zaefferer - - - -Copyright (c) 2005-2010 Thomas Nagy - - - - - - diff --git a/tools/whisker/descriptor.xml b/tools/whisker/descriptor.xml index 0b3e508a124..0b8d20f83b2 100644 --- a/tools/whisker/descriptor.xml +++ b/tools/whisker/descriptor.xml @@ -2271,10 +2271,6 @@ Innovation Centre, 2006 (http://www.it-innovation.soton.ac.uk). id='apache.org.2' name='The Apache Software Foundation' url='http://www.apache.org/'/> - - - - -Copyright (c) 2005-2010 Thomas Nagy - - - - - - @@ -2630,16 +2616,6 @@ Copyright (c) 2012 John Resig, Jörn Zaefferer - - - -Copyright (c) 2005-2010 Thomas Nagy - - - - - - From 57611253dd1c2b292690fd069aa101126d31fa3d Mon Sep 17 00:00:00 2001 From: Joe Brockmeier Date: Fri, 5 Apr 2013 11:34:04 -0500 Subject: [PATCH 14/22] CLOUDSTACK-1747: Adding this to known issues. --- docs/en-US/Release_Notes.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml index f11598f02df..be0267dd4b3 100644 --- a/docs/en-US/Release_Notes.xml +++ b/docs/en-US/Release_Notes.xml @@ -1026,7 +1026,7 @@ Done restarting router(s).
- Known Issues in 4.0.0-incubating + Known Issues in 4.1.0 @@ -1042,6 +1042,12 @@ Done restarting router(s). + + CLOUDSTACK-1747 + mvn deploydb only creates 4.0 DB, not 4.1 + Due to tooling changes between 4.1 and 4.2, CloudStack's database is created using the 4.0 schema and updated to the 4.1 schema when the management server starts for the first time. It's OK to see the same schema if the management server has not started yet. + + CLOUDSTACK-301 Nexus 1000v DVS integration is not functional From aa23dcc95654b776f105c520d51855b36378b9ae Mon Sep 17 00:00:00 2001 From: Wido den Hollander Date: Fri, 5 Apr 2013 18:52:12 +0200 Subject: [PATCH 15/22] debian: Install the LICENSE and NOTICE files These will be installed in /usr/share/doc// --- debian/rules | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/debian/rules b/debian/rules index 912ec7fa605..f05277ed5d1 100755 --- a/debian/rules +++ b/debian/rules @@ -154,10 +154,7 @@ install: binary: install dh_install dh_installchangelogs - dh_installdocs LICENSE - dh_installdocs DISCLAIMER - dh_installdocs NOTICE - dh_installdocs INSTALL.md + dh_installdocs -A tools/whisker/LICENSE tools/whisker/NOTICE INSTALL.md dh_installman dh_link dh_strip From 1f206a4eb1b8ce8bed71024bcd227ee4380b6a22 Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Fri, 5 Apr 2013 18:49:44 +0200 Subject: [PATCH 16/22] rpm: Install the LICENSE and NOTICE files --- packaging/centos63/cloud.spec | 38 ++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec index 328ce59b2bd..a3e0de2889e 100644 --- a/packaging/centos63/cloud.spec +++ b/packaging/centos63/cloud.spec @@ -312,6 +312,20 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classe rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/NOTICE.txt rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/services.xml +#License files from whisker +install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-management-%{version}/NOTICE +install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-management-%{version}/LICENSE +install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-common-%{version}/NOTICE +install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-common-%{version}/LICENSE +install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-agent-%{version}/NOTICE +install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-agent-%{version}/LICENSE +install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-usage-%{version}/NOTICE +install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-usage-%{version}/LICENSE +install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-awsapi-%{version}/NOTICE +install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-awsapi-%{version}/LICENSE +install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-cli-%{version}/NOTICE +install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-cli-%{version}/LICENSE + %clean [ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} @@ -487,8 +501,8 @@ fi %attr(0755,root,root) %{_bindir}/%{name}-external-ipallocator.py %attr(0755,root,root) %{_initrddir}/%{name}-ipallocator %dir %attr(0770,root,root) %{_localstatedir}/log/%{name}/ipallocator -%doc LICENSE -%doc NOTICE +%{_defaultdocdir}/%{name}-management-%{version}/LICENSE +%{_defaultdocdir}/%{name}-management-%{version}/NOTICE %files agent %attr(0755,root,root) %{_bindir}/%{name}-setup-agent @@ -498,8 +512,8 @@ fi %dir %{_localstatedir}/log/%{name}/agent %attr(0644,root,root) %{_datadir}/%{name}-agent/lib/*.jar %dir %{_datadir}/%{name}-agent/plugins -%doc LICENSE -%doc NOTICE +%{_defaultdocdir}/%{name}-agent-%{version}/LICENSE +%{_defaultdocdir}/%{name}-agent-%{version}/NOTICE %files common %dir %attr(0755,root,root) %{_libdir}/python2.6/site-packages/cloudutils @@ -511,8 +525,8 @@ fi %attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloud_utils.pyc %attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudutils/* %attr(0644, root, root) %{_datadir}/%{name}-common/lib/jasypt-1.9.0.jar -%doc LICENSE -%doc NOTICE +%{_defaultdocdir}/%{name}-common-%{version}/LICENSE +%{_defaultdocdir}/%{name}-common-%{version}/NOTICE %files usage %attr(0755,root,root) %{_sysconfdir}/init.d/%{name}-usage @@ -520,15 +534,15 @@ fi %attr(0644,root,root) %{_datadir}/%{name}-usage/lib/*.jar %dir /var/log/%{name}/usage %dir %{_sysconfdir}/%{name}/usage -%doc LICENSE -%doc NOTICE +%{_defaultdocdir}/%{name}-usage-%{version}/LICENSE +%{_defaultdocdir}/%{name}-usage-%{version}/NOTICE %files cli %attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudapis.py %attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudtool/__init__.py %attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudtool/utils.py -%doc LICENSE -%doc NOTICE +%{_defaultdocdir}/%{name}-cli-%{version}/LICENSE +%{_defaultdocdir}/%{name}-cli-%{version}/NOTICE #%files docs #%doc LICENSE @@ -540,8 +554,8 @@ fi %attr(0644,root,root) %{_datadir}/%{name}-bridge/setup/* %attr(0755,root,root) %{_bindir}/cloudstack-aws-api-register %attr(0755,root,root) %{_bindir}/cloudstack-setup-bridge -%doc LICENSE -%doc NOTICE +%{_defaultdocdir}/%{name}-awsapi-%{version}/LICENSE +%{_defaultdocdir}/%{name}-awsapi-%{version}/NOTICE %changelog From 6e22843acb6bbd61260849fac171bba61ac6650f Mon Sep 17 00:00:00 2001 From: Funs Kessen Date: Fri, 5 Apr 2013 22:25:34 +0530 Subject: [PATCH 17/22] Cloudmonkey requester.py change to return clearer errors and implement a logic change for async calls. Applied from review request: https://reviews.apache.org/r/10151/ Signed-off-by: Rohit Yadav --- tools/cli/cloudmonkey/requester.py | 57 ++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/tools/cli/cloudmonkey/requester.py b/tools/cli/cloudmonkey/requester.py index 5c4cd1e36fa..d58c1af4683 100644 --- a/tools/cli/cloudmonkey/requester.py +++ b/tools/cli/cloudmonkey/requester.py @@ -32,6 +32,7 @@ try: import types import urllib import urllib2 + from urllib2 import urlopen, HTTPError except ImportError, e: print "Import error in %s : %s" % (__name__, e) @@ -77,19 +78,20 @@ def make_request(command, args, logger, host, port, logger_debug(logger, "Request sent: %s" % request_url) connection = urllib2.urlopen(request_url) response = connection.read() - except Exception, e: - error = str(e) + except HTTPError, e: + error = "%s: %s" % (e.msg, e.info().getheader('X-Description')) logger_debug(logger, "Response received: %s" % response) if error is not None: - logger_debug(logger, error) + logger_debug(logger, "Error: error is not None, %s" % (error)) + return response, error return response, error def monkeyrequest(command, args, isasync, asyncblock, logger, host, port, apikey, secretkey, timeout, protocol, path): - + fcommand = command response = None error = None logger_debug(logger, "======== START Request ========") @@ -106,7 +108,8 @@ def monkeyrequest(command, args, isasync, asyncblock, logger, host, port, response = json.loads(str(response)) except ValueError, e: error = "Error processing json response, %s" % e - logger_debug(logger, "Error processing json", e) + logger_debug(logger, "Error processing json: %s" % e) + return response response = process_json(response) @@ -125,29 +128,63 @@ def monkeyrequest(command, args, isasync, asyncblock, logger, host, port, progress = 1 while timeout > 0: print '\r' + '.' * progress, - time.sleep(pollperiod) - timeout = timeout - pollperiod + sys.stdout.flush() progress += 1 + timeout = timeout - pollperiod logger_debug(logger, "Job %s to timeout in %ds" % (jobid, timeout)) sys.stdout.flush() - response, error = monkeyrequest(command, request, isasync, + if re.match("queryAsyncJobResult", fcommand): + # logger_debug(logger, "%d loop: Job %s" % (progress, jobid)) + # sys.stdout.flush() + time.sleep(pollperiod) + else: + response, error = monkeyrequest(command, request, isasync, asyncblock, logger, host, port, apikey, secretkey, timeout, protocol, path) - response = process_json(response) + responsekeys = filter(lambda x: 'response' in x, response.keys()) + if len(responsekeys) < 1: + time.sleep(pollperiod) continue + result = response[responsekeys[0]] jobstatus = result['jobstatus'] - if jobstatus == 2: + jobresultcode = result['jobresultcode'] + try: jobresult = result["jobresult"] + logger_debug(logger, "jobresult %s" % (jobresult)) + sys.stdout.flush() + return response, None + except KeyError: + logger_debug(logger, "No jobresult yet %s" % (result)) + sys.stdout.flush() + + if jobresultcode != 0: + error = "Error: resultcode %d for jobid %s" % (jobresultcode, jobid) + logger_debug(logger, "%s" % (error)) + return response, error + else: + # if we get a valid respons resultcode give back results + response, error = monkeyrequest(command, request, isasync, + asyncblock, logger, + host, port, apikey, secretkey, + timeout, protocol, path) + logger_debug(logger, "Ok: %s" % (jobid)) + return response, error + + if jobstatus == 2: error = "\rAsync job %s failed\nError %s, %s" % (jobid, jobresult["errorcode"], jobresult["errortext"]) return response, error elif jobstatus == 1: print '\r', return response, error + else: + logger_debug(logger, "We should not arrive here!") + sys.stdout.flush() + error = "Error: Async query timeout occurred for jobid %s" % jobid return response, error From 63fa086fcc8c4bd47109c76f45f024b71a4c6e94 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 5 Apr 2013 22:42:07 +0530 Subject: [PATCH 18/22] cli: Handle URLError, variable refactor used passed variable Signed-off-by: Rohit Yadav --- tools/cli/cloudmonkey/requester.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/cli/cloudmonkey/requester.py b/tools/cli/cloudmonkey/requester.py index d58c1af4683..e6ea6a1c660 100644 --- a/tools/cli/cloudmonkey/requester.py +++ b/tools/cli/cloudmonkey/requester.py @@ -32,7 +32,7 @@ try: import types import urllib import urllib2 - from urllib2 import urlopen, HTTPError + from urllib2 import urlopen, HTTPError, URLError except ImportError, e: print "Import error in %s : %s" % (__name__, e) @@ -80,10 +80,12 @@ def make_request(command, args, logger, host, port, response = connection.read() except HTTPError, e: error = "%s: %s" % (e.msg, e.info().getheader('X-Description')) + except URLError, e: + error = e.reason logger_debug(logger, "Response received: %s" % response) if error is not None: - logger_debug(logger, "Error: error is not None, %s" % (error)) + logger_debug(logger, "Error: %s" % (error)) return response, error return response, error @@ -91,7 +93,6 @@ def make_request(command, args, logger, host, port, def monkeyrequest(command, args, isasync, asyncblock, logger, host, port, apikey, secretkey, timeout, protocol, path): - fcommand = command response = None error = None logger_debug(logger, "======== START Request ========") @@ -133,9 +134,7 @@ def monkeyrequest(command, args, isasync, asyncblock, logger, host, port, timeout = timeout - pollperiod logger_debug(logger, "Job %s to timeout in %ds" % (jobid, timeout)) sys.stdout.flush() - if re.match("queryAsyncJobResult", fcommand): - # logger_debug(logger, "%d loop: Job %s" % (progress, jobid)) - # sys.stdout.flush() + if re.match("queryAsyncJobResult", command): time.sleep(pollperiod) else: response, error = monkeyrequest(command, request, isasync, From c75b11d13a49065554d492d5ed2fafc6bff9493e Mon Sep 17 00:00:00 2001 From: Justin Grudzien Date: Wed, 3 Apr 2013 15:00:00 -0500 Subject: [PATCH 19/22] CLOUDSTACK-1875: add JSON output to cloudmonkey Added 1. display = [default|json|tabularize] has been added in the config to replace tabularize = [true|false] 2. tabularize is deprecated but we will still set it as "false" once the user removes it out of their config to avoid throwing an error. This will be removed in the next major version. 3. display = "default" is added to the [ui] section of the config if it is not present. 4. You can now output JSON formatted text by setting the config display = json 5. You can now filter text in JSON output mode. (i.e. list users account=grudzien filter=account,id,email). Filtered output returns a properly formatted JSON document. Removed 1. Removed the printing of attr keys in read_config(). Deprecated 1. tabularize = [true|false] is now messaged as deprecated. Signed-off-by: Justin Grudzien --- tools/cli/cloudmonkey/cloudmonkey.py | 51 +++++++++++++++++++++++++--- tools/cli/cloudmonkey/config.py | 15 ++++++-- 2 files changed, 60 insertions(+), 6 deletions(-) diff --git a/tools/cli/cloudmonkey/cloudmonkey.py b/tools/cli/cloudmonkey/cloudmonkey.py index 94006c9577a..842af268ee7 100644 --- a/tools/cli/cloudmonkey/cloudmonkey.py +++ b/tools/cli/cloudmonkey/cloudmonkey.py @@ -27,6 +27,7 @@ try: import shlex import sys import types + import copy from cachemaker import loadcache, savecache, monkeycache, splitverbsubject from config import __version__, __description__, __projecturl__ @@ -162,6 +163,44 @@ class CloudMonkeyShell(cmd.Cmd, object): self.monkeyprint(printer) return PrettyTable(toprow) + # method: print_result_json( result, result_filter ) + # parameters: result - raw results from the API call + # result_filter - filterset + # description: prints result as a json object + def print_result_json(result, result_filter=None): + tfilter = {} # temp var to hold a dict of the filters + tresult = copy.deepcopy(result) # dupe the result to filter + if result_filter != None: + for res in result_filter: + tfilter[ res ] = 1 + myresults = {} + for okey, oval in result.iteritems(): + if isinstance( oval, dict ): + for tkey in x: + if tkey not in tfilter: + try: + del( tresult[okey][x][tkey] ) + except: + pass + elif isinstance( oval, list ): + for x in range( len( oval ) ): + if isinstance( oval[x], dict ): + for tkey in oval[x]: + if tkey not in tfilter: + try: + del( tresult[okey][x][tkey] ) + except: + pass + else: + try: + del( tresult[ okey ][ x ] ) + except: + pass + print json.dumps(tresult, + sort_keys=True, + indent=2, + separators=(',', ': ')) + def print_result_tabular(result, result_filter=None): toprow = None printer = None @@ -183,6 +222,12 @@ class CloudMonkeyShell(cmd.Cmd, object): self.monkeyprint(printer) def print_result_as_dict(result, result_filter=None): + + # tabularize overrides self.display + if self.display == "json" and not self.tabularize == "true": + print_result_json(result, result_filter) + return + for key in sorted(result.keys(), key=lambda x: x not in ['id', 'count', 'name'] and x): if not (isinstance(result[key], list) or @@ -195,7 +240,7 @@ class CloudMonkeyShell(cmd.Cmd, object): def print_result_as_list(result, result_filter=None): for node in result: # Tabular print if it's a list of dict and tabularize is true - if isinstance(node, dict) and self.tabularize == 'true': + if isinstance(node, dict) and (self.display == 'tabularize' or self.tabularize == 'true'): print_result_tabular(result, result_filter) break self.print_result(node) @@ -318,7 +363,7 @@ class CloudMonkeyShell(cmd.Cmd, object): autocompletions = uuids search_string = value - if self.tabularize == "true" and subject != "": + if (self.display == "tabularize" or self.display == "json" or self.tabularize == "true") and subject != "": autocompletions.append("filter=") return [s for s in autocompletions if s.startswith(search_string)] @@ -459,7 +504,6 @@ class CloudMonkeyShell(cmd.Cmd, object): self.monkeyprint("Bye!") return self.do_EOF(args) - class MonkeyParser(OptionParser): def format_help(self, formatter=None): if formatter is None: @@ -473,7 +517,6 @@ class MonkeyParser(OptionParser): result.append("\nTry cloudmonkey [help|?]\n") return "".join(result) - def main(): parser = MonkeyParser() parser.add_option("-c", "--config-file", diff --git a/tools/cli/cloudmonkey/config.py b/tools/cli/cloudmonkey/config.py index 75605df93b7..b21ae4c608d 100644 --- a/tools/cli/cloudmonkey/config.py +++ b/tools/cli/cloudmonkey/config.py @@ -56,7 +56,8 @@ config_fields['core']['log_file'] = expanduser(config_dir + '/log') # ui config_fields['ui']['color'] = 'true' config_fields['ui']['prompt'] = '> ' -config_fields['ui']['tabularize'] = 'false' +config_fields['ui']['tabularize'] = 'false' # deprecate - REMOVE +config_fields['ui']['display'] = 'default' # default display mechanism # server config_fields['server']['host'] = 'localhost' @@ -111,9 +112,19 @@ def read_config(get_attr, set_attr, config_file): for section in config_fields.keys(): for key in config_fields[section].keys(): try: + if( key == "tabularize" ): # this key is deprecated + print "\ntabularize config parameter is deprecated:", + print "please switch to display =", + print "[default,json,tabularize]\n" set_attr(key, config.get(section, key)) except Exception: - missing_keys.append(key) + if( key == "tabularize" ): # this key is deprecated + set_attr( key, "false" ) # set default + elif( key == "display" ): # this key is deprecated + config = write_config(get_attr, config_file, True) + set_attr( key, "default" ) # set default + else: + missing_keys.append(key) if len(missing_keys) > 0: print "Please fix `%s` in %s" % (', '.join(missing_keys), config_file) From 9fbae8579923ad7f2823c084e6112b406714652b Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 5 Apr 2013 22:56:07 +0530 Subject: [PATCH 20/22] cli: Make cloudmonkey.py pep8 compliant Signed-off-by: Rohit Yadav --- tools/cli/cloudmonkey/cloudmonkey.py | 31 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/tools/cli/cloudmonkey/cloudmonkey.py b/tools/cli/cloudmonkey/cloudmonkey.py index 842af268ee7..14d7d94db25 100644 --- a/tools/cli/cloudmonkey/cloudmonkey.py +++ b/tools/cli/cloudmonkey/cloudmonkey.py @@ -168,32 +168,32 @@ class CloudMonkeyShell(cmd.Cmd, object): # result_filter - filterset # description: prints result as a json object def print_result_json(result, result_filter=None): - tfilter = {} # temp var to hold a dict of the filters - tresult = copy.deepcopy(result) # dupe the result to filter - if result_filter != None: + tfilter = {} # temp var to hold a dict of the filters + tresult = copy.deepcopy(result) # dupe the result to filter + if result_filter is not None: for res in result_filter: - tfilter[ res ] = 1 + tfilter[res] = 1 myresults = {} for okey, oval in result.iteritems(): - if isinstance( oval, dict ): + if isinstance(oval, dict): for tkey in x: if tkey not in tfilter: try: - del( tresult[okey][x][tkey] ) + del(tresult[okey][x][tkey]) except: pass - elif isinstance( oval, list ): - for x in range( len( oval ) ): - if isinstance( oval[x], dict ): + elif isinstance(oval, list): + for x in range(len(oval)): + if isinstance(oval[x], dict): for tkey in oval[x]: if tkey not in tfilter: try: - del( tresult[okey][x][tkey] ) + del(tresult[okey][x][tkey]) except: pass else: try: - del( tresult[ okey ][ x ] ) + del(tresult[okey][x]) except: pass print json.dumps(tresult, @@ -240,7 +240,8 @@ class CloudMonkeyShell(cmd.Cmd, object): def print_result_as_list(result, result_filter=None): for node in result: # Tabular print if it's a list of dict and tabularize is true - if isinstance(node, dict) and (self.display == 'tabularize' or self.tabularize == 'true'): + if isinstance(node, dict) and (self.display == 'tabularize' or + self.tabularize == 'true'): print_result_tabular(result, result_filter) break self.print_result(node) @@ -363,7 +364,9 @@ class CloudMonkeyShell(cmd.Cmd, object): autocompletions = uuids search_string = value - if (self.display == "tabularize" or self.display == "json" or self.tabularize == "true") and subject != "": + if subject != "" and (self.display == "tabularize" or + self.display == "json" or + self.tabularize == "true"): autocompletions.append("filter=") return [s for s in autocompletions if s.startswith(search_string)] @@ -504,6 +507,7 @@ class CloudMonkeyShell(cmd.Cmd, object): self.monkeyprint("Bye!") return self.do_EOF(args) + class MonkeyParser(OptionParser): def format_help(self, formatter=None): if formatter is None: @@ -517,6 +521,7 @@ class MonkeyParser(OptionParser): result.append("\nTry cloudmonkey [help|?]\n") return "".join(result) + def main(): parser = MonkeyParser() parser.add_option("-c", "--config-file", From ff74cbbeeac726a2f988f0a2fcda78e74f9af64d Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 5 Apr 2013 23:06:44 +0530 Subject: [PATCH 21/22] cli: Remove tabularize, fix display types, make code pep8 compliant - Remove tabularize field - Now display types are: default, json and table - Make requester pep8 compliant - Remove unnecessary comments, if we want them we should put them on each method Signed-off-by: Rohit Yadav --- tools/cli/cloudmonkey/cloudmonkey.py | 17 ++++------------- tools/cli/cloudmonkey/config.py | 15 ++------------- tools/cli/cloudmonkey/requester.py | 15 ++++++++------- 3 files changed, 14 insertions(+), 33 deletions(-) diff --git a/tools/cli/cloudmonkey/cloudmonkey.py b/tools/cli/cloudmonkey/cloudmonkey.py index 14d7d94db25..13f54ada751 100644 --- a/tools/cli/cloudmonkey/cloudmonkey.py +++ b/tools/cli/cloudmonkey/cloudmonkey.py @@ -163,10 +163,6 @@ class CloudMonkeyShell(cmd.Cmd, object): self.monkeyprint(printer) return PrettyTable(toprow) - # method: print_result_json( result, result_filter ) - # parameters: result - raw results from the API call - # result_filter - filterset - # description: prints result as a json object def print_result_json(result, result_filter=None): tfilter = {} # temp var to hold a dict of the filters tresult = copy.deepcopy(result) # dupe the result to filter @@ -222,9 +218,7 @@ class CloudMonkeyShell(cmd.Cmd, object): self.monkeyprint(printer) def print_result_as_dict(result, result_filter=None): - - # tabularize overrides self.display - if self.display == "json" and not self.tabularize == "true": + if self.display == "json": print_result_json(result, result_filter) return @@ -239,9 +233,7 @@ class CloudMonkeyShell(cmd.Cmd, object): def print_result_as_list(result, result_filter=None): for node in result: - # Tabular print if it's a list of dict and tabularize is true - if isinstance(node, dict) and (self.display == 'tabularize' or - self.tabularize == 'true'): + if isinstance(node, dict) and self.display == 'table': print_result_tabular(result, result_filter) break self.print_result(node) @@ -364,9 +356,8 @@ class CloudMonkeyShell(cmd.Cmd, object): autocompletions = uuids search_string = value - if subject != "" and (self.display == "tabularize" or - self.display == "json" or - self.tabularize == "true"): + if subject != "" and (self.display == "table" or + self.display == "json"): autocompletions.append("filter=") return [s for s in autocompletions if s.startswith(search_string)] diff --git a/tools/cli/cloudmonkey/config.py b/tools/cli/cloudmonkey/config.py index b21ae4c608d..aaf97ebd25d 100644 --- a/tools/cli/cloudmonkey/config.py +++ b/tools/cli/cloudmonkey/config.py @@ -56,8 +56,7 @@ config_fields['core']['log_file'] = expanduser(config_dir + '/log') # ui config_fields['ui']['color'] = 'true' config_fields['ui']['prompt'] = '> ' -config_fields['ui']['tabularize'] = 'false' # deprecate - REMOVE -config_fields['ui']['display'] = 'default' # default display mechanism +config_fields['ui']['display'] = 'default' # server config_fields['server']['host'] = 'localhost' @@ -112,19 +111,9 @@ def read_config(get_attr, set_attr, config_file): for section in config_fields.keys(): for key in config_fields[section].keys(): try: - if( key == "tabularize" ): # this key is deprecated - print "\ntabularize config parameter is deprecated:", - print "please switch to display =", - print "[default,json,tabularize]\n" set_attr(key, config.get(section, key)) except Exception: - if( key == "tabularize" ): # this key is deprecated - set_attr( key, "false" ) # set default - elif( key == "display" ): # this key is deprecated - config = write_config(get_attr, config_file, True) - set_attr( key, "default" ) # set default - else: - missing_keys.append(key) + missing_keys.append(key) if len(missing_keys) > 0: print "Please fix `%s` in %s" % (', '.join(missing_keys), config_file) diff --git a/tools/cli/cloudmonkey/requester.py b/tools/cli/cloudmonkey/requester.py index e6ea6a1c660..88967fed74d 100644 --- a/tools/cli/cloudmonkey/requester.py +++ b/tools/cli/cloudmonkey/requester.py @@ -138,9 +138,9 @@ def monkeyrequest(command, args, isasync, asyncblock, logger, host, port, time.sleep(pollperiod) else: response, error = monkeyrequest(command, request, isasync, - asyncblock, logger, - host, port, apikey, secretkey, - timeout, protocol, path) + asyncblock, logger, + host, port, apikey, secretkey, + timeout, protocol, path) responsekeys = filter(lambda x: 'response' in x, response.keys()) @@ -161,15 +161,16 @@ def monkeyrequest(command, args, isasync, asyncblock, logger, host, port, sys.stdout.flush() if jobresultcode != 0: - error = "Error: resultcode %d for jobid %s" % (jobresultcode, jobid) + error = "Error: resultcode %d for jobid %s" % (jobresultcode, + jobid) logger_debug(logger, "%s" % (error)) return response, error else: # if we get a valid respons resultcode give back results response, error = monkeyrequest(command, request, isasync, - asyncblock, logger, - host, port, apikey, secretkey, - timeout, protocol, path) + asyncblock, logger, + host, port, apikey, secretkey, + timeout, protocol, path) logger_debug(logger, "Ok: %s" % (jobid)) return response, error From 265cf42ffeb3ca304b781319ac635fd324d59ffa Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Fri, 5 Apr 2013 21:00:25 +0200 Subject: [PATCH 22/22] packaging: sync master and 4.1 for rpm packaging --- packaging/centos63/cloud-agent.rc | 3 +- packaging/centos63/cloud.spec | 18 ++- packaging/centos63/package.sh | 192 ++++++++++++++++-------------- 3 files changed, 109 insertions(+), 104 deletions(-) diff --git a/packaging/centos63/cloud-agent.rc b/packaging/centos63/cloud-agent.rc index 6d534732528..b3784882975 100755 --- a/packaging/centos63/cloud-agent.rc +++ b/packaging/centos63/cloud-agent.rc @@ -67,7 +67,8 @@ export CLASSPATH="/usr/share/java/commons-daemon.jar:/usr/share/java/jna.jar:$AC start() { echo -n $"Starting $PROGNAME: " if hostname --fqdn >/dev/null 2>&1 ; then - $JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" -errfile SYSLOG $CLASS + $JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" \ + -errfile $LOGDIR/cloudstack-agent.err -outfile $LOGDIR/cloudstack-agent.out $CLASS RETVAL=$? echo else diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec index a3e0de2889e..9ce46c97c42 100644 --- a/packaging/centos63/cloud.spec +++ b/packaging/centos63/cloud.spec @@ -153,13 +153,9 @@ Provides: cloud-aws-api %description awsapi Apache Cloudstack AWS API compatibility wrapper -#%package docs -#Summary: Apache CloudStack documentation -#%description docs -#Apache CloudStack documentations - %prep echo Doing CloudStack build + %setup -q -n %{name}-%{_maventag} %build @@ -169,10 +165,10 @@ echo VERSION=%{_maventag} >> build/replace.properties echo PACKAGE=%{name} >> build/replace.properties if [ "%{_ossnoss}" == "NONOSS" -o "%{_ossnoss}" == "nonoss" ] ; then - echo "Packaging nonoss components" + echo "Executing mvn packaging for NONOSS ..." mvn -Pawsapi,systemvm -Dnonoss package else - echo "Packaging oss components" + echo "Executing mvn packaging for OSS ..." mvn -Pawsapi package -Dsystemvm fi @@ -329,6 +325,10 @@ install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-cli- %clean [ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} +%pre awsapi +id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \ + -r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true + %preun management /sbin/service cloudstack-management stop || true if [ "$1" == "0" ] ; then @@ -544,10 +544,6 @@ fi %{_defaultdocdir}/%{name}-cli-%{version}/LICENSE %{_defaultdocdir}/%{name}-cli-%{version}/NOTICE -#%files docs -#%doc LICENSE -#%doc NOTICE - %files awsapi %defattr(0644,cloud,cloud,0755) %{_datadir}/%{name}-bridge/webapps/awsapi diff --git a/packaging/centos63/package.sh b/packaging/centos63/package.sh index 802cf7e5e0b..d9d5b1c81f2 100755 --- a/packaging/centos63/package.sh +++ b/packaging/centos63/package.sh @@ -20,126 +20,134 @@ function usage() { echo "" echo "usage: ./package.sh [-p|--pack] [-h|--help] [ARGS]" echo "" - echo "oss|OSS To package oss components only" - echo "nonoss|NONOSS To package non-oss and oss components" + echo "The commonly used Arguments are:" + echo "oss|OSS To package OSS specific" + echo "nonoss|NONOSS To package NONOSS specific" echo "" echo "Examples: ./package.sh -p|--pack oss|OSS" echo " ./package.sh -p|--pack nonoss|NONOSS" echo " ./package.sh (Default OSS)" - echo "" exit 1 } function defaultPackaging() { - CWD=`pwd` - RPMDIR=$CWD/../../dist/rpmbuild - PACK_PROJECT=cloudstack - VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'` +CWD=`pwd` +RPMDIR=$CWD/../../dist/rpmbuild +PACK_PROJECT=cloudstack - if echo $VERSION | grep SNAPSHOT ; then - REALVER=`echo $VERSION | cut -d '-' -f 1` - DEFVER="-D_ver $REALVER" - DEFPRE="-D_prerelease 1" - DEFREL="-D_rel SNAPSHOT" - else - DEFVER="-D_ver $REALVER" - DEFPRE= - DEFREL= - fi - mkdir -p $RPMDIR/SPECS - mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION +VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'` +if echo $VERSION | grep SNAPSHOT ; then + REALVER=`echo $VERSION | cut -d '-' -f 1` + DEFVER="-D_ver $REALVER" + DEFPRE="-D_prerelease 1" + DEFREL="-D_rel SNAPSHOT" +else + DEFVER="-D_ver $REALVER" + DEFPRE= + DEFREL= +fi - (cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x) - (cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION) +mkdir -p $RPMDIR/SPECS +mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION - cp cloud.spec $RPMDIR/SPECS +(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x ) +(cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION) - (cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE") +cp cloud.spec $RPMDIR/SPECS - exit +(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE") + +exit } function packaging() { - CWD=`pwd` - RPMDIR=$CWD/../../dist/rpmbuild - PACK_PROJECT=cloudstack - DEFOSSNOSS="-D_ossnoss $packageval" - VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'` + +CWD=`pwd` +RPMDIR=$CWD/../../dist/rpmbuild +PACK_PROJECT=cloudstack +DEFOSSNOSS="-D_ossnoss $packageval" - if echo $VERSION | grep SNAPSHOT ; then - REALVER=`echo $VERSION | cut -d '-' -f 1` - DEFVER="-D_ver $REALVER" - DEFPRE="-D_prerelease 1" - DEFREL="-D_rel SNAPSHOT" - else - DEFVER="-D_ver $REALVER" - DEFPRE= - DEFREL= - fi - mkdir -p $RPMDIR/SPECS - mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION +VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'` +if echo $VERSION | grep SNAPSHOT ; then + REALVER=`echo $VERSION | cut -d '-' -f 1` + DEFVER="-D_ver $REALVER" + DEFPRE="-D_prerelease 1" + DEFREL="-D_rel SNAPSHOT" +else + DEFVER="-D_ver $REALVER" + DEFPRE= + DEFREL= +fi - (cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x ) - (cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION) +mkdir -p $RPMDIR/SPECS +mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION - cp cloud.spec $RPMDIR/SPECS - (cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE" "$DEFOSSNOSS") +(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x ) +(cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION) - exit +cp cloud.spec $RPMDIR/SPECS + +(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE" "$DEFOSSNOSS") + +exit } if [ $# -lt 1 ] ; then - defaultPackaging + + defaultPackaging + elif [ $# -gt 0 ] ; then - SHORTOPTS="hp:" - LONGOPTS="help,pack:" - ARGS=$(getopt -s bash -u -a --options $SHORTOPTS --longoptions $LONGOPTS --name $0 -- "$@" ) - eval set -- "$ARGS" + SHORTOPTS="hp:" + LONGOPTS="help,pack:" + + ARGS=$(getopt -s bash -u -a --options $SHORTOPTS --longoptions $LONGOPTS --name $0 -- "$@" ) + eval set -- "$ARGS" + + while [ $# -gt 0 ] ; do + case "$1" in + -h | --help) + usage + exit 0 + ;; + -p | --pack) + echo "Doing CloudStack Packaging ....." + packageval=$2 + if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then + defaultPackaging + elif [ "$packageval" == "nonoss" -o "$packageval" == "NONOSS" ] ; then + packaging + else + echo "Error: Incorrect value provided in package.sh script, Please see help ./package.sh --help|-h for more details." + exit 1 + fi + ;; + -) + echo "Unrecognized option..." + usage + exit 1 + ;; + --) + echo "Unrecognized option..." + usage + exit 1 + ;; + -*) + echo "Unrecognized option..." + usage + exit 1 + ;; + *) + shift + break + ;; + esac + done - while [ $# -gt 0 ] ; do - case "$1" in - -h | --help) - usage - exit 0 - ;; - -p | --pack) - echo "Packaging Apache CloudStack" - packageval=$2 - if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then - defaultPackaging - elif [ "$packageval" == "nonoss" -o "$packageval" == "NONOSS" ] ; then - packaging - else - echo "Error: Incorrect usage. See help ./package.sh --help|-h." - exit 1 - fi - ;; - -) - echo "Unrecognized option." - usage - exit 1 - ;; - --) - echo "Unrecognized option." - usage - exit 1 - ;; - -*) - echo "Unrecognized option." - usage - exit 1 - ;; - *) - shift - break - ;; - esac - done else - echo "Incorrect choice. Nothing to do." >&2 - echo "./package.sh --help for details" + echo "Incorrect choice. Nothing to do." >&2 + echo "Please, execute ./package.sh --help for more help" fi