git commit: updated refs/heads/master to dda2994
Repository: cloudstack Updated Branches: refs/heads/master 4e896938e -> dda299493 CLOUDSTACK-7940: Exception printed completely on the UI. Not in a readable format. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dda29949 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dda29949 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dda29949 Branch: refs/heads/master Commit: dda29949366f16c06445dde9161c3b1151ed3f36 Parents: 4e89693 Author: Sanjay Tripathi Authored: Wed Nov 19 15:57:13 2014 +0530 Committer: Sanjay Tripathi Committed: Wed Nov 19 15:59:03 2014 +0530 -- .../src/com/cloud/vm/VirtualMachineManagerImpl.java | 2 +- .../cloudstack/engine/orchestration/VolumeOrchestrator.java | 2 +- .../hypervisor/xenserver/resource/CitrixResourceBase.java | 7 +++ .../storage/motion/XenServerStorageMotionStrategy.java| 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dda29949/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java -- diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index c9322e4..dc6ad3f 100755 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -1924,7 +1924,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac Answer ma = _agentMgr.send(vm.getLastHostId(), mc); if (ma == null || !ma.getResult()) { String details = (ma != null) ? ma.getDetails() : "null answer returned"; -throw new CloudRuntimeException("Unable to migrate due to " + details); +throw new CloudRuntimeException(details); } } catch (OperationTimedoutException e) { if (e.isActive()) { http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dda29949/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java -- diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java index f474fe3..63d967b 100644 --- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java +++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java @@ -968,7 +968,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati CommandResult result = future.get(); if (result.isFailed()) { s_logger.debug("Failed to migrated vm " + vm + " along with its volumes. " + result.getResult()); -throw new CloudRuntimeException("Failed to migrated vm " + vm + " along with its volumes. " + result.getResult()); +throw new CloudRuntimeException("Failed to migrated vm " + vm + " along with its volumes. "); } } catch (InterruptedException e) { s_logger.debug("Failed to migrated vm " + vm + " along with its volumes.", e); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dda29949/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java -- diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java index aa115b1..b275fb4 100644 --- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java +++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java @@ -2953,9 +2953,8 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe } return new MigrateAnswer(cmd, true, "migration succeeded", null); } catch (Exception e) { -String msg = "Catch Exception " + e.getClass().getName() + ": Migration failed due to " + e.toString(); -s_logger.warn(msg, e); -return new MigrateAnswer(cmd, false, msg, null); +s_logger.warn(e.getMessage(), e); +return new MigrateAnswer(cmd, false, e.getMessage(), null); } } @@ -3360,7 +3359,7 @@ public abstract class CitrixResourceBase implemen
git commit: updated refs/heads/master to f0a4a63
Repository: cloudstack Updated Branches: refs/heads/master dda299493 -> f0a4a639d CLOUDSTACK-7941: CloudStack should log IP address of actual client even if a ReverseProxy is there Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f0a4a639 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f0a4a639 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f0a4a639 Branch: refs/heads/master Commit: f0a4a639de231929bd63f673c4d6adc6bfb5ca80 Parents: dda2994 Author: Saksham Srivastava Authored: Mon Nov 17 16:28:49 2014 +0530 Committer: Saksham Srivastava Committed: Wed Nov 19 16:07:10 2014 +0530 -- server/src/com/cloud/api/ApiServlet.java | 94 +-- 1 file changed, 73 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0a4a639/server/src/com/cloud/api/ApiServlet.java -- diff --git a/server/src/com/cloud/api/ApiServlet.java b/server/src/com/cloud/api/ApiServlet.java index c7d0609..3d2e843 100644 --- a/server/src/com/cloud/api/ApiServlet.java +++ b/server/src/com/cloud/api/ApiServlet.java @@ -16,35 +16,38 @@ // under the License. package com.cloud.api; -import org.apache.cloudstack.api.auth.APIAuthenticationManager; -import org.apache.cloudstack.api.auth.APIAuthenticationType; -import org.apache.cloudstack.api.auth.APIAuthenticator; -import com.cloud.user.Account; -import com.cloud.user.AccountService; -import com.cloud.user.User; -import com.cloud.utils.HttpUtils; -import com.cloud.utils.StringUtils; -import com.cloud.utils.db.EntityManager; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.util.HashMap; +import java.util.Map; + +import javax.inject.Inject; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiServerService; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.auth.APIAuthenticationManager; +import org.apache.cloudstack.api.auth.APIAuthenticationType; +import org.apache.cloudstack.api.auth.APIAuthenticator; import org.apache.cloudstack.context.CallContext; import org.apache.cloudstack.managed.context.ManagedContext; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; import org.springframework.web.context.support.SpringBeanAutowiringSupport; -import javax.inject.Inject; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.util.HashMap; -import java.util.Map; +import com.cloud.user.Account; +import com.cloud.user.AccountService; +import com.cloud.user.User; +import com.cloud.utils.HttpUtils; +import com.cloud.utils.StringUtils; +import com.cloud.utils.db.EntityManager; +import com.cloud.utils.net.NetUtils; @Component("apiServlet") @SuppressWarnings("serial") @@ -120,7 +123,7 @@ public class ApiServlet extends HttpServlet { } void processRequestInContext(final HttpServletRequest req, final HttpServletResponse resp) { -final String remoteAddress = req.getRemoteAddr(); +final String remoteAddress = getClientAddress(req); final StringBuilder auditTrailSb = new StringBuilder(128); auditTrailSb.append(" ").append(remoteAddress); auditTrailSb.append(" -- ").append(req.getMethod()).append(' '); @@ -304,4 +307,53 @@ public class ApiServlet extends HttpServlet { CallContext.unregister(); } } + +//This method will try to get login IP of user even if servlet is behind reverseProxy or loadBalancer +private String getClientAddress(HttpServletRequest request) { +String ip = null; +ip = request.getHeader("X-Forwarded-For"); +ip = getCorrectIPAddress(ip); +if (ip != null) { +return ip; +} + +ip = request.getHeader("HTTP_CLIENT_IP"); +ip = getCorrectIPAddress(ip); +if (ip != null) { +return ip; +} + +ip = request.getHeader("HTTP_X_FORWARDED_FOR"); +ip = getCorrectIPAddress(ip); +if (ip != null) { +return ip; +} + +ip = request.getHeader("Remote_Addr"); +ip = getCorrectIPAddress(ip); +if (ip != null) { +return
git commit: updated refs/heads/4.4 to 5b62095
Repository: cloudstack Updated Branches: refs/heads/4.4 f18d6238b -> 5b620951a CLOUDSTACK-7752: Fixed deployment planner stuck in infinite loop. If we create VM with shared service offering and attach disk with local disk offering, and one of storage pool is full(cannot be allocated) and other is not full then we are not putting the cluster in avoid list which is causing this infinite loop. Fixed by putting the cluster in avoid list even if one of the storage pool is full(cannot be allocated) Signed-off-by: Daan Hoogland Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5b620951 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5b620951 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5b620951 Branch: refs/heads/4.4 Commit: 5b620951a399188bd956f1198cd35d96b4008862 Parents: f18d623 Author: Anshul Gangwar Authored: Wed Nov 19 16:16:46 2014 +0530 Committer: Daan Hoogland Committed: Wed Nov 19 12:03:30 2014 +0100 -- .../deploy/DeploymentPlanningManagerImpl.java | 24 +++- 1 file changed, 18 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5b620951/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java -- diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java index 0e02d1b..c8eb16e 100644 --- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java +++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java @@ -31,6 +31,8 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; +import org.apache.log4j.Logger; + import org.apache.cloudstack.affinity.AffinityGroupProcessor; import org.apache.cloudstack.affinity.AffinityGroupService; import org.apache.cloudstack.affinity.AffinityGroupVMMapVO; @@ -49,8 +51,7 @@ import org.apache.cloudstack.managed.context.ManagedContextTimerTask; import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.cloudstack.utils.identity.ManagementServerNode; -import org.apache.log4j.Logger; - + import com.cloud.agent.AgentManager; import com.cloud.agent.Listener; import com.cloud.agent.api.AgentControlAnswer; @@ -991,7 +992,10 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy // if all hosts or all pools in the cluster are in avoid set after this // pass, then put the cluster in avoid set. -boolean avoidAllHosts = true, avoidAllPools = true; +boolean avoidAllHosts = true; +boolean avoidAllPools = true; +boolean avoidAllLocalPools = true; +boolean avoidAllSharedPools = true; List allhostsInCluster = _hostDao.listAllUpAndEnabledNonHAHosts(Host.Type.Routing, clusterVO.getId(), clusterVO.getPodId(), clusterVO.getDataCenterId(), null); @@ -1025,8 +1029,8 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy for (StoragePoolVO pool : allPoolsInCluster) { if (!allocatorAvoidOutput.shouldAvoid(pool)) { // there's some pool in the cluster that is not yet in avoid set -avoidAllPools = false; -break; +avoidAllSharedPools = false; +break; } } } @@ -1039,11 +1043,19 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy if (!allocatorAvoidOutput.shouldAvoid(pool)) { // there's some pool in the cluster that is not yet // in avoid set -avoidAllPools = false; +avoidAllLocalPools = false; break; } } } + +if (vmRequiresSharedStorage && vmRequiresLocalStorege) { +avoidAllPools = (avoidAllLocalPools || avoidAllSharedPools) ? true : false; +} else if (vmRequiresSharedStorage) { +avoidAllPools = avoidAllSharedPools; +} else if (vmRequiresLocalStorege) { +avoidAllPools = avoidAllLocalPools; +} } if (avoidAllHosts || avoidAllPools) {
git commit: updated refs/heads/4.3 to 14e048d
Repository: cloudstack Updated Branches: refs/heads/4.3 e6d00bcc6 -> 14e048dad CLOUDSTACK-7752: Fixed deployment planner stuck in infinite loop. If we create VM with shared service offering and attach disk with local disk offering, and one of storage pool is full(cannot be allocated) and other is not full then we are not putting the cluster in avoid list which is causing this infinite loop. Fixed by putting the cluster in avoid list even if one of the storage pool is full(cannot be allocated) Signed-off-by: Daan Hoogland Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/14e048da Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/14e048da Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/14e048da Branch: refs/heads/4.3 Commit: 14e048dadabba67d09f85d12019fcd39b8b47db1 Parents: e6d00bc Author: Anshul Gangwar Authored: Wed Nov 19 09:38:18 2014 +0530 Committer: Daan Hoogland Committed: Wed Nov 19 12:21:02 2014 +0100 -- .../deploy/DeploymentPlanningManagerImpl.java | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14e048da/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java -- diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java index d9e1ecc..04824e4 100644 --- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java +++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java @@ -950,7 +950,10 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy // if all hosts or all pools in the cluster are in avoid set after this // pass, then put the cluster in avoid set. -boolean avoidAllHosts = true, avoidAllPools = true; +boolean avoidAllHosts = true; +boolean avoidAllPools = true; +boolean avoidAllLocalPools = true; +boolean avoidAllSharedPools = true; List allhostsInCluster = _hostDao.listAllUpAndEnabledNonHAHosts(Host.Type.Routing, clusterVO.getId(), clusterVO.getPodId(), clusterVO.getDataCenterId(), null); @@ -985,7 +988,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy for (StoragePoolVO pool : allPoolsInCluster) { if (!allocatorAvoidOutput.shouldAvoid(pool)) { // there's some pool in the cluster that is not yet in avoid set -avoidAllPools = false; +avoidAllSharedPools = false; break; } } @@ -999,11 +1002,19 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy if (!allocatorAvoidOutput.shouldAvoid(pool)) { // there's some pool in the cluster that is not yet // in avoid set -avoidAllPools = false; +avoidAllLocalPools = false; break; } } } + +if (vmRequiresSharedStorage && vmRequiresLocalStorege) { +avoidAllPools = (avoidAllLocalPools || avoidAllSharedPools) ? true : false; +} else if (vmRequiresSharedStorage) { +avoidAllPools = avoidAllSharedPools; +} else if (vmRequiresLocalStorege) { +avoidAllPools = avoidAllLocalPools; +} } if (avoidAllHosts || avoidAllPools) {
git commit: updated refs/heads/volume-upload to 3da3d74
Repository: cloudstack Updated Branches: refs/heads/volume-upload 317606859 -> 3da3d7418 volume upload: PSK exchange between managemnet server and SSVM generated a key during management server start and saved it in configurationt table Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3da3d741 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3da3d741 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3da3d741 Branch: refs/heads/volume-upload Commit: 3da3d7418e9095f52b7a38dedb29d74adfcb0690 Parents: 3176068 Author: Rajani Karuturi Authored: Wed Nov 19 17:53:14 2014 +0530 Committer: Rajani Karuturi Committed: Wed Nov 19 17:53:14 2014 +0530 -- server/src/com/cloud/configuration/Config.java | 4 ++- .../cloud/server/ConfigurationServerImpl.java | 34 +++- 2 files changed, 29 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3da3d741/server/src/com/cloud/configuration/Config.java -- diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java index 435b0d8..4d6fb53 100755 --- a/server/src/com/cloud/configuration/Config.java +++ b/server/src/com/cloud/configuration/Config.java @@ -2059,7 +2059,9 @@ public enum Config { PublishAsynJobEvent("Advanced", ManagementServer.class, Boolean.class, "publish.async.job.events", "true", "enable or disable publishing of usage events on the event bus", null), // StatsCollector -StatsOutPutGraphiteHost("Advanced", ManagementServer.class, String.class, "stats.output.uri", "", "URI to additionally send StatsCollector statistics to", null); +StatsOutPutGraphiteHost("Advanced", ManagementServer.class, String.class, "stats.output.uri", "", "URI to additionally send StatsCollector statistics to", null), + +SSVMPSK("Hidden", ManagementServer.class, String.class, "upload.post.secret.key", "", "PSK with SSVM", null); private final String _category; private final Class _componentClass; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3da3d741/server/src/com/cloud/server/ConfigurationServerImpl.java -- diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java index 7b0d898..0e48b26 100755 --- a/server/src/com/cloud/server/ConfigurationServerImpl.java +++ b/server/src/com/cloud/server/ConfigurationServerImpl.java @@ -303,6 +303,9 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio // store the public and private keys in the database updateKeyPairs(); +// generate a PSK to communicate with SSVM +updateSecondaryStorageVMSharedKey(); + // generate a random password for system vm updateSystemvmPassword(); @@ -962,19 +965,34 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio private void updateSSOKey() { try { -String encodedKey = null; - -// Algorithm for SSO Keys is SHA1, should this be configurable? -KeyGenerator generator = KeyGenerator.getInstance("HmacSHA1"); -SecretKey key = generator.generateKey(); -encodedKey = Base64.encodeBase64URLSafeString(key.getEncoded()); - -_configDao.update(Config.SSOKey.key(), Config.SSOKey.getCategory(), encodedKey); +_configDao.update(Config.SSOKey.key(), Config.SSOKey.getCategory(), getPrivateKey()); } catch (NoSuchAlgorithmException ex) { s_logger.error("error generating sso key", ex); } } +/** + * preshared key to be used by management server to communicate with SSVM during volume/template upload + */ +private void updateSecondaryStorageVMSharedKey() { +try { +_configDao.update(Config.SSVMPSK.key(), Config.SSVMPSK.getCategory(), getPrivateKey()); +} catch (NoSuchAlgorithmException ex) { +s_logger.error("error generating ssvm psk", ex); +} +} + +private String getPrivateKey() throws NoSuchAlgorithmException { +String encodedKey = null; +// Algorithm for generating Key is SHA1, should this be configurable? +KeyGenerator generator = KeyGenerator.getInstance("HmacSHA1"); +SecretKey key = generator.generateKey(); +encodedKey = Base64.encodeBase64URLSafeString(key.getEncoded()); +return encodedKey; + +} + + @DB protected HostPodVO createPod(long userId, String podName, final long zoneId, String gateway, String cidr, final String startIp, String endIp)
git commit: updated refs/heads/4.5 to fee6664
Repository: cloudstack Updated Branches: refs/heads/4.5 968ca060e -> fee666461 CLOUDSTACK-7943: UI > dialog widget > checkbox field > isChecked property > if isChecked property is a funciton, pass "args" along when calling isChecked() function. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fee66646 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fee66646 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fee66646 Branch: refs/heads/4.5 Commit: fee6664612b977ffcce2130eb8a36cf1cf109926 Parents: 968ca06 Author: Jessica Wang Authored: Wed Nov 19 12:00:09 2014 -0800 Committer: Jessica Wang Committed: Wed Nov 19 12:00:54 2014 -0800 -- ui/scripts/ui/dialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fee66646/ui/scripts/ui/dialog.js -- diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js index 332b78f..610cb1a 100644 --- a/ui/scripts/ui/dialog.js +++ b/ui/scripts/ui/dialog.js @@ -411,12 +411,12 @@ }).appendTo($value); var isChecked; if (typeof (field.isChecked) == 'function') { - isChecked = field.isChecked(); + isChecked = field.isChecked(args); } else { isChecked = field.isChecked; } if (isChecked) { - $input.attr('checked', strOrFunc(field.isChecked)); + $input.attr('checked', strOrFunc(field.isChecked, args)); } else { // This is mainly for IE compatibility setTimeout(function() {
git commit: updated refs/heads/4.5 to 2c9310e
Repository: cloudstack Updated Branches: refs/heads/4.5 fee666461 -> 2c9310e62 CLOUDSTACK-7943: UI > storage > volume > create template action > add "XenServer Tools Version 6.1+" checkbox. Default it as its VM's "XenServer Tools Version 6.1+" property. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2c9310e6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2c9310e6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2c9310e6 Branch: refs/heads/4.5 Commit: 2c9310e62210e98ec5584041681a484c2320ef59 Parents: fee6664 Author: Jessica Wang Authored: Wed Nov 19 12:01:43 2014 -0800 Committer: Jessica Wang Committed: Wed Nov 19 12:01:43 2014 -0800 -- ui/scripts/storage.js | 64 -- 1 file changed, 62 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2c9310e6/ui/scripts/storage.js -- diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 12b77f0..4a826c3 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -1057,6 +1057,13 @@ title: 'label.create.template', preFilter: cloudStack.preFilter.createTemplate, desc: '', +preFilter: function(args) { + if (args.context.volumes[0].hypervisor == "XenServer") { + if (isAdmin()) { + args.$form.find('.form-item[rel=xenserverToolsVersion61plus]').css('display', 'inline-block'); + } + } +}, fields: { name: { label: 'label.name', @@ -1069,7 +1076,50 @@ validation: { required: true } -}, +}, +xenserverToolsVersion61plus: { +label: 'label.xenserver.tools.version.61.plus', +isBoolean: true, +isChecked: function (args) { + var b = false; + var vmObj; + $.ajax({ + url: createURL("listVirtualMachines"), + data: { + id: args.context.volumes[0].virtualmachineid + }, + async: false, + success: function(json) { + vmObj = json.listvirtualmachinesresponse.virtualmachine[0]; + } + }); + if (vmObj == undefined) { //e.g. VM has failed over + if (isAdmin()) { +$.ajax({ +url: createURL('listConfigurations'), +data: { +name: 'xenserver.pvdriver.version' +}, +async: false, +success: function (json) { +
git commit: updated refs/heads/master to b11380e
Repository: cloudstack Updated Branches: refs/heads/master f0a4a639d -> b11380eeb CLOUDSTACK-7943: UI > dialog widget > checkbox field > isChecked property > if isChecked property is a funciton, pass "args" along when calling isChecked() function. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b11380ee Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b11380ee Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b11380ee Branch: refs/heads/master Commit: b11380eebe6bd5af62f88de8853028200528b77b Parents: f0a4a63 Author: Jessica Wang Authored: Wed Nov 19 12:00:09 2014 -0800 Committer: Jessica Wang Committed: Wed Nov 19 12:04:16 2014 -0800 -- ui/scripts/ui/dialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b11380ee/ui/scripts/ui/dialog.js -- diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js index 332b78f..610cb1a 100644 --- a/ui/scripts/ui/dialog.js +++ b/ui/scripts/ui/dialog.js @@ -411,12 +411,12 @@ }).appendTo($value); var isChecked; if (typeof (field.isChecked) == 'function') { - isChecked = field.isChecked(); + isChecked = field.isChecked(args); } else { isChecked = field.isChecked; } if (isChecked) { - $input.attr('checked', strOrFunc(field.isChecked)); + $input.attr('checked', strOrFunc(field.isChecked, args)); } else { // This is mainly for IE compatibility setTimeout(function() {
git commit: updated refs/heads/master to 7b6f496
Repository: cloudstack Updated Branches: refs/heads/master b11380eeb -> 7b6f49617 CLOUDSTACK-7943: UI > storage > volume > create template action > add "XenServer Tools Version 6.1+" checkbox. Default it as its VM's "XenServer Tools Version 6.1+" property. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7b6f4961 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7b6f4961 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7b6f4961 Branch: refs/heads/master Commit: 7b6f49617d35ccbb237a8ba36424e987b5b23a3b Parents: b11380e Author: Jessica Wang Authored: Wed Nov 19 12:01:43 2014 -0800 Committer: Jessica Wang Committed: Wed Nov 19 12:04:46 2014 -0800 -- ui/scripts/storage.js | 64 -- 1 file changed, 62 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7b6f4961/ui/scripts/storage.js -- diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index d18b211..e628c61 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -1063,6 +1063,13 @@ title: 'label.create.template', preFilter: cloudStack.preFilter.createTemplate, desc: '', +preFilter: function(args) { + if (args.context.volumes[0].hypervisor == "XenServer") { + if (isAdmin()) { + args.$form.find('.form-item[rel=xenserverToolsVersion61plus]').css('display', 'inline-block'); + } + } +}, fields: { name: { label: 'label.name', @@ -1075,7 +1082,50 @@ validation: { required: true } -}, +}, +xenserverToolsVersion61plus: { +label: 'label.xenserver.tools.version.61.plus', +isBoolean: true, +isChecked: function (args) { + var b = false; + var vmObj; + $.ajax({ + url: createURL("listVirtualMachines"), + data: { + id: args.context.volumes[0].virtualmachineid + }, + async: false, + success: function(json) { + vmObj = json.listvirtualmachinesresponse.virtualmachine[0]; + } + }); + if (vmObj == undefined) { //e.g. VM has failed over + if (isAdmin()) { +$.ajax({ +url: createURL('listConfigurations'), +data: { +name: 'xenserver.pvdriver.version' +}, +async: false, +success: function (json) { +
git commit: updated refs/heads/master to bb352da
Repository: cloudstack Updated Branches: refs/heads/master 7b6f49617 -> bb352da30 CLOUDSTACK-7944: Ensure ipv6 is enabled in sysctl.conf The booting sequence result in change of IPv6 related sysctl options was overrided by sysctl.conf which is loaded later. So this patch would patch sysctl.conf in VR as well, ensure IPv6 would be enabled during booting period otherwise the network setup may not work, result in IPv6 VM deployment failure. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bb352da3 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bb352da3 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bb352da3 Branch: refs/heads/master Commit: bb352da3024844b71dcaacb866c3b464c50408a6 Parents: 7b6f496 Author: Sheng Yang Authored: Wed Nov 19 14:25:57 2014 -0800 Committer: Sheng Yang Committed: Wed Nov 19 14:49:18 2014 -0800 -- systemvm/patches/debian/config/etc/init.d/cloud-early-config | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bb352da3/systemvm/patches/debian/config/etc/init.d/cloud-early-config -- diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config index 9942f2d..11d0612 100755 --- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config +++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config @@ -398,12 +398,16 @@ setup_interface_ipv6() { sysctl net.ipv6.conf.all.disable_ipv6=0 sysctl net.ipv6.conf.all.forwarding=1 sysctl net.ipv6.conf.all.accept_ra=1 - + + sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf + sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf + sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf + local intfnum=$1 local ipv6="$2" local prelen="$3" local intf=eth${intfnum} - + echo "iface $intf inet6 static" >> /etc/network/interfaces echo " address $ipv6 " >> /etc/network/interfaces echo " netmask $prelen" >> /etc/network/interfaces
git commit: updated refs/heads/4.5 to 50b262e
Repository: cloudstack Updated Branches: refs/heads/4.5 2c9310e62 -> 50b262e02 CLOUDSTACK-7944: Ensure ipv6 is enabled in sysctl.conf The booting sequence result in change of IPv6 related sysctl options was overrided by sysctl.conf which is loaded later. So this patch would patch sysctl.conf in VR as well, ensure IPv6 would be enabled during booting period otherwise the network setup may not work, result in IPv6 VM deployment failure. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/50b262e0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/50b262e0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/50b262e0 Branch: refs/heads/4.5 Commit: 50b262e02a898a1aafc592d9f72cd8a3b6b272ff Parents: 2c9310e Author: Sheng Yang Authored: Wed Nov 19 14:25:57 2014 -0800 Committer: Sheng Yang Committed: Wed Nov 19 14:50:03 2014 -0800 -- systemvm/patches/debian/config/etc/init.d/cloud-early-config | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/50b262e0/systemvm/patches/debian/config/etc/init.d/cloud-early-config -- diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config index 9942f2d..11d0612 100755 --- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config +++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config @@ -398,12 +398,16 @@ setup_interface_ipv6() { sysctl net.ipv6.conf.all.disable_ipv6=0 sysctl net.ipv6.conf.all.forwarding=1 sysctl net.ipv6.conf.all.accept_ra=1 - + + sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf + sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf + sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf + local intfnum=$1 local ipv6="$2" local prelen="$3" local intf=eth${intfnum} - + echo "iface $intf inet6 static" >> /etc/network/interfaces echo " address $ipv6 " >> /etc/network/interfaces echo " netmask $prelen" >> /etc/network/interfaces
git commit: updated refs/heads/4.5 to 6dc7712
Repository: cloudstack Updated Branches: refs/heads/4.5 50b262e02 -> 6dc771279 CLOUDSTACK-7613: UI > Infrastructure > CPU Sockets > add a new row for "XenServer 6.5.0". Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6dc77127 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6dc77127 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6dc77127 Branch: refs/heads/4.5 Commit: 6dc77127938c39c330f71cdc22b057ba64804aa7 Parents: 50b262e Author: Jessica Wang Authored: Wed Nov 19 15:11:01 2014 -0800 Committer: Jessica Wang Committed: Wed Nov 19 15:11:01 2014 -0800 -- ui/scripts/system.js | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dc77127/ui/scripts/system.js -- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 1029254..67c3a2a 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -9306,10 +9306,14 @@ var totalHostCount = 0; var currentPage = 1; var returnedHostCount = 0; + + var returnedHostCountForXenServer650 = 0; //'XenServer 6.5.0' + var returnedHostCpusocketsSumForXenServer650 = 0; - var returnedHostCountForXenServer61x = 0; //'XenServer 6.1.x and before' var returnedHostCountForXenServer620 = 0; //'XenServer 6.2.0' - var returnedHostCpusocketsSumForXenServer620 = 0; + var returnedHostCpusocketsSumForXenServer620 = 0; + + var returnedHostCountForXenServer61x = 0; //'XenServer 6.1.x and before' var callListHostsWithPage = function() { $.ajax({ @@ -9330,9 +9334,13 @@ returnedHostCount += json.listhostsresponse.host.length; var items = json.listhostsresponse.host; - for (var i = 0; i < items.length; i++) { - //"hypervisorversion" == "6.2.0" - if (items[i].hypervisorversion == "6.2.0") { + for (var i = 0; i < items.length; i++) { + if (items[i].hypervisorversion == "6.5.0") { + returnedHostCountForXenServer650 ++; + if (items[i].cpusockets != undefined && isNaN(items[i].cpusockets) == false) { + returnedHostCpusocketsSumForXenServer650 += items[i].cpusockets; + } + } else if (items[i].hypervisorversion == "6.2.0") { returnedHostCountForXenServer620 ++; if (items[i].cpusockets != undefined && isNaN(items[i].cpusockets) == false) { returnedHostCpusocketsSumForXenServer620 += items[i].cpusockets; @@ -9353,9 +9361,9 @@ callListHostsWithPage(); array1.push({ -hypervisor: 'XenServer 6.1.x and befor
git commit: updated refs/heads/master to e32eec8
Repository: cloudstack Updated Branches: refs/heads/master bb352da30 -> e32eec8b3 CLOUDSTACK-7613: UI > Infrastructure > CPU Sockets > add a new row for "XenServer 6.5.0". Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e32eec8b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e32eec8b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e32eec8b Branch: refs/heads/master Commit: e32eec8b3eacd1d90f706946d8d0c5248fbd8bcd Parents: bb352da Author: Jessica Wang Authored: Wed Nov 19 15:11:01 2014 -0800 Committer: Jessica Wang Committed: Wed Nov 19 15:12:50 2014 -0800 -- ui/scripts/system.js | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e32eec8b/ui/scripts/system.js -- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index f281265..c8a5bb8 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -9318,10 +9318,14 @@ var totalHostCount = 0; var currentPage = 1; var returnedHostCount = 0; + + var returnedHostCountForXenServer650 = 0; //'XenServer 6.5.0' + var returnedHostCpusocketsSumForXenServer650 = 0; - var returnedHostCountForXenServer61x = 0; //'XenServer 6.1.x and before' var returnedHostCountForXenServer620 = 0; //'XenServer 6.2.0' - var returnedHostCpusocketsSumForXenServer620 = 0; + var returnedHostCpusocketsSumForXenServer620 = 0; + + var returnedHostCountForXenServer61x = 0; //'XenServer 6.1.x and before' var callListHostsWithPage = function() { $.ajax({ @@ -9342,9 +9346,13 @@ returnedHostCount += json.listhostsresponse.host.length; var items = json.listhostsresponse.host; - for (var i = 0; i < items.length; i++) { - //"hypervisorversion" == "6.2.0" - if (items[i].hypervisorversion == "6.2.0") { + for (var i = 0; i < items.length; i++) { + if (items[i].hypervisorversion == "6.5.0") { + returnedHostCountForXenServer650 ++; + if (items[i].cpusockets != undefined && isNaN(items[i].cpusockets) == false) { + returnedHostCpusocketsSumForXenServer650 += items[i].cpusockets; + } + } else if (items[i].hypervisorversion == "6.2.0") { returnedHostCountForXenServer620 ++; if (items[i].cpusockets != undefined && isNaN(items[i].cpusockets) == false) { returnedHostCpusocketsSumForXenServer620 += items[i].cpusockets; @@ -9365,9 +9373,9 @@ callListHostsWithPage(); array1.push({ -hypervisor: 'XenServer 6.1.x and
git commit: updated refs/heads/master to 0e3aebb
Repository: cloudstack Updated Branches: refs/heads/master e32eec8b3 -> 0e3aebbb9 CLOUDSTACK-5446: delete all the leftover snapshots on primary storage in case of snapshot errors, after a new backup snapshot is finished Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0e3aebbb Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0e3aebbb Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0e3aebbb Branch: refs/heads/master Commit: 0e3aebbb9db795b1acbc14d4f035da3cb2345f34 Parents: e32eec8 Author: Edison Su Authored: Wed Nov 19 14:31:51 2014 -0800 Committer: Edison Su Committed: Wed Nov 19 15:53:06 2014 -0800 -- scripts/storage/qcow2/managesnapshot.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e3aebbb/scripts/storage/qcow2/managesnapshot.sh -- diff --git a/scripts/storage/qcow2/managesnapshot.sh b/scripts/storage/qcow2/managesnapshot.sh index 1ee69db..4225407 100755 --- a/scripts/storage/qcow2/managesnapshot.sh +++ b/scripts/storage/qcow2/managesnapshot.sh @@ -152,7 +152,8 @@ destroy_snapshot() { fi lvm lvremove -f "${vg}/${snapshotname}-cow" elif [ -f $disk ]; then - $qemu_img snapshot -d "$snapshotname" $disk + #delete all the existing snapshots + $qemu_img snapshot -l $disk |tail -n +3|awk '{print $1}'|xargs -I {} $qemu_img snapshot -d {} $disk >&2 if [ $? -gt 0 ] then failed=2
git commit: updated refs/heads/4.5 to 2667855
Repository: cloudstack Updated Branches: refs/heads/4.5 6dc771279 -> 2667855cc CLOUDSTACK-5446: delete all the leftover snapshots on primary storage in case of snapshot errors, after a new backup snapshot is finished Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2667855c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2667855c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2667855c Branch: refs/heads/4.5 Commit: 2667855ccb932f9a03ddf6639f6411c73fea1b2c Parents: 6dc7712 Author: Edison Su Authored: Wed Nov 19 14:31:51 2014 -0800 Committer: Edison Su Committed: Wed Nov 19 15:54:09 2014 -0800 -- scripts/storage/qcow2/managesnapshot.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2667855c/scripts/storage/qcow2/managesnapshot.sh -- diff --git a/scripts/storage/qcow2/managesnapshot.sh b/scripts/storage/qcow2/managesnapshot.sh index 1ee69db..4225407 100755 --- a/scripts/storage/qcow2/managesnapshot.sh +++ b/scripts/storage/qcow2/managesnapshot.sh @@ -152,7 +152,8 @@ destroy_snapshot() { fi lvm lvremove -f "${vg}/${snapshotname}-cow" elif [ -f $disk ]; then - $qemu_img snapshot -d "$snapshotname" $disk + #delete all the existing snapshots + $qemu_img snapshot -l $disk |tail -n +3|awk '{print $1}'|xargs -I {} $qemu_img snapshot -d {} $disk >&2 if [ $? -gt 0 ] then failed=2
git commit: updated refs/heads/4.5 to 5018db8
Repository: cloudstack Updated Branches: refs/heads/4.5 2667855cc -> 5018db8b6 CLOUDSTACK-7945: set removed field in snapshots table in case of snaphsot failure. Reviewed-by: Frank Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5018db8b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5018db8b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5018db8b Branch: refs/heads/4.5 Commit: 5018db8b62dbb9ddb6612914d828baf2f98c43bb Parents: 2667855 Author: Edison Su Authored: Mon Nov 17 14:35:48 2014 -0800 Committer: Edison Su Committed: Wed Nov 19 15:58:07 2014 -0800 -- .../org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5018db8b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java -- diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java index 309f6d6..259c51e 100644 --- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java @@ -307,6 +307,7 @@ public class SnapshotServiceImpl implements SnapshotService { srcSnapshot.processEvent(Event.OperationSuccessed); srcSnapshot.processEvent(Snapshot.Event.OperationFailed); +_snapshotDao.remove(srcSnapshot.getId()); } catch (NoTransitionException e) { s_logger.debug("Failed to update state: " + e.toString()); }
git commit: updated refs/heads/master to c05cda0
Repository: cloudstack Updated Branches: refs/heads/master 0e3aebbb9 -> c05cda0d2 CLOUDSTACK-7945: set removed field in snapshots table in case of snaphsot failure. Reviewed-by: Frank Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c05cda0d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c05cda0d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c05cda0d Branch: refs/heads/master Commit: c05cda0d28d86bb0f0b87cf37d0828a0717b9045 Parents: 0e3aebb Author: Edison Su Authored: Mon Nov 17 14:35:48 2014 -0800 Committer: Edison Su Committed: Wed Nov 19 15:58:47 2014 -0800 -- .../org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c05cda0d/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java -- diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java index 309f6d6..259c51e 100644 --- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java @@ -307,6 +307,7 @@ public class SnapshotServiceImpl implements SnapshotService { srcSnapshot.processEvent(Event.OperationSuccessed); srcSnapshot.processEvent(Snapshot.Event.OperationFailed); +_snapshotDao.remove(srcSnapshot.getId()); } catch (NoTransitionException e) { s_logger.debug("Failed to update state: " + e.toString()); }
git commit: updated refs/heads/4.5 to d856a2a
Repository: cloudstack Updated Branches: refs/heads/4.5 5018db8b6 -> d856a2aca CLOUDSTACK-7946: remove leftover state in volume and snapshot table in case of mgt server shutdown during storage operation. Reviewed-by: Min Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d856a2ac Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d856a2ac Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d856a2ac Branch: refs/heads/4.5 Commit: d856a2acad99875bff0ea7902c84a3dbf913d506 Parents: 5018db8 Author: Edison Su Authored: Tue Nov 11 16:02:20 2014 -0800 Committer: Edison Su Committed: Wed Nov 19 16:08:27 2014 -0800 -- .../service/VolumeOrchestrationService.java | 4 +- .../subsystem/api/storage/SnapshotService.java | 2 + .../src/com/cloud/vm/VmWorkAttachVolume.java| 38 ++ .../src/com/cloud/vm/VmWorkDetachVolume.java| 32 .../src/com/cloud/vm/VmWorkMigrateVolume.java | 44 +++ .../src/com/cloud/vm/VmWorkResizeVolume.java| 71 ++ .../com/cloud/vm/VmWorkTakeVolumeSnapshot.java | 52 + .../com/cloud/vm/VirtualMachineManagerImpl.java | 1 + .../orchestration/VolumeOrchestrator.java | 77 +++- .../src/com/cloud/storage/dao/VolumeDao.java| 2 + .../com/cloud/storage/dao/VolumeDaoImpl.java| 9 +++ .../storage/snapshot/SnapshotServiceImpl.java | 22 ++ .../com/cloud/cluster/ClusterManagerImpl.java | 4 +- .../framework/jobs/AsyncJobManager.java | 2 + .../framework/jobs/dao/AsyncJobDao.java | 2 + .../framework/jobs/dao/AsyncJobDaoImpl.java | 17 + .../jobs/impl/AsyncJobManagerImpl.java | 5 ++ .../com/cloud/storage/VmWorkAttachVolume.java | 40 -- .../com/cloud/storage/VmWorkDetachVolume.java | 34 - .../com/cloud/storage/VmWorkMigrateVolume.java | 46 .../com/cloud/storage/VmWorkResizeVolume.java | 73 --- .../cloud/storage/VmWorkTakeVolumeSnapshot.java | 54 -- 22 files changed, 379 insertions(+), 252 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d856a2ac/engine/api/src/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java -- diff --git a/engine/api/src/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java b/engine/api/src/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java index df0b5e8..ef1d934 100644 --- a/engine/api/src/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java +++ b/engine/api/src/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java @@ -23,6 +23,7 @@ import java.util.Set; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.framework.config.ConfigKey; import com.cloud.agent.api.to.VirtualMachineTO; import com.cloud.dc.DataCenter; @@ -45,7 +46,6 @@ import com.cloud.utils.fsm.NoTransitionException; import com.cloud.vm.DiskProfile; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; -import org.apache.cloudstack.framework.config.ConfigKey; /** * VolumeOrchestrationService is a PURE orchestration service on CloudStack @@ -85,6 +85,8 @@ public interface VolumeOrchestrationService { Volume migrateVolume(Volume volume, StoragePool destPool) throws StorageUnavailableException; +void cleanupStorageJobs(); + void destroyVolume(Volume volume); DiskProfile allocateRawVolume(Type type, String name, DiskOffering offering, Long size, Long minIops, Long maxIops, VirtualMachine vm, VirtualMachineTemplate template, Account owner); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d856a2ac/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java -- diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java index 000b9ec..4edeb55 100644 --- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java @@ -27,4 +27,6 @@ public interface SnapshotService { boolean revertSnapshot(Long snapshotId); void syncVolumeSnapshotsToRegionStore(long volumeId, DataStore store); + +void cleanupVolumeDuringSnapshotFailure(Long volumeId, Long snapshotId); } http://git-wip-us.apache.org/repos/
git commit: updated refs/heads/4.5 to 15c0efb
Repository: cloudstack Updated Branches: refs/heads/4.5 d856a2aca -> 15c0efb77 CLOUDSTACK-7946: fix compile Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/15c0efb7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/15c0efb7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/15c0efb7 Branch: refs/heads/4.5 Commit: 15c0efb77432351bfaaa76e41c4b1c847f60a2ca Parents: d856a2a Author: Edison Su Authored: Tue Nov 11 16:25:24 2014 -0800 Committer: Edison Su Committed: Wed Nov 19 16:08:54 2014 -0800 -- server/src/com/cloud/storage/VolumeApiServiceImpl.java | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15c0efb7/server/src/com/cloud/storage/VolumeApiServiceImpl.java -- diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java index b9ed59a..26678e6 100644 --- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java +++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java @@ -138,10 +138,15 @@ import com.cloud.vm.VMInstanceVO; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachine.State; import com.cloud.vm.VmWork; +import com.cloud.vm.VmWorkAttachVolume; import com.cloud.vm.VmWorkConstants; +import com.cloud.vm.VmWorkDetachVolume; import com.cloud.vm.VmWorkJobHandler; import com.cloud.vm.VmWorkJobHandlerProxy; +import com.cloud.vm.VmWorkMigrateVolume; +import com.cloud.vm.VmWorkResizeVolume; import com.cloud.vm.VmWorkSerializer; +import com.cloud.vm.VmWorkTakeVolumeSnapshot; import com.cloud.vm.dao.UserVmDao; import com.cloud.vm.dao.VMInstanceDao; import com.cloud.vm.snapshot.VMSnapshotVO;
git commit: updated refs/heads/master to 2ccecce
Repository: cloudstack Updated Branches: refs/heads/master 67113ff0b -> 2ccecce51 CLOUDSTACK-7946: fix compile Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2ccecce5 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2ccecce5 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2ccecce5 Branch: refs/heads/master Commit: 2ccecce515297bd74a78645e45e7a66d1eb43a83 Parents: 67113ff Author: Edison Su Authored: Tue Nov 11 16:25:24 2014 -0800 Committer: Edison Su Committed: Wed Nov 19 16:09:30 2014 -0800 -- server/src/com/cloud/storage/VolumeApiServiceImpl.java | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ccecce5/server/src/com/cloud/storage/VolumeApiServiceImpl.java -- diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java index a6c6ca7..928c63b 100644 --- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java +++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java @@ -138,10 +138,15 @@ import com.cloud.vm.VMInstanceVO; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachine.State; import com.cloud.vm.VmWork; +import com.cloud.vm.VmWorkAttachVolume; import com.cloud.vm.VmWorkConstants; +import com.cloud.vm.VmWorkDetachVolume; import com.cloud.vm.VmWorkJobHandler; import com.cloud.vm.VmWorkJobHandlerProxy; +import com.cloud.vm.VmWorkMigrateVolume; +import com.cloud.vm.VmWorkResizeVolume; import com.cloud.vm.VmWorkSerializer; +import com.cloud.vm.VmWorkTakeVolumeSnapshot; import com.cloud.vm.dao.UserVmDao; import com.cloud.vm.dao.VMInstanceDao; import com.cloud.vm.snapshot.VMSnapshotVO;
git commit: updated refs/heads/master to 4140811
Repository: cloudstack Updated Branches: refs/heads/master 2ccecce51 -> 414081154 CLOUDSTACK-7947: double check if parent snapshot is removed or not, when creating new snapshot Reviewed-by: Min Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/41408115 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/41408115 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/41408115 Branch: refs/heads/master Commit: 414081154942ff03bd4b73dd834eeec559608799 Parents: 2ccecce Author: Edison Su Authored: Wed Nov 12 12:07:49 2014 -0800 Committer: Edison Su Committed: Wed Nov 19 16:13:05 2014 -0800 -- .../storage/snapshot/XenserverSnapshotStrategy.java | 4 .../storage/datastore/ObjectInDataStoreManagerImpl.java | 9 - .../src/com/cloud/storage/snapshot/SnapshotManagerImpl.java | 4 +++- 3 files changed, 15 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/41408115/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java -- diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java index 8d6886e..90efcde 100644 --- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java @@ -198,6 +198,10 @@ public class XenserverSnapshotStrategy extends SnapshotStrategyBase { } if (Snapshot.State.Error.equals(snapshotVO.getState())) { +List storeRefs = snapshotStoreDao.findBySnapshotId(snapshotId); +for (SnapshotDataStoreVO ref : storeRefs) { +snapshotStoreDao.expunge(ref.getId()); +} snapshotDao.remove(snapshotId); return true; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/41408115/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java -- diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java index fbce860..fa91e4f 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java @@ -45,6 +45,7 @@ import com.cloud.agent.api.to.DataObjectType; import com.cloud.agent.api.to.S3TO; import com.cloud.exception.ConcurrentOperationException; import com.cloud.storage.DataStoreRole; +import com.cloud.storage.SnapshotVO; import com.cloud.storage.VMTemplateStoragePoolVO; import com.cloud.storage.dao.SnapshotDao; import com.cloud.storage.dao.VMTemplateDao; @@ -119,7 +120,13 @@ public class ObjectInDataStoreManagerImpl implements ObjectInDataStoreManager { ss.setPhysicalSize(snapshotInfo.getSize()); // this physical size will get updated with actual size once the snapshot backup is done. SnapshotDataStoreVO snapshotDataStoreVO = snapshotDataStoreDao.findParent(dataStore.getRole(), dataStore.getId(), snapshotInfo.getVolumeId()); if (snapshotDataStoreVO != null) { - ss.setParentSnapshotId(snapshotDataStoreVO.getSnapshotId()); +//Double check the snapshot is removed or not +SnapshotVO parentSnap = snapshotDao.findById(snapshotDataStoreVO.getSnapshotId()); +if (parentSnap != null) { + ss.setParentSnapshotId(snapshotDataStoreVO.getSnapshotId()); +} else { +s_logger.debug("find inconsistent db for snapshot " + snapshotDataStoreVO.getSnapshotId()); +} } ss.setState(ObjectInDataStoreStateMachine.State.Allocated); ss = snapshotDataStoreDao.persist(ss); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/41408115/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java -- diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index bcb2242..04a0489 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -26,7 +26,6 @
git commit: updated refs/heads/4.5 to bd79965
Repository: cloudstack Updated Branches: refs/heads/4.5 15c0efb77 -> bd7996532 CLOUDSTACK-7947: double check if parent snapshot is removed or not, when creating new snapshot Reviewed-by: Min Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bd799653 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bd799653 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bd799653 Branch: refs/heads/4.5 Commit: bd799653293f9dc257ab68a3b04f6ea769e08e36 Parents: 15c0efb Author: Edison Su Authored: Wed Nov 12 12:07:49 2014 -0800 Committer: Edison Su Committed: Wed Nov 19 16:12:28 2014 -0800 -- .../storage/snapshot/XenserverSnapshotStrategy.java | 4 .../storage/datastore/ObjectInDataStoreManagerImpl.java | 9 - .../src/com/cloud/storage/snapshot/SnapshotManagerImpl.java | 4 +++- 3 files changed, 15 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bd799653/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java -- diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java index 8d6886e..90efcde 100644 --- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java @@ -198,6 +198,10 @@ public class XenserverSnapshotStrategy extends SnapshotStrategyBase { } if (Snapshot.State.Error.equals(snapshotVO.getState())) { +List storeRefs = snapshotStoreDao.findBySnapshotId(snapshotId); +for (SnapshotDataStoreVO ref : storeRefs) { +snapshotStoreDao.expunge(ref.getId()); +} snapshotDao.remove(snapshotId); return true; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bd799653/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java -- diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java index fbce860..fa91e4f 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java @@ -45,6 +45,7 @@ import com.cloud.agent.api.to.DataObjectType; import com.cloud.agent.api.to.S3TO; import com.cloud.exception.ConcurrentOperationException; import com.cloud.storage.DataStoreRole; +import com.cloud.storage.SnapshotVO; import com.cloud.storage.VMTemplateStoragePoolVO; import com.cloud.storage.dao.SnapshotDao; import com.cloud.storage.dao.VMTemplateDao; @@ -119,7 +120,13 @@ public class ObjectInDataStoreManagerImpl implements ObjectInDataStoreManager { ss.setPhysicalSize(snapshotInfo.getSize()); // this physical size will get updated with actual size once the snapshot backup is done. SnapshotDataStoreVO snapshotDataStoreVO = snapshotDataStoreDao.findParent(dataStore.getRole(), dataStore.getId(), snapshotInfo.getVolumeId()); if (snapshotDataStoreVO != null) { - ss.setParentSnapshotId(snapshotDataStoreVO.getSnapshotId()); +//Double check the snapshot is removed or not +SnapshotVO parentSnap = snapshotDao.findById(snapshotDataStoreVO.getSnapshotId()); +if (parentSnap != null) { + ss.setParentSnapshotId(snapshotDataStoreVO.getSnapshotId()); +} else { +s_logger.debug("find inconsistent db for snapshot " + snapshotDataStoreVO.getSnapshotId()); +} } ss.setState(ObjectInDataStoreStateMachine.State.Allocated); ss = snapshotDataStoreDao.persist(ss); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bd799653/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java -- diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index 369b42c..1e13682 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -26,7 +26,6 @@ impo
git commit: updated refs/heads/master to 67113ff
Repository: cloudstack Updated Branches: refs/heads/master c05cda0d2 -> 67113ff0b CLOUDSTACK-7946: remove leftover state in volume and snapshot table in case of mgt server shutdown during storage operation. Reviewed-by: Min Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/67113ff0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/67113ff0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/67113ff0 Branch: refs/heads/master Commit: 67113ff0b28f05ece2a76e11bcc136bed648e7c6 Parents: c05cda0 Author: Edison Su Authored: Tue Nov 11 16:02:20 2014 -0800 Committer: Edison Su Committed: Wed Nov 19 16:06:37 2014 -0800 -- .../service/VolumeOrchestrationService.java | 4 +- .../subsystem/api/storage/SnapshotService.java | 2 + .../src/com/cloud/vm/VmWorkAttachVolume.java| 38 ++ .../src/com/cloud/vm/VmWorkDetachVolume.java| 32 .../src/com/cloud/vm/VmWorkMigrateVolume.java | 44 +++ .../src/com/cloud/vm/VmWorkResizeVolume.java| 71 ++ .../com/cloud/vm/VmWorkTakeVolumeSnapshot.java | 52 + .../com/cloud/vm/VirtualMachineManagerImpl.java | 1 + .../orchestration/VolumeOrchestrator.java | 77 +++- .../src/com/cloud/storage/dao/VolumeDao.java| 2 + .../com/cloud/storage/dao/VolumeDaoImpl.java| 9 +++ .../storage/snapshot/SnapshotServiceImpl.java | 22 ++ .../com/cloud/cluster/ClusterManagerImpl.java | 4 +- .../framework/jobs/AsyncJobManager.java | 2 + .../framework/jobs/dao/AsyncJobDao.java | 2 + .../framework/jobs/dao/AsyncJobDaoImpl.java | 17 + .../jobs/impl/AsyncJobManagerImpl.java | 5 ++ .../com/cloud/storage/VmWorkAttachVolume.java | 40 -- .../com/cloud/storage/VmWorkDetachVolume.java | 34 - .../com/cloud/storage/VmWorkMigrateVolume.java | 46 .../com/cloud/storage/VmWorkResizeVolume.java | 73 --- .../cloud/storage/VmWorkTakeVolumeSnapshot.java | 54 -- 22 files changed, 379 insertions(+), 252 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67113ff0/engine/api/src/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java -- diff --git a/engine/api/src/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java b/engine/api/src/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java index 281de92..1f198a2 100644 --- a/engine/api/src/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java +++ b/engine/api/src/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java @@ -24,6 +24,7 @@ import java.util.Set; import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.framework.config.ConfigKey; import com.cloud.agent.api.to.VirtualMachineTO; import com.cloud.dc.DataCenter; @@ -46,7 +47,6 @@ import com.cloud.utils.fsm.NoTransitionException; import com.cloud.vm.DiskProfile; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; -import org.apache.cloudstack.framework.config.ConfigKey; /** * VolumeOrchestrationService is a PURE orchestration service on CloudStack @@ -86,6 +86,8 @@ public interface VolumeOrchestrationService { Volume migrateVolume(Volume volume, StoragePool destPool) throws StorageUnavailableException; +void cleanupStorageJobs(); + void destroyVolume(Volume volume); DiskProfile allocateRawVolume(Type type, String name, DiskOffering offering, Long size, Long minIops, Long maxIops, VirtualMachine vm, VirtualMachineTemplate template, Account owner); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67113ff0/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java -- diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java index 000b9ec..4edeb55 100644 --- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java @@ -27,4 +27,6 @@ public interface SnapshotService { boolean revertSnapshot(Long snapshotId); void syncVolumeSnapshotsToRegionStore(long volumeId, DataStore store); + +void cleanupVolumeDuringSnapshotFailu
git commit: updated refs/heads/4.5 to ab19edf
Repository: cloudstack Updated Branches: refs/heads/4.5 bd7996532 -> ab19edf09 CLOUDSTACK-7742: root cause: when vmsync reports system VM is down, CCP doesn't release the VM resource before starting it. fix: make sure cleanup is called for a VM when it is reported as Stopped Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ab19edf0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ab19edf0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ab19edf0 Branch: refs/heads/4.5 Commit: ab19edf09d4f87f2807c52ba279aeb013f2545f9 Parents: bd79965 Author: Anthony Xu Authored: Wed Nov 19 16:27:51 2014 -0800 Committer: Anthony Xu Committed: Wed Nov 19 16:27:51 2014 -0800 -- .../com/cloud/vm/VirtualMachineManagerImpl.java | 42 ++-- .../src/com/cloud/dc/dao/DataCenterDaoImpl.java | 1 + .../cloud/dc/dao/DataCenterIpAddressDao.java| 2 + .../dc/dao/DataCenterIpAddressDaoImpl.java | 16 4 files changed, 40 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ab19edf0/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java -- diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index 4d687d9..8eac2bb 100755 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -1276,13 +1276,27 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac s_logger.debug("Cleaning up resources for the vm " + vm + " in " + state + " state"); try { if (state == State.Starting) { -Step step = work.getStep(); -if (step == Step.Starting && !cleanUpEvenIfUnableToStop) { -s_logger.warn("Unable to cleanup vm " + vm + "; work state is incorrect: " + step); -return false; -} +if (work != null) { +Step step = work.getStep(); +if (step == Step.Starting && !cleanUpEvenIfUnableToStop) { +s_logger.warn("Unable to cleanup vm " + vm + "; work state is incorrect: " + step); +return false; +} + +if (step == Step.Started || step == Step.Starting || step == Step.Release) { +if (vm.getHostId() != null) { +if (!sendStop(guru, profile, cleanUpEvenIfUnableToStop, false)) { +s_logger.warn("Failed to stop vm " + vm + " in " + State.Starting + " state as a part of cleanup process"); +return false; +} +} +} -if (step == Step.Started || step == Step.Starting || step == Step.Release) { +if (step != Step.Release && step != Step.Prepare && step != Step.Started && step != Step.Starting) { +s_logger.debug("Cleanup is not needed for vm " + vm + "; work state is incorrect: " + step); +return true; + } +} else { if (vm.getHostId() != null) { if (!sendStop(guru, profile, cleanUpEvenIfUnableToStop, false)) { s_logger.warn("Failed to stop vm " + vm + " in " + State.Starting + " state as a part of cleanup process"); @@ -1291,10 +1305,6 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac } } -if (step != Step.Release && step != Step.Prepare && step != Step.Started && step != Step.Starting) { -s_logger.debug("Cleanup is not needed for vm " + vm + "; work state is incorrect: " + step); -return true; -} } else if (state == State.Stopping) { if (vm.getHostId() != null) { if (!sendStop(guru, profile, cleanUpEvenIfUnableToStop, false)) { @@ -1446,20 +1456,10 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac if (!cleanUpEvenIfUnableToStop) { throw new CloudRuntimeException("We cannot stop " + vm + " when it is in state " + vm.getState()); } -boolean doCleanup = false; +boolean doCleanup = true; if (s_logger.isDebugEnabled()) { s_logger.debug("Unable to transition the state but we're moving on because i
git commit: updated refs/heads/master to 02e22db
Repository: cloudstack Updated Branches: refs/heads/master 414081154 -> 02e22dba7 CLOUDSTACK-7742: root cause: when vmsync reports system VM is down, CCP doesn't release the VM resource before starting it. fix: make sure cleanup is called for a VM when it is reported as Stopped Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/02e22dba Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/02e22dba Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/02e22dba Branch: refs/heads/master Commit: 02e22dba7d36a1be04f715efdf5dcaa085f00241 Parents: 4140811 Author: Anthony Xu Authored: Wed Nov 19 16:27:51 2014 -0800 Committer: Anthony Xu Committed: Wed Nov 19 16:30:56 2014 -0800 -- .../com/cloud/vm/VirtualMachineManagerImpl.java | 42 ++-- .../src/com/cloud/dc/dao/DataCenterDaoImpl.java | 1 + .../cloud/dc/dao/DataCenterIpAddressDao.java| 2 + .../dc/dao/DataCenterIpAddressDaoImpl.java | 16 4 files changed, 40 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02e22dba/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java -- diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index fa8b7b6..be88b4e 100755 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -1283,13 +1283,27 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac s_logger.debug("Cleaning up resources for the vm " + vm + " in " + state + " state"); try { if (state == State.Starting) { -Step step = work.getStep(); -if (step == Step.Starting && !cleanUpEvenIfUnableToStop) { -s_logger.warn("Unable to cleanup vm " + vm + "; work state is incorrect: " + step); -return false; -} +if (work != null) { +Step step = work.getStep(); +if (step == Step.Starting && !cleanUpEvenIfUnableToStop) { +s_logger.warn("Unable to cleanup vm " + vm + "; work state is incorrect: " + step); +return false; +} + +if (step == Step.Started || step == Step.Starting || step == Step.Release) { +if (vm.getHostId() != null) { +if (!sendStop(guru, profile, cleanUpEvenIfUnableToStop, false)) { +s_logger.warn("Failed to stop vm " + vm + " in " + State.Starting + " state as a part of cleanup process"); +return false; +} +} +} -if (step == Step.Started || step == Step.Starting || step == Step.Release) { +if (step != Step.Release && step != Step.Prepare && step != Step.Started && step != Step.Starting) { +s_logger.debug("Cleanup is not needed for vm " + vm + "; work state is incorrect: " + step); +return true; + } +} else { if (vm.getHostId() != null) { if (!sendStop(guru, profile, cleanUpEvenIfUnableToStop, false)) { s_logger.warn("Failed to stop vm " + vm + " in " + State.Starting + " state as a part of cleanup process"); @@ -1298,10 +1312,6 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac } } -if (step != Step.Release && step != Step.Prepare && step != Step.Started && step != Step.Starting) { -s_logger.debug("Cleanup is not needed for vm " + vm + "; work state is incorrect: " + step); -return true; -} } else if (state == State.Stopping) { if (vm.getHostId() != null) { if (!sendStop(guru, profile, cleanUpEvenIfUnableToStop, false)) { @@ -1453,20 +1463,10 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac if (!cleanUpEvenIfUnableToStop) { throw new CloudRuntimeException("We cannot stop " + vm + " when it is in state " + vm.getState()); } -boolean doCleanup = false; +boolean doCleanup = true; if (s_logger.isDebugEnabled()) { s_logger.debug("Unable to transition the state but we're moving on bec
git commit: updated refs/heads/4.5 to 2db1dd7
Repository: cloudstack Updated Branches: refs/heads/4.5 ab19edf09 -> 2db1dd743 CLOUDSTACK-7629 addBaremetalRct() API call is not available in cloudstackAPI library in marvin. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2db1dd74 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2db1dd74 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2db1dd74 Branch: refs/heads/4.5 Commit: 2db1dd74320e92fbd501300426bac0632eb71c7a Parents: ab19edf Author: Frank Zhang Authored: Wed Nov 19 17:00:43 2014 -0800 Committer: Frank Zhang Committed: Wed Nov 19 17:01:34 2014 -0800 -- client/tomcatconf/commands.properties.in | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2db1dd74/client/tomcatconf/commands.properties.in -- diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in index ce84e69..a87d167 100644 --- a/client/tomcatconf/commands.properties.in +++ b/client/tomcatconf/commands.properties.in @@ -691,6 +691,9 @@ addBaremetalPxePingServer=1 addBaremetalDhcp=1 listBaremetalDhcp=1 listBaremetalPxeServers=1 +addBaremetalRct=1 +deleteBaremetalRct=1 +listBaremetalRct=1 UCS commands addUcsManager=1
git commit: updated refs/heads/master to 3dfe532
Repository: cloudstack Updated Branches: refs/heads/master 02e22dba7 -> 3dfe532e4 CLOUDSTACK-7629 addBaremetalRct() API call is not available in cloudstackAPI library in marvin. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3dfe532e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3dfe532e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3dfe532e Branch: refs/heads/master Commit: 3dfe532e42e21b141e0f7c8f4ca41a0589d67457 Parents: 02e22db Author: Frank Zhang Authored: Wed Nov 19 17:00:43 2014 -0800 Committer: Frank Zhang Committed: Wed Nov 19 17:00:43 2014 -0800 -- client/tomcatconf/commands.properties.in | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3dfe532e/client/tomcatconf/commands.properties.in -- diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in index ce84e69..a87d167 100644 --- a/client/tomcatconf/commands.properties.in +++ b/client/tomcatconf/commands.properties.in @@ -691,6 +691,9 @@ addBaremetalPxePingServer=1 addBaremetalDhcp=1 listBaremetalDhcp=1 listBaremetalPxeServers=1 +addBaremetalRct=1 +deleteBaremetalRct=1 +listBaremetalRct=1 UCS commands addUcsManager=1
Git Push Summary
Repository: cloudstack Updated Branches: refs/heads/hotfix/coverity-fixes [deleted] 77ed21c4b
git commit: updated refs/heads/master to 4ff3130
Repository: cloudstack Updated Branches: refs/heads/master 3dfe532e4 -> 4ff3130be CLOUDSTACK-7950: AttachIsoCmd shoud give correct messge when trying to attach vmwaretools installer iso on non supported guestvm deployed by ISO Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4ff3130b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4ff3130b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4ff3130b Branch: refs/heads/master Commit: 4ff3130becd50ab8d44864b651c1b1e235d67e6f Parents: 3dfe532 Author: Saksham Srivastava Authored: Tue Nov 18 15:16:37 2014 +0530 Committer: Saksham Srivastava Committed: Thu Nov 20 13:04:14 2014 +0530 -- .../src/com/cloud/storage/resource/VmwareStorageProcessor.java | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ff3130b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java -- diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java index 74f49b4..cb7b23a 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java +++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java @@ -1463,10 +1463,12 @@ public class VmwareStorageProcessor implements StorageProcessor { if (isAttach) { String msg = "AttachIsoCommand(attach) failed due to " + VmwareHelper.getExceptionMessage(e); +msg = msg + " Also check if your guest os is a supported version"; s_logger.error(msg, e); return new AttachAnswer(msg); } else { String msg = "AttachIsoCommand(detach) failed due to " + VmwareHelper.getExceptionMessage(e); +msg = msg + " Also check if your guest os is a supported version"; s_logger.warn(msg, e); return new AttachAnswer(msg); }