From 7182a939a89b50280ec374f8a295e71837b71e3a Mon Sep 17 00:00:00 2001 From: Chip Childers Date: Wed, 17 Apr 2013 20:47:11 -0400 Subject: [PATCH 01/15] Initial pass at RPM upgrade instructions from 4.0.x to 4.1.0 Signed-off-by: Chip Childers --- docs/en-US/Release_Notes.xml | 45 ++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml index f243a26cce2..d51e9fbae25 100644 --- a/docs/en-US/Release_Notes.xml +++ b/docs/en-US/Release_Notes.xml @@ -4201,10 +4201,51 @@ under the License. - The package names have changed between 4.0 and 4.1, so upgrading the packages won't happen automatically with a yum update + If you are using CentOS or RHEL, follow this procedure to upgrade your packages. If not, skip to step . + Community Packages + This section assumes you're using the community supplied packages for &PRODUCT;. If you've created your own packages and yum repository, substitute your own URL for the ones used in these examples. + + + + The first order of business will be to change the yum repository for each system with &PRODUCT; packages. This means all management servers, and any hosts that have the KVM agent. (No changes should be necessary for hosts that are running VMware or Xen.) + Start by opening /etc/yum.repos.d/cloudstack.repo on any systems that have &PRODUCT; packages installed. + This file should have content similar to the following: + +[apache-cloudstack] +name=Apache CloudStack +baseurl=http://cloudstack.apt-get.eu/rhel/4.0/ +enabled=1 +gpgcheck=0 + + If you are using the community provided package repository, change the baseurl to http://cloudstack.apt-get.eu/rhel/4.1/ + If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository. + + + Now that you have the repository configured, it's time to install the cloudstack-management package. This will pull in any other dependencies you need. + $ sudo yum install cloudstack-management + + + For KVM hosts, you will need to upgrade the cloudstack-agent package: + $ sudo yum install cloudstack-agent + During the installation of cloudstack-agent, the RPM will copy your agent.properties, log4j-cloud.xml, and environment.properties from /etc/cloud/agent to /etc/cloudstack/agent. + + + Verify that the file /etc/cloudstack/agent/environment.properties has a line that reads: + paths.script=/usr/share/cloudstack-common + If not, add the line. + + + Restart the agent: + + service cloud-agent stop + killall jsvc + service cloudstack-agent start + + + - Once you've upgraded the packages on your management servers, you'll need to restart the system VMs. Make sure port 8096 is open to do this. + Once you've upgraded the packages on your management servers, you'll need to restart the system VMs. Make sure port 8096 is open in your local host firewall to do this. There is a script that will do this for you, all you need to do is run the script and supply the IP address for your MySQL instance and your MySQL credentials: # nohup cloudstack-sysvmadm -d IP address -u cloud -p -a > sysvm.log 2>&1 & You can monitor the log for progress. The process of restarting the system VMs can take an hour or more. From 6dccf63a3229eb48be5c2ff941a1550b7741764d Mon Sep 17 00:00:00 2001 From: Prachi Damle Date: Wed, 17 Apr 2013 17:46:06 -0700 Subject: [PATCH 02/15] set Objectname to CreateAffinityGroupResponse Object. Also the listAffinityGroups is missing the 'type' property --- server/src/com/cloud/api/ApiResponseHelper.java | 7 ++++++- .../cloud/api/query/dao/AffinityGroupJoinDaoImpl.java | 1 + .../com/cloud/api/query/vo/AffinityGroupJoinVO.java | 11 +++++++++++ setup/db/db/schema-410to420.sql | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index 50d8de25702..819c88b8c1d 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -3664,8 +3664,13 @@ public class ApiResponseHelper implements ResponseGenerator { response.setName(group.getName()); response.setType(group.getType()); response.setDescription(group.getDescription()); - // response.setDomainId(account.) + Domain domain = ApiDBUtils.findDomainById(account.getDomainId()); + if (domain != null) { + response.setDomainId(domain.getUuid()); + response.setDomainName(domain.getName()); + } + response.setObjectName("affinitygroup"); return response; } diff --git a/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java index a17679313d6..8743bcb2028 100644 --- a/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java @@ -63,6 +63,7 @@ public class AffinityGroupJoinDaoImpl extends GenericDaoBase Date: Wed, 17 Apr 2013 17:48:52 -0700 Subject: [PATCH 03/15] CLOUDSTACK-2069: Anti-Affinity - listVirtualmachines - affinitygroup entity does not include other Vms that are part of this affinity group. Removed the virtualmachineIds:[] sent in the API response. The listVirtualMachines Resopnse need not list details beyond the id, name,description etc. If the user wants to get the list of VMs in the group, listAffinityGroups APi can be used. --- .../apache/cloudstack/affinity/AffinityGroupResponse.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java b/api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java index afd33da84b7..b6d4ff64b31 100644 --- a/api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java +++ b/api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java @@ -64,7 +64,6 @@ public class AffinityGroupResponse extends BaseResponse implements ControlledVie private List vmIdList; public AffinityGroupResponse() { - this.vmIdList = new ArrayList(); } @Override @@ -149,6 +148,10 @@ public class AffinityGroupResponse extends BaseResponse implements ControlledVie } public void addVMId(String vmId) { + if (this.vmIdList == null) { + this.vmIdList = new ArrayList(); + } + this.vmIdList.add(vmId); } From e03176c4d47d4c109f935beceb557e0c2de9a6c6 Mon Sep 17 00:00:00 2001 From: Prachi Damle Date: Wed, 17 Apr 2013 18:03:34 -0700 Subject: [PATCH 04/15] Apart from the UUID, we need not log any other details for AffinityGroup in error messages. --- .../apache/cloudstack/api/command/user/vm/DeployVMCmd.java | 5 ++--- .../src/org/apache/cloudstack/affinity/AffinityGroupVO.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java index 77ba9fed59e..70c0159dffe 100755 --- a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java @@ -230,7 +230,7 @@ public class DeployVMCmd extends BaseAsyncCreateCmd { for (String groupName : securityGroupNameList) { Long groupId = _responseGenerator.getSecurityGroupId(groupName, getEntityOwnerId()); if (groupId == null) { - throw new InvalidParameterValueException("Unable to find group by name " + groupName + " for account " + getEntityOwnerId()); + throw new InvalidParameterValueException("Unable to find group by name " + groupName); } else { securityGroupIds.add(groupId); } @@ -344,8 +344,7 @@ public class DeployVMCmd extends BaseAsyncCreateCmd { for (String groupName : affinityGroupNameList) { Long groupId = _responseGenerator.getAffinityGroupId(groupName, getEntityOwnerId()); if (groupId == null) { - throw new InvalidParameterValueException("Unable to find group by name " + groupName - + " for account " + getEntityOwnerId()); + throw new InvalidParameterValueException("Unable to find affinity group by name " + groupName); } else { affinityGroupIds.add(groupId); } diff --git a/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java b/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java index b6c4a027484..f418cefd781 100644 --- a/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java +++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java @@ -107,7 +107,7 @@ public class AffinityGroupVO implements AffinityGroup { @Override public String toString() { StringBuilder buf = new StringBuilder("AffinityGroup["); - buf.append(id).append("|").append(name).append("|").append(type).append("]"); + buf.append(uuid).append("]"); return buf.toString(); } From b12905b7a828a0766a521ca9859158d4356405ed Mon Sep 17 00:00:00 2001 From: Prasanna Santhanam Date: Thu, 18 Apr 2013 07:44:25 +0530 Subject: [PATCH 05/15] pep8 compliance for cloudstackConnection Signed-off-by: Prasanna Santhanam --- .../integration/smoke/test_public_ip_range.py | 2 +- tools/marvin/marvin/cloudstackConnection.py | 92 ++++++++++++------- 2 files changed, 58 insertions(+), 36 deletions(-) diff --git a/test/integration/smoke/test_public_ip_range.py b/test/integration/smoke/test_public_ip_range.py index a7aad6b795c..7c965ea1d94 100644 --- a/test/integration/smoke/test_public_ip_range.py +++ b/test/integration/smoke/test_public_ip_range.py @@ -49,7 +49,7 @@ class Services: "endip": "10.102.197.73", "zoneid": "1", "podid": "", - "vlan": "101", + "vlan": "4444", } class TesDedicatePublicIPRange(cloudstackTestCase): diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py index 5fd3e1226a4..14b12e7910b 100644 --- a/tools/marvin/marvin/cloudstackConnection.py +++ b/tools/marvin/marvin/cloudstackConnection.py @@ -5,9 +5,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 @@ -22,16 +22,20 @@ import hmac import hashlib import time import cloudstackException -from cloudstackAPI import * +from cloudstackAPI import * import jsonHelper from requests import ConnectionError from requests import HTTPError from requests import Timeout from requests import RequestException + class cloudConnection(object): - def __init__(self, mgtSvr, port=8096, apiKey=None, securityKey=None, asyncTimeout=3600, logging=None, - scheme='http', path='client/api'): + """ Connections to make API calls to the cloudstack management server + """ + def __init__(self, mgtSvr, port=8096, apiKey=None, securityKey=None, + asyncTimeout=3600, logging=None, scheme='http', + path='client/api'): self.apiKey = apiKey self.securityKey = securityKey self.mgtSvr = mgtSvr @@ -42,16 +46,18 @@ class cloudConnection(object): self.asyncTimeout = asyncTimeout self.auth = True if port == 8096 or \ - (self.apiKey == None and self.securityKey == None): + (self.apiKey is None and self.securityKey is None): self.auth = False if scheme not in ['http', 'https']: raise RequestException("Protocol must be HTTP") self.protocol = scheme - self.baseurl = "%s://%s:%d/%s"%(self.protocol, self.mgtSvr, self.port, self.path) + self.baseurl = "%s://%s:%d/%s"\ + % (self.protocol, self.mgtSvr, self.port, self.path) def __copy__(self): - return cloudConnection(self.mgtSvr, self.port, self.apiKey, self.securityKey, self.asyncTimeout, - self.logging, self.protocol, self.path) + return cloudConnection(self.mgtSvr, self.port, self.apiKey, + self.securityKey, self.asyncTimeout, + self.logging, self.protocol, self.path) def poll(self, jobid, response): """ @@ -68,16 +74,19 @@ class cloudConnection(object): asyncResonse = self.marvin_request(cmd, response_type=response) if asyncResonse.jobstatus == 2: - raise cloudstackException.cloudstackAPIException("asyncquery", asyncResonse.jobresult) + raise cloudstackException.cloudstackAPIException( + "asyncquery", asyncResonse.jobresult) elif asyncResonse.jobstatus == 1: return asyncResonse time.sleep(5) if self.logging is not None: - self.logging.debug("job: %s still processing, will timeout in %ds"%(jobid, timeout)) + self.logging.debug("job: %s still processing," + " will timeout in %ds" % (jobid, timeout)) timeout = timeout - 5 - raise cloudstackException.cloudstackAPIException("asyncquery", "Async job timeout %s"%jobid) + raise cloudstackException.cloudstackAPIException( + "asyncquery", "Async job timeout %s" % jobid) def sign(self, payload): """ @@ -90,19 +99,26 @@ class cloudConnection(object): params.sort(key=lambda k: str.lower(k[0])) hashStr = "&".join( ["=".join( - [str.lower(r[0]), str.lower(urllib.quote_plus(str(r[1]))).replace("+", "%20")] + [str.lower(r[0]), + str.lower( + urllib.quote_plus(str(r[1])) + ).replace("+", "%20")] ) for r in params] ) - signature = base64.encodestring(hmac.new(self.securityKey, hashStr, hashlib.sha1).digest()).strip() - self.logging.info("Computed Signature by Marvin: %s"%signature) + signature = base64.encodestring(hmac.new( + self.securityKey, hashStr, hashlib.sha1).digest()).strip() + self.logging.info("Computed Signature by Marvin: %s" % signature) return signature def request(self, command, auth=True, payload={}, data={}): """ - Makes requests on the `integration.api.port` - @param command: cloudstack API command name eg: deployVirtualMachineCommand - @param auth: Authentication (apikey,secretKey) => True, else False - @param payload: GET param data composed as a dictionary of key,value pairs + Makes requests using auth or over integration port + @param command: cloudstack API command name + eg: deployVirtualMachineCommand + @param auth: Authentication (apikey,secretKey) => True + else False for integration.api.port + @param payload: GET param data composed as a dictionary + of key,value pairs @param data: POST data as a dictionary @return: """ @@ -114,23 +130,24 @@ class cloudConnection(object): signature = self.sign(payload) payload["signature"] = signature - try: if data: - response = requests.get(self.baseurl, params=payload, data=data) + response = requests.get(self.baseurl, params=payload, + data=data) else: response = requests.get(self.baseurl, params=payload) except ConnectionError, c: - self.logging.debug("Connection refused. Reason: %s"%(self.baseurl, c)) + self.logging.debug("Connection refused. Reason: %s" % + (self.baseurl, c)) raise c except HTTPError, h: - self.logging.debug("Server returned error code: %s"%h) + self.logging.debug("Server returned error code: %s" % h) raise h except Timeout, t: - self.logging.debug("Connection timed out with %s"%t) + self.logging.debug("Connection timed out with %s" % t) raise t - except RequestException,r: - self.logging.debug("Error returned by server %s"%r) + except RequestException, r: + self.logging.debug("Error returned by server %s" % r) raise r else: return response @@ -144,7 +161,8 @@ class cloudConnection(object): requests = {} required = [] for attribute in dir(cmd): - if attribute != "__doc__" and attribute != "__init__" and attribute != "__module__": + if attribute != "__doc__" and attribute != "__init__" and \ + attribute != "__module__": if attribute == "isAsync": isAsync = getattr(cmd, attribute) elif attribute == "required": @@ -155,7 +173,8 @@ class cloudConnection(object): cmdname = cmd.__class__.__name__.replace("Cmd", "") for requiredPara in required: if requests[requiredPara] is None: - raise cloudstackException.cloudstackAPIException(cmdname, "%s is required"%requiredPara) + raise cloudstackException.cloudstackAPIException( + cmdname, "%s is required" % requiredPara) for param, value in requests.items(): if value is None: requests.pop(param) @@ -169,8 +188,8 @@ class cloudConnection(object): requests.pop(param) i = 0 for val in value: - for k,v in val.iteritems(): - requests["%s[%d].%s"%(param,i,k)] = v + for k, v in val.iteritems(): + requests["%s[%d].%s" % (param, i, k)] = v i = i + 1 return cmdname, isAsync, requests @@ -184,14 +203,17 @@ class cloudConnection(object): @return: """ cmdname, isAsync, payload = self.sanitize_command(cmd) - self.logging.info("sending command: %s %s"%(cmdname, str(payload))) + self.logging.info("sending command: %s %s" % (cmdname, str(payload))) if self.auth: - response = self.request(cmdname, auth=True, payload=payload, data=data) + response = self.request( + cmdname, auth=True, payload=payload, data=data) else: - response = self.request(cmdname, auth=False, payload=payload, data=data) + response = self.request( + cmdname, auth=False, payload=payload, data=data) - self.logging.info("Request: %s Response: %s"%(response.url, response.text)) - response = jsonHelper.getResultObj(response.json, response_type) + self.logging.info("Request: %s Response: %s" % + (response.url, response.text)) + response = jsonHelper.getResultObj(response.json(), response_type) if isAsync == "false": return response From 985b2aa88d4d02db98a2e9be7ac081e4efbff879 Mon Sep 17 00:00:00 2001 From: Sanjay Tripathi Date: Wed, 17 Apr 2013 12:03:47 +0530 Subject: [PATCH 06/15] CLOUDSTACK-2046: Primary Storage & Secondary Storage is max limit is set 0 with listResourceLimits API response as ROOT admin Signed-off-by: Sateesh Chodapuneedi --- server/src/com/cloud/api/ApiResponseHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index 819c88b8c1d..7629e5e5e59 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -379,7 +379,7 @@ public class ApiResponseHelper implements ResponseGenerator { populateDomain(resourceLimitResponse, accountTemp.getDomainId()); } resourceLimitResponse.setResourceType(Integer.valueOf(limit.getType().getOrdinal()).toString()); - if(limit.getType() == ResourceType.primary_storage || limit.getType() == ResourceType.secondary_storage) { + if((limit.getType() == ResourceType.primary_storage || limit.getType() == ResourceType.secondary_storage) && limit.getMax() >= 0) { resourceLimitResponse.setMax((long) Math.ceil(limit.getMax()/ResourceType.bytesToGiB)); } else { resourceLimitResponse.setMax(limit.getMax()); From dfbe11355c40a5dbe022f022426c100c53428901 Mon Sep 17 00:00:00 2001 From: Mice Xia Date: Thu, 18 Apr 2013 14:56:44 +0800 Subject: [PATCH 07/15] fix CLOUDSTACK-2061 Hitting java NPE in addNicToVirtualMachine api when trying to add a shared network to a VM --- server/src/com/cloud/network/element/VirtualRouterElement.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/network/element/VirtualRouterElement.java b/server/src/com/cloud/network/element/VirtualRouterElement.java index 169db3283e3..f601f4fa2e4 100755 --- a/server/src/com/cloud/network/element/VirtualRouterElement.java +++ b/server/src/com/cloud/network/element/VirtualRouterElement.java @@ -876,8 +876,8 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl if (publicNetwork) { routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER); } else { - Long podId = dest.getPod().getId(); if (isPodBased) { + Long podId = dest.getPod().getId(); routers = _routerDao.listByNetworkAndPodAndRole(network.getId(), podId, Role.VIRTUAL_ROUTER); } else { routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER); From 96cf79535fb68881d7d191109ffa6d8f504e3136 Mon Sep 17 00:00:00 2001 From: Wido den Hollander Date: Thu, 18 Apr 2013 10:26:09 +0200 Subject: [PATCH 08/15] CLOUDSTACK-2033 Fix usage server logging under Debian and Ubuntu --- packaging/debian/replace.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/debian/replace.properties b/packaging/debian/replace.properties index 8c852060c02..5a0bd58ab67 100644 --- a/packaging/debian/replace.properties +++ b/packaging/debian/replace.properties @@ -57,6 +57,6 @@ SYSCONFDIR=/etc SYSTEMCLASSPATH= SYSTEMJARS= USAGECLASSPATH= -USAGELOG=/var/log/cloudstack/usage +USAGELOG=/var/log/cloudstack/usage/usage.log USAGESYSCONFDIR=/etc/cloudstack/usage PACKAGE=cloudstack From 34899f9b999e0d92573aa7b8872e07a111811b53 Mon Sep 17 00:00:00 2001 From: Isaac Chiang Date: Thu, 18 Apr 2013 21:19:00 +0530 Subject: [PATCH 09/15] CLOUDSTACK-2077:The updatePhysicalNetwork command fails to update the database --- server/src/com/cloud/network/NetworkServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java index 12c6068925f..c4effc96271 100755 --- a/server/src/com/cloud/network/NetworkServiceImpl.java +++ b/server/src/com/cloud/network/NetworkServiceImpl.java @@ -2445,10 +2445,6 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { network.setVnet(vnetString); } - - - _physicalNetworkDao.update(id, network); - for (Pair vnetToAdd : vnetsToAdd) { s_logger.debug("Adding vnet range " + vnetToAdd.first() + "-" + vnetToAdd.second() + " for the physicalNetwork id= " + id + " and zone id=" + network.getDataCenterId() + " as a part of updatePhysicalNetwork call"); @@ -2456,6 +2452,8 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { } } + _physicalNetworkDao.update(id, network); + return network; } From 7023920d3459516e07ae674bf0d1eb2ebcb99b2c Mon Sep 17 00:00:00 2001 From: Chip Childers Date: Thu, 18 Apr 2013 12:06:50 -0400 Subject: [PATCH 10/15] Modifying some extra tabs that cause rendering silliness in the release notes Signed-off-by: Chip Childers --- docs/en-US/Release_Notes.xml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml index d51e9fbae25..09cf2e2ac48 100644 --- a/docs/en-US/Release_Notes.xml +++ b/docs/en-US/Release_Notes.xml @@ -4181,17 +4181,17 @@ under the License. Restart the agent: - service cloud-agent stop - killall jsvc - service cloudstack-agent start +service cloud-agent stop +killall jsvc +service cloudstack-agent start During the upgrade, log4j-cloud.xml was simply copied over, so the logs will continue to be added to /var/log/cloud/agent/agent.log. There's nothing wrong with this, but if you prefer to be consistent, you can change this by copying over the sample configuration file: - cd /etc/cloudstack/agent - mv log4j-cloud.xml.dpkg-dist log4j-cloud.xml - service cloudstack-agent restart +cd /etc/cloudstack/agent +mv log4j-cloud.xml.dpkg-dist log4j-cloud.xml +service cloudstack-agent restart @@ -4237,9 +4237,9 @@ gpgcheck=0 Restart the agent: - service cloud-agent stop - killall jsvc - service cloudstack-agent start +service cloud-agent stop +killall jsvc +service cloudstack-agent start @@ -4252,12 +4252,12 @@ gpgcheck=0 # tail -f sysvm.log The output to sysvm.log will look something like this: - Stopping and starting 1 secondary storage vm(s)... - Done stopping and starting secondary storage vm(s) - Stopping and starting 1 console proxy vm(s)... - Done stopping and starting console proxy vm(s). - Stopping and starting 4 running routing vm(s)... - Done restarting router(s). +Stopping and starting 1 secondary storage vm(s)... +Done stopping and starting secondary storage vm(s) +Stopping and starting 1 console proxy vm(s)... +Done stopping and starting console proxy vm(s). +Stopping and starting 4 running routing vm(s)... +Done restarting router(s). From bf120917f99df0e3d03d50f619ea5809f4c914c4 Mon Sep 17 00:00:00 2001 From: Chip Childers Date: Thu, 18 Apr 2013 12:12:02 -0400 Subject: [PATCH 11/15] Removing inappropriate note about an upgrade *to* 3.0.2 in the *from* 3.0.2 section of the release notes Signed-off-by: Chip Childers --- docs/en-US/Release_Notes.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml index 09cf2e2ac48..28102697583 100644 --- a/docs/en-US/Release_Notes.xml +++ b/docs/en-US/Release_Notes.xml @@ -4272,15 +4272,6 @@ Done restarting router(s). Upgrade from 3.0.2 to 4.1.0 This section will guide you from Citrix CloudStack 3.0.2 to Apache CloudStack 4.1.0. Sections that are hypervisor-specific will be called out with a note. - - Ensure that you query your IP address usage records and process them or make a - backup. During the upgrade you will lose the old IP address usage records. - Starting in 3.0.2, the usage record format for IP addresses is the same as the rest - of the usage types. Instead of a single record with the assignment and release dates, - separate records are generated per aggregation period with start and end dates. After - upgrading, any existing IP address usage records in the old format will no longer be - available. - The following upgrade instructions apply only if you're using VMware hosts. If From f4240e1cea58be0ea7b50c77a018d7c63e3faf15 Mon Sep 17 00:00:00 2001 From: Chip Childers Date: Thu, 18 Apr 2013 12:25:26 -0400 Subject: [PATCH 12/15] Adding RPM and DEB upgrade steps from 3.0.2 to 4.1.0 in release notes Signed-off-by: Chip Childers --- docs/en-US/Release_Notes.xml | 114 ++++++++++++++++++++++++++++++----- 1 file changed, 99 insertions(+), 15 deletions(-) diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml index 28102697583..b07b5842bc5 100644 --- a/docs/en-US/Release_Notes.xml +++ b/docs/en-US/Release_Notes.xml @@ -4382,23 +4382,107 @@ Done restarting router(s). the community provided yum/apt repositories to gain access to the &PRODUCT; binaries. - - After you have configured an appropriate yum or apt repository, you may execute the - one of the following commands as appropriate for your environment in order to upgrade - &PRODUCT;: # yum update cloud-* - # apt-get update - # apt-get upgrade cloud-* - - You will, of course, have to agree to the changes suggested by Yum or APT. - - If the upgrade output includes a message similar to the following, then some - custom content was found in your old components.xml, and you need to merge the two - files: - warning: /etc/cloud/management/components.xml created as /etc/cloud/management/components.xml.rpmnew - Instructions follow in the next step. + + If you are using Ubuntu, follow this procedure to upgrade your packages. If not, skip to step . + Community Packages + This section assumes you're using the community supplied packages for &PRODUCT;. If you've created your own packages and APT repository, substitute your own URL for the ones used in these examples. + + + The first order of business will be to change the sources list for each system with &PRODUCT; packages. This means all management servers, and any hosts that have the KVM agent. (No changes should be necessary for hosts that are running VMware or Xen.) + Start by opening /etc/apt/sources.list.d/cloudstack.list on any systems that have &PRODUCT; packages installed. + This file should have one line, which contains: + deb http://cloudstack.apt-get.eu/ubuntu precise 4.0 + We'll change it to point to the new package repository: + deb http://cloudstack.apt-get.eu/ubuntu precise 4.1 + If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository. + + + Now update your apt package list: + $ sudo apt-get update + + + Now that you have the repository configured, it's time to install the cloudstack-management package. This will pull in any other dependencies you need. + $ sudo apt-get install cloudstack-management + + + You will need to manually install the cloudstack-agent package: + $ sudo apt-get install cloudstack-agent + During the installation of cloudstack-agent, APT will copy your agent.properties, log4j-cloud.xml, and environment.properties from /etc/cloud/agent to /etc/cloudstack/agent. + When prompted whether you wish to keep your configuration, say Yes. + + + Verify that the file /etc/cloudstack/agent/environment.properties has a line that reads: + paths.script=/usr/share/cloudstack-common + If not, add the line. + + + Restart the agent: + +service cloud-agent stop +killall jsvc +service cloudstack-agent start + + + + During the upgrade, log4j-cloud.xml was simply copied over, so the logs will continue to be added to /var/log/cloud/agent/agent.log. There's nothing wrong with this, but if you prefer to be consistent, you can change this by copying over the sample configuration file: + +cd /etc/cloudstack/agent +mv log4j-cloud.xml.dpkg-dist log4j-cloud.xml +service cloudstack-agent restart + + + + Once the agent is running, you can uninstall the old cloud-* packages from your system: + sudo dpkg --purge cloud-agent + + - + + If you are using CentOS or RHEL, follow this procedure to upgrade your packages. If not, skip to step . + Community Packages + This section assumes you're using the community supplied packages for &PRODUCT;. If you've created your own packages and yum repository, substitute your own URL for the ones used in these examples. + + + + The first order of business will be to change the yum repository for each system with &PRODUCT; packages. This means all management servers, and any hosts that have the KVM agent. (No changes should be necessary for hosts that are running VMware or Xen.) + Start by opening /etc/yum.repos.d/cloudstack.repo on any systems that have &PRODUCT; packages installed. + This file should have content similar to the following: + +[apache-cloudstack] +name=Apache CloudStack +baseurl=http://cloudstack.apt-get.eu/rhel/4.0/ +enabled=1 +gpgcheck=0 + + If you are using the community provided package repository, change the baseurl to http://cloudstack.apt-get.eu/rhel/4.1/ + If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository. + + + Now that you have the repository configured, it's time to install the cloudstack-management package. This will pull in any other dependencies you need. + $ sudo yum install cloudstack-management + + + For KVM hosts, you will need to upgrade the cloudstack-agent package: + $ sudo yum install cloudstack-agent + During the installation of cloudstack-agent, the RPM will copy your agent.properties, log4j-cloud.xml, and environment.properties from /etc/cloud/agent to /etc/cloudstack/agent. + + + Verify that the file /etc/cloudstack/agent/environment.properties has a line that reads: + paths.script=/usr/share/cloudstack-common + If not, add the line. + + + Restart the agent: + +service cloud-agent stop +killall jsvc +service cloudstack-agent start + + + + + If you have made changes to your copy of /etc/cloud/management/components.xml the changes will be preserved in the upgrade. However, you need to do the following steps to place these From 31531fa9a6662ef523bdb2e66ee961ae23093bf9 Mon Sep 17 00:00:00 2001 From: Chip Childers Date: Thu, 18 Apr 2013 12:48:41 -0400 Subject: [PATCH 13/15] Switched to yum upgrade vs yum install for RPM upgrade instructions Signed-off-by: Chip Childers --- docs/en-US/Release_Notes.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml index b07b5842bc5..d5311e47fa8 100644 --- a/docs/en-US/Release_Notes.xml +++ b/docs/en-US/Release_Notes.xml @@ -4221,12 +4221,12 @@ gpgcheck=0 If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository. - Now that you have the repository configured, it's time to install the cloudstack-management package. This will pull in any other dependencies you need. - $ sudo yum install cloudstack-management + Now that you have the repository configured, it's time to install the cloudstack-management package by upgrading the older cloud-client package. + $ sudo yum upgrade cloud-client - For KVM hosts, you will need to upgrade the cloudstack-agent package: - $ sudo yum install cloudstack-agent + For KVM hosts, you will need to upgrade the cloud-agent package, similarly installing the new version as cloudstack-agent. + $ sudo yum upgrade cloud-agent During the installation of cloudstack-agent, the RPM will copy your agent.properties, log4j-cloud.xml, and environment.properties from /etc/cloud/agent to /etc/cloudstack/agent. @@ -4459,12 +4459,12 @@ gpgcheck=0 If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository. - Now that you have the repository configured, it's time to install the cloudstack-management package. This will pull in any other dependencies you need. - $ sudo yum install cloudstack-management + Now that you have the repository configured, it's time to install the cloudstack-management package by upgrading the older cloud-client package. + $ sudo yum upgrade cloud-client - For KVM hosts, you will need to upgrade the cloudstack-agent package: - $ sudo yum install cloudstack-agent + For KVM hosts, you will need to upgrade the cloud-agent package, similarly installing the new version as cloudstack-agent. + $ sudo yum upgrade cloud-agent During the installation of cloudstack-agent, the RPM will copy your agent.properties, log4j-cloud.xml, and environment.properties from /etc/cloud/agent to /etc/cloudstack/agent. From 7a4f70ff16706c17d1b408f48d72a7e0387cde08 Mon Sep 17 00:00:00 2001 From: Chip Childers Date: Thu, 18 Apr 2013 12:54:59 -0400 Subject: [PATCH 14/15] Adding 2.2 to 4.1 upgrade instructions for RPM and DEB to release notes Signed-off-by: Chip Childers --- docs/en-US/Release_Notes.xml | 109 ++++++++++++++++++++++++++++++++--- 1 file changed, 100 insertions(+), 9 deletions(-) diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml index d5311e47fa8..60209f660d5 100644 --- a/docs/en-US/Release_Notes.xml +++ b/docs/en-US/Release_Notes.xml @@ -4912,16 +4912,107 @@ service cloudstack-agent start the community provided yum/apt repositories to gain access to the &PRODUCT; binaries. - - After you have configured an appropriate yum or apt repository, you may execute the - one of the following commands as appropriate for your environment in order to upgrade - &PRODUCT;: # yum update cloud-* - # apt-get update - # apt-get upgrade cloud-* - - You will, of course, have to agree to the changes suggested by Yum or APT. + + If you are using Ubuntu, follow this procedure to upgrade your packages. If not, skip to step . + Community Packages + This section assumes you're using the community supplied packages for &PRODUCT;. If you've created your own packages and APT repository, substitute your own URL for the ones used in these examples. + + + + The first order of business will be to change the sources list for each system with &PRODUCT; packages. This means all management servers, and any hosts that have the KVM agent. (No changes should be necessary for hosts that are running VMware or Xen.) + Start by opening /etc/apt/sources.list.d/cloudstack.list on any systems that have &PRODUCT; packages installed. + This file should have one line, which contains: + deb http://cloudstack.apt-get.eu/ubuntu precise 4.0 + We'll change it to point to the new package repository: + deb http://cloudstack.apt-get.eu/ubuntu precise 4.1 + If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository. + + + Now update your apt package list: + $ sudo apt-get update + + + Now that you have the repository configured, it's time to install the cloudstack-management package. This will pull in any other dependencies you need. + $ sudo apt-get install cloudstack-management + + + You will need to manually install the cloudstack-agent package: + $ sudo apt-get install cloudstack-agent + During the installation of cloudstack-agent, APT will copy your agent.properties, log4j-cloud.xml, and environment.properties from /etc/cloud/agent to /etc/cloudstack/agent. + When prompted whether you wish to keep your configuration, say Yes. + + + Verify that the file /etc/cloudstack/agent/environment.properties has a line that reads: + paths.script=/usr/share/cloudstack-common + If not, add the line. + + + Restart the agent: + +service cloud-agent stop +killall jsvc +service cloudstack-agent start + + + + During the upgrade, log4j-cloud.xml was simply copied over, so the logs will continue to be added to /var/log/cloud/agent/agent.log. There's nothing wrong with this, but if you prefer to be consistent, you can change this by copying over the sample configuration file: + +cd /etc/cloudstack/agent +mv log4j-cloud.xml.dpkg-dist log4j-cloud.xml +service cloudstack-agent restart + + + + Once the agent is running, you can uninstall the old cloud-* packages from your system: + sudo dpkg --purge cloud-agent + + - + + If you are using CentOS or RHEL, follow this procedure to upgrade your packages. If not, skip to step . + Community Packages + This section assumes you're using the community supplied packages for &PRODUCT;. If you've created your own packages and yum repository, substitute your own URL for the ones used in these examples. + + + + The first order of business will be to change the yum repository for each system with &PRODUCT; packages. This means all management servers, and any hosts that have the KVM agent. (No changes should be necessary for hosts that are running VMware or Xen.) + Start by opening /etc/yum.repos.d/cloudstack.repo on any systems that have &PRODUCT; packages installed. + This file should have content similar to the following: + +[apache-cloudstack] +name=Apache CloudStack +baseurl=http://cloudstack.apt-get.eu/rhel/4.0/ +enabled=1 +gpgcheck=0 + + If you are using the community provided package repository, change the baseurl to http://cloudstack.apt-get.eu/rhel/4.1/ + If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository. + + + Now that you have the repository configured, it's time to install the cloudstack-management package by upgrading the older cloud-client package. + $ sudo yum upgrade cloud-client + + + For KVM hosts, you will need to upgrade the cloud-agent package, similarly installing the new version as cloudstack-agent. + $ sudo yum upgrade cloud-agent + During the installation of cloudstack-agent, the RPM will copy your agent.properties, log4j-cloud.xml, and environment.properties from /etc/cloud/agent to /etc/cloudstack/agent. + + + Verify that the file /etc/cloudstack/agent/environment.properties has a line that reads: + paths.script=/usr/share/cloudstack-common + If not, add the line. + + + Restart the agent: + +service cloud-agent stop +killall jsvc +service cloudstack-agent start + + + + + If you have made changes to your existing copy of the file components.xml in your previous-version CloudStack installation, the changes will be preserved in the upgrade. However, you need to do the following steps to place these changes in a new version of From fca7b3ef22b00f6003fbb6fa601c9b7c1a79dcec Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Thu, 18 Apr 2013 10:38:03 -0700 Subject: [PATCH 15/15] Rename widget 'plugins' to 'pluginListing' For better clarity on its function, rename the 'plugins' widget to 'pluginListing,' as it does not handle the actual plugin logic. --- ui/index.jsp | 2 +- ui/scripts/plugins.js | 4 +--- ui/scripts/ui-custom/{plugins.js => pluginListing.js} | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) rename ui/scripts/ui-custom/{plugins.js => pluginListing.js} (98%) diff --git a/ui/index.jsp b/ui/index.jsp index 46f49f00984..550661e546a 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -1681,7 +1681,7 @@ under the License. - + diff --git a/ui/scripts/plugins.js b/ui/scripts/plugins.js index 5a33d56ef9f..d3e07055299 100644 --- a/ui/scripts/plugins.js +++ b/ui/scripts/plugins.js @@ -51,7 +51,7 @@ cloudStack.sections.plugins = { title: 'label.plugins', - show: cloudStack.uiCustom.plugins + show: cloudStack.uiCustom.pluginListing }; // Load plugins @@ -70,7 +70,5 @@ ui: pluginAPI }); }); - - // Load CSS }); }(jQuery, cloudStack, require)); diff --git a/ui/scripts/ui-custom/plugins.js b/ui/scripts/ui-custom/pluginListing.js similarity index 98% rename from ui/scripts/ui-custom/plugins.js rename to ui/scripts/ui-custom/pluginListing.js index aaf95319da1..3dcce983943 100644 --- a/ui/scripts/ui-custom/plugins.js +++ b/ui/scripts/ui-custom/pluginListing.js @@ -95,7 +95,7 @@ } }; - cloudStack.uiCustom.plugins = function() { + cloudStack.uiCustom.pluginListing = function() { var plugins = cloudStack.plugins; return elems.pluginListing({