[cloudstack] 12/22: CLOUDSTACK-10181: Skip rVR test cases for VMware until supported
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit c7264a26e7b79b170104617419b3823e0a37c254 Author: Rohit YadavAuthorDate: Sat Dec 9 00:43:25 2017 +0530 CLOUDSTACK-10181: Skip rVR test cases for VMware until supported With this change, rVR related test cases will be skipped for VMware where this feature is not properly supported. Signed-off-by: Rohit Yadav --- test/integration/smoke/test_internal_lb.py | 11 +++ test/integration/smoke/test_privategw_acl.py | 11 +++ test/integration/smoke/test_routers_network_ops.py | 13 - test/integration/smoke/test_vpc_redundant.py | 11 +++ test/integration/smoke/test_vpc_vpn.py | 10 ++ 5 files changed, 55 insertions(+), 1 deletion(-) diff --git a/test/integration/smoke/test_internal_lb.py b/test/integration/smoke/test_internal_lb.py index 5b4c663..379bbb0 100644 --- a/test/integration/smoke/test_internal_lb.py +++ b/test/integration/smoke/test_internal_lb.py @@ -50,6 +50,8 @@ from marvin.lib.common import (get_zone, get_template, list_network_offerings) +from marvin.lib.decoratorGenerators import skipTestIf + from nose.plugins.attrib import attr import logging @@ -280,6 +282,7 @@ class TestInternalLb(cloudstackTestCase): cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) cls.domain = get_domain(cls.apiclient) + cls.logger.debug("Creating compute offering: %s" %cls.services["compute_offering"]["name"]) cls.compute_offering = ServiceOffering.create( cls.apiclient, @@ -302,6 +305,12 @@ class TestInternalLb(cloudstackTestCase): %s" % (cls.account.name, cls.account.id)) +# Skip rVR related test cases for VMware, for details see +# https://issues.apache.org/jira/browse/CLOUDSTACK-10181 +cls.rvrNotSupported = False +if cls.hypervisor.lower() in ['vmware']: +cls.rvrNotSupported = True + cls._cleanup = [cls.account, cls.compute_offering] return @@ -598,6 +607,7 @@ class TestInternalLb(cloudstackTestCase): self.cleanup.insert(0, vpc_offering) self.execute_internallb_roundrobin_tests(vpc_offering) +@skipTestIf("rvrNotSupported") @attr(tags=["smoke", "advanced"], required_hardware="true") def test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80(self): """ @@ -766,6 +776,7 @@ class TestInternalLb(cloudstackTestCase): self.execute_internallb_haproxy_tests(vpc_offering) +@skipTestIf("rvrNotSupported") @attr(tags=["smoke", "advanced"], required_hardware="true") def test_04_rvpc_internallb_haproxy_stats_on_all_interfaces(self): """ Test to verify access to loadbalancer haproxy admin stats page diff --git a/test/integration/smoke/test_privategw_acl.py b/test/integration/smoke/test_privategw_acl.py index b86b96e..d48eb42 100644 --- a/test/integration/smoke/test_privategw_acl.py +++ b/test/integration/smoke/test_privategw_acl.py @@ -25,6 +25,7 @@ from marvin.lib.base import * from marvin.lib.common import * from nose.plugins.attrib import attr from marvin.codes import PASS +from marvin.lib.decoratorGenerators import skipTestIf import time import logging @@ -182,6 +183,14 @@ class TestPrivateGwACL(cloudstackTestCase): cls.services["service_offering"]) cls._cleanup = [cls.service_offering] +cls.hypervisor = cls.testClient.getHypervisorInfo() + +# Skip rVR related test cases for VMware, for details see +# https://issues.apache.org/jira/browse/CLOUDSTACK-10181 +cls.rvrNotSupported = False +if cls.hypervisor.lower() in ['vmware']: +cls.rvrNotSupported = True + cls.logger = logging.getLogger('TestPrivateGwACL') cls.stream_handler = logging.StreamHandler() cls.logger.setLevel(logging.DEBUG) @@ -289,6 +298,7 @@ class TestPrivateGwACL(cloudstackTestCase): self.performVPCTests(vpc_off, restart_with_cleanup = True) +@skipTestIf("rvrNotSupported") @attr(tags=["advanced"], required_hardware="true") def test_04_rvpc_privategw_static_routes(self): self.logger.debug("Creating a Redundant VPC offering..") @@ -301,6 +311,7 @@ class TestPrivateGwACL(cloudstackTestCase): self.performVPCTests(vpc_off) +@skipTestIf("rvrNotSupported") @attr(tags=["advanced"], required_hardware="true") def _test_05_rvpc_privategw_check_interface(self): self.logger.debug("Creating a Redundant VPC offering..") diff --git a/test/integration/smoke/test_routers_network_ops.py
[cloudstack] 21/22: CLOUDSTACK-10001: Fix incorrect total host memory in responses
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 128c9996f8b7af071b406f659029c3f34c352f60 Author: Rohit YadavAuthorDate: Tue Dec 19 11:45:24 2017 +0530 CLOUDSTACK-10001: Fix incorrect total host memory in responses This fixes incorrect total host memory in listHosts and related host responses, regression introduced in #2120. Signed-off-by: Rohit Yadav --- server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java index 4d411f2..4cb8a76 100644 --- a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java @@ -159,8 +159,8 @@ public class HostJoinDaoImpl extends GenericDaoBase implements Long mem = host.getMemReservedCapacity() + host.getMemUsedCapacity(); Long cpu = host.getCpuReservedCapacity() + host.getCpuUsedCapacity(); -hostResponse.setMemoryTotal(mem); -Float totalMemorywithOverprovisioning=new Float((host.getTotalMemory()*ApiDBUtils.getMemOverprovisioningFactor(host.getClusterId(; +hostResponse.setMemoryTotal(host.getTotalMemory()); +Float totalMemorywithOverprovisioning = host.getTotalMemory() * ApiDBUtils.getMemOverprovisioningFactor(host.getClusterId()); hostResponse.setMemWithOverprovisioning(totalMemorywithOverprovisioning.toString()); hostResponse.setMemoryAllocated(mem); @@ -180,7 +180,7 @@ public class HostJoinDaoImpl extends GenericDaoBase implements hostResponse.setHypervisorVersion(host.getHypervisorVersion()); -Float cpuWithOverprovisioning = new Float(host.getCpus() * host.getSpeed() * ApiDBUtils.getCpuOverprovisioningFactor(host.getClusterId())); +Float cpuWithOverprovisioning = host.getCpus() * host.getSpeed() * ApiDBUtils.getCpuOverprovisioningFactor(host.getClusterId()); String cpuAlloc = decimalFormat.format(((float)cpu / cpuWithOverprovisioning * 100f)) + "%"; hostResponse.setCpuAllocated(cpuAlloc); hostResponse.setCpuWithOverprovisioning(cpuWithOverprovisioning.toString()); @@ -308,10 +308,10 @@ public class HostJoinDaoImpl extends GenericDaoBase implements Long mem = host.getMemReservedCapacity() + host.getMemUsedCapacity(); Long cpu = host.getCpuReservedCapacity() + host.getCpuReservedCapacity(); -hostResponse.setMemoryTotal(mem); -Float memWithOverprovisioning =new Float((host.getTotalMemory()*ApiDBUtils.getMemOverprovisioningFactor(host.getClusterId(; +hostResponse.setMemoryTotal(host.getTotalMemory()); +Float memWithOverprovisioning = host.getTotalMemory() * ApiDBUtils.getMemOverprovisioningFactor(host.getClusterId()); hostResponse.setMemWithOverprovisioning(memWithOverprovisioning.toString()); - hostResponse.setMemoryAllocated(decimalFormat.format((float)mem/ memWithOverprovisioning*100f).toString()+"%"); +hostResponse.setMemoryAllocated(decimalFormat.format((float) mem / memWithOverprovisioning * 100.0f) +"%"); String hostTags = host.getTag(); hostResponse.setHostTags(host.getTag()); -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" .
[cloudstack] 14/22: CLOUDSTACK-10187: Don't delete vifs for VPCs with source nat
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit b2f95def745164e90ed01010e5420cae284c750d Author: Rohit YadavAuthorDate: Wed Dec 13 01:28:18 2017 +0530 CLOUDSTACK-10187: Don't delete vifs for VPCs with source nat On XenServer, both redundant router's vifs were getting deleted when any PF rule is removed from any of the acquired public IPs. This fix ensures that lastIp is set to `false` when processed by hypervisor resources to avoid removing of VIFs when VPCs have any source nat IP. Signed-off-by: Rohit Yadav --- .../com/cloud/network/router/CommandSetupHelper.java | 19 ++- test/integration/smoke/test_vpc_redundant.py | 4 ++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/server/src/com/cloud/network/router/CommandSetupHelper.java b/server/src/com/cloud/network/router/CommandSetupHelper.java index cadaf4f..c8d85fe 100644 --- a/server/src/com/cloud/network/router/CommandSetupHelper.java +++ b/server/src/com/cloud/network/router/CommandSetupHelper.java @@ -475,7 +475,7 @@ public class CommandSetupHelper { public void createAssociateIPCommands(final VirtualRouter router, final List ips, final Commands cmds, final long vmId) { final String ipAssocCommand = "IPAssocCommand"; -createRedundantAssociateIPCommands(router, ips, cmds, ipAssocCommand, vmId); +createRedundantAssociateIPCommands(router, ips, cmds, ipAssocCommand, false); } public void createNetworkACLsCommands(final List rules, final VirtualRouter router, final Commands cmds, final long guestNetworkId, @@ -645,7 +645,7 @@ public class CommandSetupHelper { final String ipAssocCommand = "IPAssocVpcCommand"; if (router.getIsRedundantRouter()) { -createRedundantAssociateIPCommands(router, ips, cmds, ipAssocCommand, 0); +createRedundantAssociateIPCommands(router, ips, cmds, ipAssocCommand, true); return; } @@ -742,7 +742,7 @@ public class CommandSetupHelper { } } -public void createRedundantAssociateIPCommands(final VirtualRouter router, final List ips, final Commands cmds, final String ipAssocCommand, final long vmId) { +public void createRedundantAssociateIPCommands(final VirtualRouter router, final List ips, final Commands cmds, final String ipAssocCommand, final boolean isVPC) { // Ensure that in multiple vlans case we first send all ip addresses of // vlan1, then all ip addresses of vlan2, etc.. @@ -840,7 +840,16 @@ public class CommandSetupHelper { } // for network if the ips does not have any rules, then only last ip -List userIps = _ipAddressDao.listByAssociatedNetwork(associatedWithNetworkId, null); +final List userIps = _ipAddressDao.listByAssociatedNetwork(associatedWithNetworkId, null); +boolean hasSourceNat = false; +if (isVPC && userIps.size() > 0 && userIps.get(0) != null) { +// All ips should belong to a VPC +final Long vpcId = userIps.get(0).getVpcId(); +final List sourceNatIps = _ipAddressDao.listByAssociatedVpc(vpcId, true); +if (sourceNatIps != null && sourceNatIps.size() > 0) { +hasSourceNat = true; +} +} int ipsWithrules = 0; int ipsStaticNat = 0; @@ -864,7 +873,7 @@ public class CommandSetupHelper { cmd.setAccessDetail(NetworkElementCommand.ZONE_NETWORK_TYPE, dcVo.getNetworkType().toString()); // if there is 1 static nat then it will be checked for remove at the resource -if (ipsWithrules == 0 && ipsStaticNat == 0) { +if (ipsWithrules == 0 && ipsStaticNat == 0 && !hasSourceNat) { // there is only one ip address for the network. cmd.setAccessDetail(NetworkElementCommand.NETWORK_PUB_LAST_IP, "true"); } else { diff --git a/test/integration/smoke/test_vpc_redundant.py b/test/integration/smoke/test_vpc_redundant.py index b87ce43..e7b29b1 100644 --- a/test/integration/smoke/test_vpc_redundant.py +++ b/test/integration/smoke/test_vpc_redundant.py @@ -610,7 +610,7 @@ class TestVPCRedundancy(cloudstackTestCase): gc_wait = Configurations.list(self.apiclient, name="network.gc.wait") gc_interval = Configurations.list(self.apiclient, name="network.gc.interval") - + self.logger.debug("network.gc.wait is ==> %s" % gc_wait) self.logger.debug("network.gc.interval is ==> %s" % gc_interval) @@ -628,7 +628,7 @@ class TestVPCRedundancy(cloudstackTestCase): @attr(tags=["advanced", "intervlan"], required_hardware="true") def
[cloudstack] 17/22: CLOUDSTACK-10013: Fix VMware related issues and fix misc tests
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit a797f84d7c3ffb8ddfae2151fbf0899d5d638635 Author: Rohit YadavAuthorDate: Wed Dec 13 01:42:05 2017 +0530 CLOUDSTACK-10013: Fix VMware related issues and fix misc tests This fixes test failures around VMware with the new systemvmtemplate. In addition: - Does not skip rVR related test cases for VMware - Removes rc.local - Processes unprocessed cmd_line.json - Fixed NPEs around VMware tests/code - On VMware, use udevadm to reconfigure nic/mac address than rebooting - Fix proper acpi shutdown script for faster systemvm shutdowns - Give at least 256MB of swap for VRs to avoid OOM on VMware - Fixes smoke tests for environment related failures Signed-off-by: Rohit Yadav --- .../com/cloud/vm/VirtualMachineManagerImpl.java| 2 +- server/src/com/cloud/server/StatsCollector.java| 20 +++- systemvm/debian/etc/rc.local | 19 systemvm/debian/opt/cloud/bin/cs/CsDhcp.py | 2 +- systemvm/debian/opt/cloud/bin/setup/common.sh | 8 ++-- systemvm/debian/opt/cloud/bin/setup/router.sh | 6 +-- systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh | 7 +-- systemvm/debian/opt/cloud/bin/update_config.py | 6 +++ .../smoke/test_deploy_virtio_scsi_vm.py| 3 +- .../smoke/test_deploy_vm_root_resize.py| 56 +- test/integration/smoke/test_internal_lb.py | 10 test/integration/smoke/test_iso.py | 0 test/integration/smoke/test_list_ids_parameter.py | 0 .../smoke/test_nested_virtualization.py| 0 test/integration/smoke/test_privategw_acl.py | 8 test/integration/smoke/test_routers_network_ops.py | 10 test/integration/smoke/test_ssvm.py| 4 +- test/integration/smoke/test_vm_life_cycle.py | 0 test/integration/smoke/test_volumes.py | 2 + test/integration/smoke/test_vpc_redundant.py | 10 test/integration/smoke/test_vpc_vpn.py | 10 .../systemvmtemplate/configure_acpid.sh| 13 ++--- .../definitions/systemvmtemplate/configure_grub.sh | 2 +- .../systemvmtemplate/install_systemvm_packages.sh | 4 +- .../definitions/systemvmtemplate/preseed.cfg | 6 +-- 25 files changed, 71 insertions(+), 137 deletions(-) diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index 74927b9..50e53e3 100755 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -4743,8 +4743,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final VMInstanceVO vm = _entityMgr.findById(VMInstanceVO.class, work.getVmId()); if (vm == null) { s_logger.info("Unable to find vm " + work.getVmId()); +throw new CloudRuntimeException("Unable to find VM id=" + work.getVmId()); } -assert vm != null; orchestrateStop(vm.getUuid(), work.isCleanup()); return new Pair (JobInfo.Status.SUCCEEDED, null); diff --git a/server/src/com/cloud/server/StatsCollector.java b/server/src/com/cloud/server/StatsCollector.java index d32ed98..b66fa5f 100644 --- a/server/src/com/cloud/server/StatsCollector.java +++ b/server/src/com/cloud/server/StatsCollector.java @@ -64,6 +64,7 @@ import com.cloud.cluster.ManagementServerHostVO; import com.cloud.cluster.dao.ManagementServerHostDao; import com.cloud.dc.Vlan.VlanType; import com.cloud.dc.VlanVO; +import com.cloud.dc.dao.ClusterDao; import com.cloud.dc.dao.VlanDao; import com.cloud.exception.StorageUnavailableException; import com.cloud.gpu.dao.HostGpuGroupsDao; @@ -92,18 +93,20 @@ import com.cloud.network.as.dao.AutoScaleVmGroupVmMapDao; import com.cloud.network.as.dao.AutoScaleVmProfileDao; import com.cloud.network.as.dao.ConditionDao; import com.cloud.network.as.dao.CounterDao; +import com.cloud.org.Cluster; import com.cloud.resource.ResourceManager; import com.cloud.resource.ResourceState; import com.cloud.service.ServiceOfferingVO; import com.cloud.service.dao.ServiceOfferingDao; import com.cloud.storage.ImageStoreDetailsUtil; +import com.cloud.storage.ScopeType; +import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.StorageManager; import com.cloud.storage.StorageStats; import com.cloud.storage.VolumeStats; import com.cloud.storage.VolumeVO; import com.cloud.storage.dao.VolumeDao; import com.cloud.user.UserStatisticsVO; -import com.cloud.storage.Storage.ImageFormat; import com.cloud.user.VmDiskStatisticsVO; import
[cloudstack] 04/22: CLOUDSTACK-7853: Fix ping timeout edge case and refactor code
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit bc59dad8baa3e6dc2a8b5e013668116f48ab404a Author: Rohit YadavAuthorDate: Sat Dec 2 15:50:34 2017 +0530 CLOUDSTACK-7853: Fix ping timeout edge case and refactor code Refresh InaccurateClock every 10seconds, refactor code to get ping timeout and ping interval. Signed-off-by: Rohit Yadav --- .../src/com/cloud/agent/manager/AgentManagerImpl.java| 16 .../main/java/com/cloud/utils/time/InaccurateClock.java | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java b/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java index 325f3ec..7815c76 100644 --- a/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java +++ b/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java @@ -213,7 +213,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl _nodeId = ManagementServerNode.getManagementServerId(); s_logger.info("Configuring AgentManagerImpl. management server node id(msid): " + _nodeId); -final long lastPing = (System.currentTimeMillis() >> 10) - (long) (PingTimeout.value() * PingInterval.value()); +final long lastPing = (System.currentTimeMillis() >> 10) - getTimeout(); _hostDao.markHostsAsDisconnected(_nodeId, lastPing); registerForHostEvents(new BehindOnPingListener(), true, true, false); @@ -241,8 +241,12 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl return true; } +protected int getPingInterval() { +return PingInterval.value(); +} + protected long getTimeout() { -return (long) (PingTimeout.value() * PingInterval.value()); +return (long) (Math.ceil(PingTimeout.value() * PingInterval.value())); } @Override @@ -358,10 +362,6 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl return null; } -protected int getPingInterval() { -return PingInterval.value(); -} - @Override public Answer send(final Long hostId, final Command cmd) throws AgentUnavailableException, OperationTimedoutException { final Commands cmds = new Commands(Command.OnError.Stop); @@ -623,7 +623,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl } } -_monitorExecutor.scheduleWithFixedDelay(new MonitorTask(), PingInterval.value(), PingInterval.value(), TimeUnit.SECONDS); +_monitorExecutor.scheduleWithFixedDelay(new MonitorTask(), getPingInterval(), getPingInterval(), TimeUnit.SECONDS); return true; } @@ -1515,7 +1515,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl attache = createAttacheForDirectConnect(host, resource); final StartupAnswer[] answers = new StartupAnswer[cmds.length]; for (int i = 0; i < answers.length; i++) { -answers[i] = new StartupAnswer(cmds[i], attache.getId(), PingInterval.value()); +answers[i] = new StartupAnswer(cmds[i], attache.getId(), getPingInterval()); } attache.process(answers); diff --git a/utils/src/main/java/com/cloud/utils/time/InaccurateClock.java b/utils/src/main/java/com/cloud/utils/time/InaccurateClock.java index 2a22853..e03231d 100644 --- a/utils/src/main/java/com/cloud/utils/time/InaccurateClock.java +++ b/utils/src/main/java/com/cloud/utils/time/InaccurateClock.java @@ -63,7 +63,7 @@ public class InaccurateClock extends StandardMBean implements InaccurateClockMBe public synchronized String restart() { turnOff(); s_executor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("InaccurateClock")); -s_executor.scheduleAtFixedRate(new SetTimeTask(), 0, 60, TimeUnit.SECONDS); +s_executor.scheduleAtFixedRate(new SetTimeTask(), 0, 10, TimeUnit.SECONDS); return "Restarted"; } -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" .
[cloudstack] 16/22: CLOUDSTACK-9953: Resize root disk for VMware when full clone is enabled
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 64701a7b18e04fd72c36e0b6e9ebf61bb3cb7f88 Author: Rohit YadavAuthorDate: Sat Dec 16 14:19:28 2017 +0530 CLOUDSTACK-9953: Resize root disk for VMware when full clone is enabled Resize for VMware root disk should only be performed during VM start when vmware.create.full.clone is true i.e. the disk chain length is one. Signed-off-by: Rohit Yadav --- .../hypervisor/vmware/resource/VmwareResource.java | 34 ++ 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java index 40ffdf4..7f8c2a5 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java @@ -2093,9 +2093,9 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa hyperHost.setRestartPriorityForVM(vmMo, DasVmPriority.HIGH.value()); } -//For resizing root disk. +// For resizing root disk. if (rootDiskTO != null && !hasSnapshot) { -resizeRootDisk(vmMo, rootDiskTO, hyperHost, context); +resizeRootDiskOnVMStart(vmMo, rootDiskTO, hyperHost, context); } // @@ -2165,28 +2165,24 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa return path + fileType; } -private void resizeRootDisk(VirtualMachineMO vmMo, DiskTO rootDiskTO, VmwareHypervisorHost hyperHost, VmwareContext context) throws Exception -{ -Pair vdisk = getVirtualDiskInfo(vmMo, appendFileType(rootDiskTO.getPath(), ".vmdk")); +private void resizeRootDiskOnVMStart(VirtualMachineMO vmMo, DiskTO rootDiskTO, VmwareHypervisorHost hyperHost, VmwareContext context) throws Exception { +final Pair vdisk = getVirtualDiskInfo(vmMo, appendFileType(rootDiskTO.getPath(), ".vmdk")); assert(vdisk != null); -Long reqSize=((VolumeObjectTO)rootDiskTO.getData()).getSize()/1024; -VirtualDisk disk = vdisk.first(); -if (reqSize > disk.getCapacityInKB()) -{ -VirtualMachineDiskInfo diskInfo = getMatchingExistingDisk(vmMo.getDiskInfoBuilder(), rootDiskTO, hyperHost, context); +final Long reqSize = ((VolumeObjectTO)rootDiskTO.getData()).getSize() / 1024; +final VirtualDisk disk = vdisk.first(); +if (reqSize > disk.getCapacityInKB()) { +final VirtualMachineDiskInfo diskInfo = getMatchingExistingDisk(vmMo.getDiskInfoBuilder(), rootDiskTO, hyperHost, context); assert (diskInfo != null); -String[] diskChain = diskInfo.getDiskChain(); +final String[] diskChain = diskInfo.getDiskChain(); -if (diskChain != null && diskChain.length>1) -{ -s_logger.error("Unsupported Disk chain length "+ diskChain.length); -throw new Exception("Unsupported Disk chain length "+ diskChain.length); +if (diskChain != null && diskChain.length > 1) { +s_logger.warn("Disk chain length for the VM is greater than one, skipping resizing of root disk."); +return; } -if (diskInfo.getDiskDeviceBusName() == null || !diskInfo.getDiskDeviceBusName().toLowerCase().startsWith("scsi")) -{ -s_logger.error("Unsupported root disk device bus "+ diskInfo.getDiskDeviceBusName() ); -throw new Exception("Unsupported root disk device bus "+ diskInfo.getDiskDeviceBusName()); +if (diskInfo.getDiskDeviceBusName() == null || !diskInfo.getDiskDeviceBusName().toLowerCase().startsWith("scsi")) { +s_logger.warn("Resizing of root disk is only support for scsi device/bus, the provide disk's device bus name is " + diskInfo.getDiskDeviceBusName()); +return; } disk.setCapacityInKB(reqSize); -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" .
[cloudstack] 22/22: CLOUDSTACK-10127: KVM + Ovs: Incorrect devId on static nat
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 6837ca5326acc9b820f2a8d69a9b6450fc5738f2 Author: Frank MaximusAuthorDate: Wed Nov 1 18:32:08 2017 +0100 CLOUDSTACK-10127: KVM + Ovs: Incorrect devId on static nat This ports blocker fix by @fmaximus from #2304. Signed-off-by: Rohit Yadav --- .../kvm/resource/LibvirtComputingResource.java | 20 +- .../LibvirtNetworkElementCommandWrapperTest.java | 243 + 2 files changed, 254 insertions(+), 9 deletions(-) diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index 7c60878..97e6cfc 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -31,6 +31,7 @@ import java.util.Arrays; import java.util.Calendar; import java.util.Collections; import java.util.Comparator; +import java.util.EnumMap; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -1688,27 +1689,28 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv final String routerName = cmd.getAccessDetail(NetworkElementCommand.ROUTER_NAME); try { -conn = LibvirtConnection.getConnectionByVmName(routerName); +conn = getLibvirtUtilitiesHelper().getConnectionByVmName(routerName); final IpAddressTO[] ips = cmd.getIpAddresses(); Integer devNum = 0; -final Map broadcastUriToNicNum = new HashMap (); +final Map trafficTypeToNicNum = new EnumMap<>(TrafficType.class); final List pluggedNics = getInterfaces(conn, routerName); for (final InterfaceDef pluggedNic : pluggedNics) { final String pluggedVlan = pluggedNic.getBrName(); if (pluggedVlan.equalsIgnoreCase(_linkLocalBridgeName)) { -broadcastUriToNicNum.put("LinkLocal", devNum); -} else if (pluggedVlan.equalsIgnoreCase(_publicBridgeName) || pluggedVlan.equalsIgnoreCase(_privBridgeName) || -pluggedVlan.equalsIgnoreCase(_guestBridgeName)) { - broadcastUriToNicNum.put(BroadcastDomainType.Vlan.toUri(Vlan.UNTAGGED).toString(), devNum); -} else { - broadcastUriToNicNum.put(getBroadcastUriFromBridge(pluggedVlan), devNum); +trafficTypeToNicNum.put(TrafficType.Control, devNum); +} else if (pluggedVlan.equalsIgnoreCase(_publicBridgeName)) { +trafficTypeToNicNum.put(TrafficType.Public, devNum); +} else if (pluggedVlan.equalsIgnoreCase(_privBridgeName)) { +trafficTypeToNicNum.put(TrafficType.Management, devNum); +} else if (pluggedVlan.equalsIgnoreCase(_guestBridgeName)) { +trafficTypeToNicNum.put(TrafficType.Guest, devNum); } devNum++; } for (final IpAddressTO ip : ips) { -ip.setNicDevId(broadcastUriToNicNum.get(ip.getBroadcastUri())); +ip.setNicDevId(trafficTypeToNicNum.get(ip.getTrafficType())); } return new ExecutionResult(true, null); diff --git a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtNetworkElementCommandWrapperTest.java b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtNetworkElementCommandWrapperTest.java new file mode 100644 index 000..c0a973e --- /dev/null +++ b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtNetworkElementCommandWrapperTest.java @@ -0,0 +1,243 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +//
[cloudstack] 05/22: CLOUDSTACK-9348: Improve Nio SSH handshake buffers
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 0a64c3013e527f251f1f4b496ca2bfae939d16ca Author: Rohit YadavAuthorDate: Thu Nov 30 16:51:48 2017 +0530 CLOUDSTACK-9348: Improve Nio SSH handshake buffers Use a holder class to pass buffers, fixes potential leak. Signed-off-by: Rohit Yadav --- .../agent/manager/ClusteredAgentManagerImpl.java | 2 +- utils/src/main/java/com/cloud/utils/nio/Link.java | 72 +- .../main/java/com/cloud/utils/nio/NioClient.java | 2 +- .../java/com/cloud/utils/nio/NioConnection.java| 2 +- 4 files changed, 58 insertions(+), 20 deletions(-) diff --git a/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java b/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java index 2ebfeb5..0b9899e 100644 --- a/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java +++ b/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java @@ -519,7 +519,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust sslEngine.setUseClientMode(true); sslEngine.setEnabledProtocols(SSLUtils.getSupportedProtocols(sslEngine.getEnabledProtocols())); sslEngine.beginHandshake(); -if (!Link.doHandshake(ch1, sslEngine, true)) { +if (!Link.doHandshake(ch1, sslEngine)) { ch1.close(); throw new IOException(String.format("SSL: Handshake failed with peer management server '%s' on %s:%d ", peerName, ip, port)); } diff --git a/utils/src/main/java/com/cloud/utils/nio/Link.java b/utils/src/main/java/com/cloud/utils/nio/Link.java index 8f1b811..35211c8 100644 --- a/utils/src/main/java/com/cloud/utils/nio/Link.java +++ b/utils/src/main/java/com/cloud/utils/nio/Link.java @@ -32,6 +32,8 @@ import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.SecureRandom; import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; @@ -462,7 +464,7 @@ public class Link { return buffer; } -public static ByteBuffer handleBufferUnderflow(final SSLEngine engine, ByteBuffer buffer) { +public static ByteBuffer handleBufferUnderflow(final SSLEngine engine, final ByteBuffer buffer) { if (engine == null || buffer == null) { return buffer; } @@ -475,14 +477,14 @@ public class Link { return replaceBuffer; } -private static boolean doHandshakeUnwrap(final SocketChannel socketChannel, final SSLEngine sslEngine, +private static HandshakeHolder doHandshakeUnwrap(final SocketChannel socketChannel, final SSLEngine sslEngine, ByteBuffer peerAppData, ByteBuffer peerNetData, final int appBufferSize) throws IOException { if (socketChannel == null || sslEngine == null || peerAppData == null || peerNetData == null || appBufferSize < 0) { -return false; +return new HandshakeHolder(peerAppData, peerNetData, false); } if (socketChannel.read(peerNetData) < 0) { if (sslEngine.isInboundDone() && sslEngine.isOutboundDone()) { -return false; +return new HandshakeHolder(peerAppData, peerNetData, false); } try { sslEngine.closeInbound(); @@ -492,7 +494,7 @@ public class Link { sslEngine.closeOutbound(); // After closeOutbound the engine will be set to WRAP state, // in order to try to send a close message to the client. -return true; +return new HandshakeHolder(peerAppData, peerNetData, true); } peerNetData.flip(); SSLEngineResult result = null; @@ -503,7 +505,10 @@ public class Link { s_logger.error(String.format("SSL error caught during unwrap data: %s, for local address=%s, remote address=%s. The client may have invalid ca-certificates.", sslException.getMessage(), socketChannel.getLocalAddress(), socketChannel.getRemoteAddress())); sslEngine.closeOutbound(); -return false; +return new HandshakeHolder(peerAppData, peerNetData, true); +} +if (result == null) { +return new HandshakeHolder(peerAppData, peerNetData, false); } switch (result.getStatus()) { case OK: @@ -519,23 +524,23 @@ public class Link {
[cloudstack] 18/22: CLOUDSTACK-10193: Use other64Linux for systemvms on VMware
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 23387f4038038f607287a49a088d187a12d1806a Author: Rohit YadavAuthorDate: Sun Dec 17 12:26:35 2017 +0530 CLOUDSTACK-10193: Use other64Linux for systemvms on VMware In default/fresh installations, the guest os type for systemvms with id=15 or Debian 5 (32-bit) can cause memory allocation issues to guest. Using Other Linux 64-bit as guest OS systemvms get all the allocated RAM. This avoids OOM related kernel panics for certain VRs such as rVRs, lbvm etc. Signed-off-by: Rohit Yadav --- engine/schema/resources/META-INF/db/schema-41000to41100.sql | 4 1 file changed, 4 insertions(+) diff --git a/engine/schema/resources/META-INF/db/schema-41000to41100.sql b/engine/schema/resources/META-INF/db/schema-41000to41100.sql index 2a2fe2d..76bcb3f 100644 --- a/engine/schema/resources/META-INF/db/schema-41000to41100.sql +++ b/engine/schema/resources/META-INF/db/schema-41000to41100.sql @@ -495,3 +495,7 @@ UPDATE `cloud`.`monitoring_services` SET pidfile="/var/run/apache2/apache2.pid" -- Boost secondary storage systemvm UPDATE `cloud`.`service_offering` SET ram_size=1024, cpu=2 WHERE vm_type="secondarystoragevm" and cpu=1 and ram_size=512; + +-- Use 'Other Linux 64-bit' as guest os for the default systemvmtemplate for VMware +-- This fixes a memory allocation issue to systemvms on VMware/ESXi +UPDATE `cloud`.`vm_template` SET guest_os_id=99 WHERE id=8; -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" .
[cloudstack] 02/22: CLOUDSTACK-10013: Make Debian9 systemvmtemplates work with systemd
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 6767724529b6cbbc085afff548d1e39b174bba31 Author: Wido den HollanderAuthorDate: Thu Aug 10 13:51:11 2017 +0200 CLOUDSTACK-10013: Make Debian9 systemvmtemplates work with systemd - Load the nf_conntrack_ipv6 module for IPv6 connection tracking on SSVM - Move systemd services to /etc and enable services after they have been installed - Disable most services by default and enable in cloud-early-config - Start services after enabling them using systemd - In addition remove /etc/init.d/cloud as this is no longer needed and done by systemd - Accept DOS/MBR as file format for ISO images as well Under Debian 7 the 'file' command would return: debian-9.1.0-amd64-netinst.iso: ISO 9660 CD-ROM filesystem data UDF filesystem data Under Debian 9 however it will return debian-9.1.0-amd64-netinst.iso: DOS/MBR boot sector This would make the HTTPTemplateDownloader in the Secondary Storage VM refuse the ISO as a valid template because it's not a correct format. Changes this behavior so that it accepts both. This allows us to use Debian 9 as a System VM template. Not sure though if enabling them is enough for systemd to still start them on first boot Signed-off-by: Wido den Hollander --- .gitignore | 2 + systemvm/patches/debian/config/etc/init.d/cloud| 155 - .../debian/config/etc/init.d/cloud-early-config| 55 ++-- .../systemvmtemplate/configure_conntrack.sh| 1 + .../configure_systemvm_services.sh | 22 +-- .../utils/imagestore/ImageStoreUtil.java | 2 +- 6 files changed, 30 insertions(+), 207 deletions(-) diff --git a/.gitignore b/.gitignore index 29b4ffc..1a73724 100644 --- a/.gitignore +++ b/.gitignore @@ -97,3 +97,5 @@ systemvm/.pydevproject test/.pydevprojec plugins/hypervisors/kvm/.pydevproject scripts/.pydevproject +*.qcow2 +*.raw diff --git a/systemvm/patches/debian/config/etc/init.d/cloud b/systemvm/patches/debian/config/etc/init.d/cloud deleted file mode 100755 index 9b3a63b..000 --- a/systemvm/patches/debian/config/etc/init.d/cloud +++ /dev/null @@ -1,155 +0,0 @@ -#!/bin/bash -### BEGIN INIT INFO -# Provides: cloud -# Required-Start:$local_fs cloud-early-config -# Required-Stop: $local_fs -# Default-Start: 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start up the CloudStack cloud service -### END INIT INFO -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -#set -x - -ENABLED=0 -[ -e /etc/default/cloud ] && . /etc/default/cloud - -CMDLINE=$(cat /var/cache/cloud/cmdline) - -if [ ! -z $CLOUD_DEBUG ];then - LOG_FILE=/var/log/cloud/cloud.out -else - LOG_FILE=/dev/null -fi - -TYPE="router" -for i in $CMDLINE - do -# search for foo=bar pattern and cut out foo -FIRSTPATTERN=$(echo $i | cut -d= -f1) -case $FIRSTPATTERN in - type) - TYPE=$(echo $i | cut -d= -f2) - ;; -esac -done - -# Source function library. -if [ -f /etc/init.d/functions ] -then - . /etc/init.d/functions -fi - -if [ -f ./lib/lsb/init-functions ] -then - . /lib/lsb/init-functions -fi - -_success() { - if [ -f /etc/init.d/functions ] - then -success - else -echo "Success" - fi -} - -_failure() { - if [ -f /etc/init.d/functions ] - then -failure - else -echo "Failed" - fi -} -RETVAL=$? -CLOUDSTACK_HOME="/usr/local/cloud" -if [ -f $CLOUDSTACK_HOME/systemvm/utils.sh ]; -then - . $CLOUDSTACK_HOME/systemvm/utils.sh -else - _failure -fi - -# mkdir -p /var/log/vmops - -start() { - local pid=$(get_pids) - if [ "$pid" != "" ]; then - echo "CloudStack cloud sevice is already running, PID = $pid" - return 0 - fi - - echo -n "Starting CloudStack cloud service (type=$TYPE) " - if [ -f $CLOUDSTACK_HOME/systemvm/run.sh ]; - then - if [ "$pid" == "" ] - then - (cd $CLOUDSTACK_HOME/systemvm; nohup ./run.sh >
[cloudstack] 01/22: CLOUDSTACK-10013: Migrate systemvmtemplate to Debian9
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit f718238247d08704c99f2fd14393443be674b680 Author: Rohit YadavAuthorDate: Sun Jul 23 18:01:35 2017 +0200 CLOUDSTACK-10013: Migrate systemvmtemplate to Debian9 SystemVM changes to work on Debian 9 - Migrate away from chkconfig to systemctl - Remove xenstore-utils override deb pkg - Fix runlevel in sysv scripts for systemd Signed-off-by: Rohit Yadav --- systemvm/patches/debian/buildsystemvm.sh | 577 - systemvm/patches/debian/config/etc/init.d/cloud| 10 +- .../debian/config/etc/init.d/cloud-early-config| 23 +- .../debian/config/etc/init.d/cloud-passwd-srvr | 10 +- systemvm/patches/debian/config/etc/init.d/postinit | 6 +- systemvm/patches/debian/config/etc/rc.local| 2 +- systemvm/patches/debian/config/etc/ssh/sshd_config | 1 - .../debian/config/opt/cloud/bin/patchsystemvm.sh | 128 ++--- tools/appliance/build.sh | 2 +- .../definitions/systemvmtemplate/apt_upgrade.sh| 9 +- .../systemvmtemplate/authorized_keys.sh| 1 + .../definitions/systemvmtemplate/build_time.sh | 26 - .../definitions/systemvmtemplate/cleanup.sh| 1 - .../definitions/systemvmtemplate/configure_grub.sh | 6 +- .../systemvmtemplate/configure_login.sh| 15 +- .../systemvmtemplate/configure_networking.sh | 25 +- .../configure_systemvm_services.sh | 94 +++- .../definitions/systemvmtemplate/definition.rb | 36 +- .../systemvmtemplate/install_systemvm_packages.sh | 32 +- .../definitions/systemvmtemplate/preseed.cfg | 69 ++- .../definitions/systemvmtemplate/zerodisk.sh | 9 +- 21 files changed, 267 insertions(+), 815 deletions(-) diff --git a/systemvm/patches/debian/buildsystemvm.sh b/systemvm/patches/debian/buildsystemvm.sh deleted file mode 100755 index a34b1dd..000 --- a/systemvm/patches/debian/buildsystemvm.sh +++ /dev/null @@ -1,577 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -echo "" -echo " Note there is a new systemvm build script based on " -echo " Veewee(Vagrant) under tools/appliance." -echo "" - -set -e -set -x - -IMAGENAME=systemvm -LOCATION=/var/lib/images/systemvm -PASSWORD=password -#APT_PROXY=192.168.1.115:3142/ -APT_PROXY= -HOSTNAME=systemvm -SIZE=2000 -DEBIAN_MIRROR=ftp.us.debian.org/debian -MINIMIZE=true -CLOUDSTACK_RELEASE=4.0 -offset=4096 -baseimage() { - mkdir -p $LOCATION - #dd if=/dev/zero of=$IMAGELOC bs=1M count=$SIZE - dd if=/dev/zero of=$IMAGELOC bs=1M seek=$((SIZE - 1)) count=1 - loopdev=$(losetup -f) - losetup $loopdev $IMAGELOC - parted $loopdev -s 'mklabel msdos' - parted $loopdev -s 'mkpart primary ext3 4096B -1' - sleep 2 - losetup -d $loopdev - loopdev=$(losetup --show -o $offset -f $IMAGELOC ) - mkfs.ext3 -L ROOT $loopdev - mkdir -p $MOUNTPOINT - tune2fs -c 100 -i 0 $loopdev - sleep 2 - losetup -d $loopdev - - mount -o loop,offset=$offset $IMAGELOC $MOUNTPOINT - - #debootstrap --variant=minbase --keyring=/usr/share/keyrings/debian-archive-keyring.gpg wheezy $MOUNTPOINT http://${APT_PROXY}${DEBIAN_MIRROR} - debootstrap --variant=minbase --arch=i386 wheezy $MOUNTPOINT http://${APT_PROXY}${DEBIAN_MIRROR} -} - - -fixapt() { - if [ "$APT_PROXY" != "" ]; then - cat >> etc/apt/apt.conf.d/01proxy << EOF -Acquire::http::Proxy "http://${APT_PROXY};; -EOF - fi - - cat > etc/apt/sources.list << EOF -deb http://http.debian.net/debian/ wheezy main contrib non-free -deb-src http://http.debian.net/debian/ wheezy main contrib non-free - -deb http://security.debian.org/ wheezy/updates main -deb-src http://security.debian.org/ wheezy/updates main - -deb http://http.debian.net/debian/ wheezy-backports main -deb-src http://http.debian.net/debian/ wheezy-backports main -EOF - - cat >> etc/apt/apt.conf << EOF -APT::Default-Release "stable";
[cloudstack] branch debian9-systemvmtemplate updated (daf2194 -> 6837ca5)
This is an automated email from the ASF dual-hosted git repository. rohit pushed a change to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git. omit daf2194 CLOUDSTACK-10127: KVM + Ovs: Incorrect devId on static nat omit ef2774e CLOUDSTACK-10001: Fix incorrect total host memory in responses omit 2b5598b CLOUDSTACK-10013: Add systemvm 4.11 migration in 4.10->4.11 upgrade path omit c57943e CLOUDSTACK-10194: Use packer for building systemvmtemplates omit 04f4baa CLOUDSTACK-10193: Use other64Linux for systemvms on VMware omit 924965f CLOUDSTACK-10013: Fix VMware related issues and fix misc tests omit c28df5f CLOUDSTACK-9953: Resize root disk for VMware when full clone is enabled omit 582772f CLOUDSTACK-9501: route is not available by default on CentOS7 (#1637) omit 13316e8 CLOUDSTACK-10187: Don't delete vifs for VPCs with source nat omit 60ab7c3 CLOUDSTACK-10193: Fix smoke tests failures with new systemvmtemplate omit 7a37dcc CLOUDSTACK-10181: Skip rVR test cases for VMware until supported omit 8459d93 CLOUDSTACK-10013: SystemVM codebase refactorings and improvements omit 32e525f CLOUDSTACK-10013: Make the generated VR/json files unique (ports #1470) omit bdda9b4 CLOUDSTACK-10010: Port marvin test from #2190 by @swill omit fd48988 CLOUDSTACK-10013: Fix ipsec VPN configuration omit 6d36ae5 CLOUDSTACK-10013: SystemVM.iso refactoring and cleanups omit d420509 CLOUDSTACK-10129: UX improvements and event timeline omit 2a0ed0c CLOUDSTACK-9348: Improve Nio SSH handshake buffers omit b882f6c CLOUDSTACK-7853: Fix ping timeout edge case and refactor code omit e85d847 CLOUDSTACK-10013: Debian9 SystemVM appliance improvements omit 9764b6a CLOUDSTACK-10013: Make Debian9 systemvmtemplates work with systemd omit ba531ab CLOUDSTACK-10013: Migrate systemvmtemplate to Debian9 add a372040 CLOUDSTACK-10012: Load SQL schema scripts from JAR (#2247) add 7cb4551 CLOUDSTACK-10198: removed unused (#1437) new f718238 CLOUDSTACK-10013: Migrate systemvmtemplate to Debian9 new 6767724 CLOUDSTACK-10013: Make Debian9 systemvmtemplates work with systemd new 13cd40d CLOUDSTACK-10013: Debian9 SystemVM appliance improvements new bc59dad CLOUDSTACK-7853: Fix ping timeout edge case and refactor code new 0a64c30 CLOUDSTACK-9348: Improve Nio SSH handshake buffers new c8d5165 CLOUDSTACK-10129: UX improvements and event timeline new aba3bbe CLOUDSTACK-10013: SystemVM.iso refactoring and cleanups new 6409f62 CLOUDSTACK-10013: Fix ipsec VPN configuration new cbfba0a CLOUDSTACK-10010: Port marvin test from #2190 by @swill new e0857bb CLOUDSTACK-10013: Make the generated VR/json files unique (ports #1470) new 990d51b CLOUDSTACK-10013: SystemVM codebase refactorings and improvements new c7264a2 CLOUDSTACK-10181: Skip rVR test cases for VMware until supported new 9984371 CLOUDSTACK-10193: Fix smoke tests failures with new systemvmtemplate new b2f95de CLOUDSTACK-10187: Don't delete vifs for VPCs with source nat new 4e24e06 CLOUDSTACK-9501: route is not available by default on CentOS7 (#1637) new 64701a7 CLOUDSTACK-9953: Resize root disk for VMware when full clone is enabled new a797f84 CLOUDSTACK-10013: Fix VMware related issues and fix misc tests new 23387f4 CLOUDSTACK-10193: Use other64Linux for systemvms on VMware new 89e079b CLOUDSTACK-10194: Use packer for building systemvmtemplates new 2c0b4eb CLOUDSTACK-10013: Add systemvm 4.11 migration in 4.10->4.11 upgrade path new 128c999 CLOUDSTACK-10001: Fix incorrect total host memory in responses new 6837ca5 CLOUDSTACK-10127: KVM + Ovs: Incorrect devId on static nat This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (daf2194) \ N -- N -- N refs/heads/debian9-systemvmtemplate (6837ca5) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 22 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: client/pom.xml | 2 +- .../hyperv/resource/HypervDummyResourceBase.java | 98 .../db/create-default-role-api-mappings.sql|
[cloudstack] 06/22: CLOUDSTACK-10129: UX improvements and event timeline
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit c8d516522873bc6b91846b795e3ddec66ebf6b56 Author: Rohit YadavAuthorDate: Tue Nov 28 19:25:09 2017 +0530 CLOUDSTACK-10129: UX improvements and event timeline - Fixes timezone issue where dates show up as nvalid in UI - Introduces new event timeline listing/filtering of events - Several UI improvements to add columns in list views - Bulk operations support in instance list view to shutdown and destroy multiple-selected VMs (limitation: after operation, redundant entries may show up in the list view, refreshing VM list view fixes that) - Align table thead/tbody to avoid splitting of tables Signed-off-by: Rohit Yadav --- .../org/apache/cloudstack/api/ApiConstants.java| 2 + .../api/command/user/event/ListEventsCmd.java | 7 + .../cloudstack/api/response/EventResponse.java | 2 +- .../schema/src/com/cloud/user/UserAccountVO.java | 4 + engine/schema/src/com/cloud/user/UserVO.java | 4 + .../src/com/cloud/api/query/QueryManagerImpl.java | 10 +- ui/css/cloudstack3.css | 3 +- ui/l10n/en.js | 3 + ui/scripts/events.js | 20 +- ui/scripts/instances.js| 275 - ui/scripts/metrics.js | 13 +- ui/scripts/network.js | 51 +++- ui/scripts/sharedFunctions.js | 2 +- ui/scripts/storage.js | 30 ++- ui/scripts/system.js | 112 +++-- ui/scripts/templates.js| 27 ++ ui/scripts/ui/widgets/dataTable.js | 13 +- 17 files changed, 412 insertions(+), 166 deletions(-) diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java index a5bd95f..89deeef 100644 --- a/api/src/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/org/apache/cloudstack/api/ApiConstants.java @@ -205,6 +205,7 @@ public class ApiConstants { public static final String OUTOFBANDMANAGEMENT_POWERSTATE = "outofbandmanagementpowerstate"; public static final String OUTOFBANDMANAGEMENT_ENABLED = "outofbandmanagementenabled"; public static final String PARAMS = "params"; +public static final String PARENT_ID = "parentid"; public static final String PARENT_DOMAIN_ID = "parentdomainid"; public static final String PASSWORD = "password"; public static final String SHOULD_UPDATE_PASSWORD = "update_passwd_on_host"; @@ -274,6 +275,7 @@ public class ApiConstants { public static final String SNAPSHOT_QUIESCEVM = "quiescevm"; public static final String SOURCE_ZONE_ID = "sourcezoneid"; public static final String START_DATE = "startdate"; +public static final String START_ID = "startid"; public static final String START_IP = "startip"; public static final String START_IPV6 = "startipv6"; public static final String START_PORT = "startport"; diff --git a/api/src/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java b/api/src/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java index a4934fa..b98c308 100644 --- a/api/src/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java @@ -65,6 +65,9 @@ public class ListEventsCmd extends BaseListProjectAndAccountResourcesCmd { @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "the event type (see event types)") private String type; +@Parameter(name = ApiConstants.START_ID, type = CommandType.UUID, entityType = EventResponse.class, description = "the parent/start ID of the event, when provided this will list all the events with the start/parent ID including the parent event") +private Long startId; + / /// Accessors /// / @@ -97,6 +100,10 @@ public class ListEventsCmd extends BaseListProjectAndAccountResourcesCmd { return type; } +public Long getStartId() { +return startId; +} + / /// API Implementation/// / diff --git a/api/src/org/apache/cloudstack/api/response/EventResponse.java b/api/src/org/apache/cloudstack/api/response/EventResponse.java index 5ce66ed..da15434 100644 --- a/api/src/org/apache/cloudstack/api/response/EventResponse.java +++
[cloudstack] 15/22: CLOUDSTACK-9501: route is not available by default on CentOS7 (#1637)
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 4e24e06855ca5a690989e7b6674fe6128212f43e Author: lmrvAuthorDate: Thu Dec 14 00:54:05 2017 +0530 CLOUDSTACK-9501: route is not available by default on CentOS7 (#1637) This adds the `net-tools` dependency on CentOS cloudstack-agent rpms. This will provide ifconfig, route and other tools that may be used by CloudStack scripts and utilities. Signed-off-by: Rohit Yadav --- packaging/centos7/cloud.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/centos7/cloud.spec b/packaging/centos7/cloud.spec index 219b8b6..f16858a 100644 --- a/packaging/centos7/cloud.spec +++ b/packaging/centos7/cloud.spec @@ -104,6 +104,7 @@ Requires: bridge-utils Requires: ebtables Requires: iptables Requires: ethtool +Requires: net-tools Requires: iproute Requires: ipset Requires: perl -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" .
[cloudstack] 20/22: CLOUDSTACK-10013: Add systemvm 4.11 migration in 4.10->4.11 upgrade path
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 2c0b4eb72e37a68954dcb0f1080105e7d1ede044 Author: Rohit YadavAuthorDate: Tue Dec 19 11:06:59 2017 +0530 CLOUDSTACK-10013: Add systemvm 4.11 migration in 4.10->4.11 upgrade path This moves the systevmtemplate migration logic from previous upgrade path to 4.10.0.0->4.11.0.0 upgrade path. Signed-off-by: Rohit Yadav --- .../com/cloud/upgrade/dao/Upgrade41000to41100.java | 185 - .../com/cloud/upgrade/dao/Upgrade4930to41000.java | 184 +--- 2 files changed, 187 insertions(+), 182 deletions(-) diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade41000to41100.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade41000to41100.java index c59ead9..eee0614 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade41000to41100.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade41000to41100.java @@ -17,10 +17,18 @@ package com.cloud.upgrade.dao; -import com.cloud.utils.exception.CloudRuntimeException; - import java.io.InputStream; import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import com.cloud.hypervisor.Hypervisor; +import com.cloud.utils.exception.CloudRuntimeException; public class Upgrade41000to41100 implements DbUpgrade { @@ -52,8 +60,181 @@ public class Upgrade41000to41100 implements DbUpgrade { @Override public void performDataMigration(Connection conn) { +updateSystemVmTemplates(conn); } +@SuppressWarnings("serial") +private void updateSystemVmTemplates(final Connection conn) { +LOG.debug("Updating System Vm template IDs"); +// Get all hypervisors in use +final Set hypervisorsListInUse = new HashSet(); +try (PreparedStatement pstmt = conn.prepareStatement("select distinct(hypervisor_type) from `cloud`.`cluster` where removed is null"); ResultSet rs = pstmt.executeQuery()) { +while (rs.next()) { +switch (Hypervisor.HypervisorType.getType(rs.getString(1))) { +case XenServer: + hypervisorsListInUse.add(Hypervisor.HypervisorType.XenServer); +break; +case KVM: + hypervisorsListInUse.add(Hypervisor.HypervisorType.KVM); +break; +case VMware: + hypervisorsListInUse.add(Hypervisor.HypervisorType.VMware); +break; +case Hyperv: + hypervisorsListInUse.add(Hypervisor.HypervisorType.Hyperv); +break; +case LXC: + hypervisorsListInUse.add(Hypervisor.HypervisorType.LXC); +break; +case Ovm3: + hypervisorsListInUse.add(Hypervisor.HypervisorType.Ovm3); +break; +default: +break; +} +} +} catch (final SQLException e) { +LOG.error("updateSystemVmTemplates: Exception caught while getting hypervisor types from clusters: " + e.getMessage()); +throw new CloudRuntimeException("updateSystemVmTemplates:Exception while getting hypervisor types from clusters", e); +} + +final Map NewTemplateNameList = new HashMap () { +{ +put(Hypervisor.HypervisorType.KVM, "systemvm-kvm-4.11"); +put(Hypervisor.HypervisorType.VMware, "systemvm-vmware-4.11"); +put(Hypervisor.HypervisorType.XenServer, "systemvm-xenserver-4.11"); +put(Hypervisor.HypervisorType.Hyperv, "systemvm-hyperv-4.11"); +put(Hypervisor.HypervisorType.LXC, "systemvm-lxc-4.11"); +put(Hypervisor.HypervisorType.Ovm3, "systemvm-ovm3-4.11"); +} +}; + +final Map routerTemplateConfigurationNames = new HashMap () { +{ +put(Hypervisor.HypervisorType.KVM, "router.template.kvm"); +put(Hypervisor.HypervisorType.VMware, "router.template.vmware"); +put(Hypervisor.HypervisorType.XenServer, "router.template.xenserver"); +put(Hypervisor.HypervisorType.Hyperv, "router.template.hyperv"); +put(Hypervisor.HypervisorType.LXC, "router.template.lxc"); +put(Hypervisor.HypervisorType.Ovm3,
[cloudstack] 19/22: CLOUDSTACK-10194: Use packer for building systemvmtemplates
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 89e079beb7357426b9c1a74e790e185e1bfb1ece Author: Rohit YadavAuthorDate: Sun Dec 17 12:55:26 2017 +0530 CLOUDSTACK-10194: Use packer for building systemvmtemplates - This migrates the current systemvmtemplate build system from veewee/virtualbox to packer and qemu based. - This also introduces and updates a CentOS7 built-in template. - Remove old appliance build scripts and files. Signed-off-by: Rohit Yadav --- pom.xml| 8 +- tools/appliance/.ruby-version | 1 - tools/appliance/.rvmrc | 24 -- tools/appliance/README.md | 105 +- tools/appliance/build.sh | 360 +++-- tools/appliance/builtin/http/kickstart.cfg | 91 ++ .../scripts/base.sh} | 28 +- .../{Gemfile => builtin/scripts/cleanup.sh}| 20 +- tools/appliance/builtin/template.json | 53 +++ tools/appliance/convert/Convert.class | Bin 984 -> 0 bytes tools/appliance/convert/Convert.java | 36 --- tools/appliance/convert_ovf_vbox_to_esx.xslt | 42 --- tools/appliance/definitions/builtin/base.sh| 14 - tools/appliance/definitions/builtin/cleanup.sh | 21 -- tools/appliance/definitions/builtin/definition.rb | 33 -- .../definitions/builtin/install-xs-tools.sh| 10 - tools/appliance/definitions/builtin/ks.cfg | 35 -- tools/appliance/definitions/builtin/postinstall.sh | 54 tools/appliance/definitions/builtin/zerodisk.sh| 3 - tools/appliance/definitions/debianbase/cleanup.sh | 49 --- .../definitions/debianbase/configure_login.sh | 78 - .../appliance/definitions/debianbase/definition.rb | 80 - tools/appliance/definitions/debianbase/preseed.cfg | 129 tools/appliance/definitions/debianbase/zerodisk.sh | 43 --- tools/appliance/definitions/devcloud/base.sh | 12 - tools/appliance/definitions/devcloud/cleanup.sh| 21 -- tools/appliance/definitions/devcloud/definition.rb | 45 --- .../appliance/definitions/devcloud/postinstall.sh | 60 tools/appliance/definitions/devcloud/preseed.cfg | 357 tools/appliance/definitions/devcloud/zerodisk.sh | 11 - tools/appliance/shar_cloud_scripts.sh | 2 +- .../http}/preseed.cfg | 13 +- .../scripts}/apt_upgrade.sh| 5 +- .../scripts}/authorized_keys.sh| 0 .../scripts}/cleanup.sh| 0 .../scripts}/configure_acpid.sh| 0 .../scripts}/configure_conntrack.sh| 0 .../scripts}/configure_grub.sh | 4 + .../scripts}/configure_locale.sh | 0 .../scripts}/configure_login.sh| 0 .../scripts}/configure_networking.sh | 0 .../scripts}/configure_persistent_config.sh| 1 - .../scripts}/configure_systemvm_services.sh| 0 .../scripts}/definition.rb | 4 +- .../scripts}/finalize.sh | 8 +- .../scripts}/install_systemvm_packages.sh | 14 +- tools/appliance/systemvmtemplate/template.json | 82 + tools/appliance/test.sh| 180 --- tools/appliance/vbox_disk_clean.rb | 49 --- tools/appliance/vbox_vm_clean.rb | 77 - tools/vagrant/devcloud/Vagrantfile | 206 tools/vagrant/devcloud/templates/tmpl/1/1/README | 1 - tools/vagrant/devcloud/templates/tmpl/1/5/README | 2 - tools/vagrant/systemvm/.gitignore | 52 --- tools/vagrant/systemvm/.ruby-version | 1 - tools/vagrant/systemvm/.rvmrc | 24 -- tools/vagrant/systemvm/Gemfile | 20 -- tools/vagrant/systemvm/README.md | 30 -- tools/vagrant/systemvm/VBoxManage | 41 --- tools/vagrant/systemvm/Vagrantfile | 123 --- tools/vagrant/systemvm/test.sh | 213 tools/vagrant/systemvm/vagrant.pub | 1 - 62 files changed, 339 insertions(+), 2637 deletions(-) diff --git a/pom.xml b/pom.xml index 39a611d..00a3542 100644 --- a/pom.xml +++ b/pom.xml @@ -880,14 +880,8 @@ services/secondary-storage/conf/agent.properties services/secondary-storage/conf/environment.properties test/systemvm/README.md - tools/appliance/.ruby-version -
[cloudstack] 09/22: CLOUDSTACK-10010: Port marvin test from #2190 by @swill
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit cbfba0af8a6b4f427d26742092d6236d16d0e6db Author: Will StevensAuthorDate: Sat Dec 2 21:11:40 2017 +0530 CLOUDSTACK-10010: Port marvin test from #2190 by @swill This ports the S2S config test by @swill from #2190 with additional changes to make robust and environment agnostic. Signed-off-by: Rohit Yadav --- test/integration/smoke/test_vpc_vpn.py | 468 - 1 file changed, 463 insertions(+), 5 deletions(-) diff --git a/test/integration/smoke/test_vpc_vpn.py b/test/integration/smoke/test_vpc_vpn.py index 83c244b..b3dfab2 100644 --- a/test/integration/smoke/test_vpc_vpn.py +++ b/test/integration/smoke/test_vpc_vpn.py @@ -1138,8 +1138,19 @@ class TestRVPCSite2SiteVpn(cloudstackTestCase): self.apiclient, customer2_response.id, vpn1_response['id']) self.debug("VPN connection created for VPC %s" % vpc1.id) -self.assertEqual( -vpnconn2_response['state'], "Connected", "Failed to connect between VPCs!") +def checkVpnConnected(): +connections = Vpn.listVpnConnection( +self.apiclient, +listall='true', +vpcid=vpc2.id) +if isinstance(connections, list): +return connections[0].state == 'Connected', None +return False, None + +# Wait up to 60 seconds for passive connection to show up as Connected +res, _ = wait_until(2, 30, checkVpnConnected) +if not res: +self.fail("Failed to connect between VPCs, see VPN state as Connected") # acquire an extra ip address to use to ssh into vm2 try: @@ -1174,9 +1185,8 @@ class TestRVPCSite2SiteVpn(cloudstackTestCase): if ssh_client: # run ping test -packet_loss = ssh_client.execute( -"/bin/ping -c 3 -t 10 " + vm1.nic[0].ipaddress + " |grep packet|cut -d ' ' -f 7| cut -f1 -d'%'")[0] -self.assert_(int(packet_loss) == 0, "Ping did not succeed") +packet_loss = ssh_client.execute("/bin/ping -c 3 -t 10 " + vm1.nic[0].ipaddress + " | grep packet | sed 's/.*received, //g' | sed 's/[% ]*packet.*//g'")[0] +self.assert_(int(packet_loss) < 50, "Ping did not succeed") else: self.fail("Failed to setup ssh connection to %s" % vm2.public_ip) @@ -1189,3 +1199,451 @@ class TestRVPCSite2SiteVpn(cloudstackTestCase): cleanup_resources(cls.apiclient, cls.cleanup) except Exception, e: raise Exception("Cleanup failed with %s" % e) + + +class TestVPCSite2SiteVPNMultipleOptions(cloudstackTestCase): + +@classmethod +def setUpClass(cls): +cls.logger = logging.getLogger('TestVPCSite2SiteVPNMultipleOptions') +cls.stream_handler = logging.StreamHandler() +cls.logger.setLevel(logging.DEBUG) +cls.logger.addHandler(cls.stream_handler) + +testClient = super(TestVPCSite2SiteVPNMultipleOptions, cls).getClsTestClient() +cls.apiclient = testClient.getApiClient() +cls.services = Services().services + +cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) +cls.domain = get_domain(cls.apiclient) + +cls.compute_offering = ServiceOffering.create( +cls.apiclient, +cls.services["compute_offering"] +) + +cls.account = Account.create( +cls.apiclient, services=cls.services["account"]) + +cls.hypervisor = testClient.getHypervisorInfo() + +cls.logger.debug("Downloading Template: %s from: %s" % (cls.services["template"][ + cls.hypervisor.lower()], cls.services["template"][cls.hypervisor.lower()]["url"])) +cls.template = Template.register(cls.apiclient, cls.services["template"][cls.hypervisor.lower( +)], cls.zone.id, hypervisor=cls.hypervisor.lower(), account=cls.account.name, domainid=cls.domain.id) +cls.template.download(cls.apiclient) + +if cls.template == FAILED: +assert False, "get_template() failed to return template" + +cls.logger.debug("Successfully created account: %s, id: \ + %s" % (cls.account.name, + cls.account.id)) + +cls.cleanup = [cls.account, cls.compute_offering] +return + +def _get_ssh_client(self, virtual_machine, services, retries): +""" Setup ssh client connection and return connection +vm requires attributes public_ip, public_port, username, password """ + +try: +ssh_client = SshClient( +virtual_machine.public_ip, +services["virtual_machine"]["ssh_port"], +
[cloudstack] 10/22: CLOUDSTACK-10013: Make the generated VR/json files unique (ports #1470)
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit e0857bbadf3cf4dd47c77ecaae4e2c347be98853 Author: Remi BergsmaAuthorDate: Sat Dec 2 23:19:14 2017 +0530 CLOUDSTACK-10013: Make the generated VR/json files unique (ports #1470) This ports PR #1470 by @remibergsma. Make the generated json files unique to prevent concurrency issues: The json files now have UUIDs to prevent them from getting overwritten before they've been executed. Prevents config to be pushed to the wrong router. 2016-02-25 18:32:23,797 DEBUG [c.c.a.t.Request] (AgentManager-Handler-1:null) (logid:) Seq 2-4684025087442026584: Processing: { Ans: , MgmtId: 90520732674657, via: 2, Ver: v1, Flags: 10, [{"com.cloud.agent.api.routing.GroupA nswer":{"results":["null - success: null","null - success: [INFO] update_config.py :: Processing incoming file => vm_dhcp_entry.json.4ea45061-2efb-4467-8eaa-db3d77fb0a7b\n[INFO] Processing JSON file vm_dhcp_entry.json.4ea4506 1-2efb-4467-8eaa-db3d77fb0a7b\n"],"result":true,"wait":0}}] } On the router: 2016-02-25 18:32:23,416 merge.py __moveFile:298 Processed file written to /var/cache/cloud/processed/vm_dhcp_entry.json.4ea45061-2efb-4467-8eaa-db3d77fb0a7b.gz Signed-off-by: Rohit Yadav --- .../facade/AbstractConfigItemFacade.java | 21 +- .../kvm/resource/LibvirtComputingResource.java | 5 + systemvm/patches/debian/etc/rc.local | 9 - systemvm/patches/debian/opt/cloud/bin/configure.py | 220 + systemvm/patches/debian/opt/cloud/bin/merge.py | 37 ++-- .../patches/debian/opt/cloud/bin/update_config.py | 22 ++- 6 files changed, 159 insertions(+), 155 deletions(-) diff --git a/core/src/com/cloud/agent/resource/virtualnetwork/facade/AbstractConfigItemFacade.java b/core/src/com/cloud/agent/resource/virtualnetwork/facade/AbstractConfigItemFacade.java index f017384..a083012 100644 --- a/core/src/com/cloud/agent/resource/virtualnetwork/facade/AbstractConfigItemFacade.java +++ b/core/src/com/cloud/agent/resource/virtualnetwork/facade/AbstractConfigItemFacade.java @@ -22,6 +22,8 @@ package com.cloud.agent.resource.virtualnetwork.facade; import java.util.Hashtable; import java.util.LinkedList; import java.util.List; +import java.util.UUID; +import org.apache.log4j.Logger; import com.cloud.agent.api.BumpUpPriorityCommand; import com.cloud.agent.api.SetupGuestNetworkCommand; @@ -58,6 +60,8 @@ import com.google.gson.GsonBuilder; public abstract class AbstractConfigItemFacade { +private static final Logger s_logger = Logger.getLogger(AbstractConfigItemFacade.class); + private final static Gson gson; private static Hashtable flyweight = new Hashtable (); @@ -104,13 +108,26 @@ public abstract class AbstractConfigItemFacade { return instance; } +private static String appendUuidToJsonFiles(final String filename) { +String remoteFileName = new String(filename); +if (remoteFileName.endsWith("json")) { +remoteFileName += "." + UUID.randomUUID().toString(); +} +return remoteFileName; +} + protected List generateConfigItems(final ConfigBase configuration) { final List cfg = new LinkedList<>(); -final ConfigItem configFile = new FileConfigItem(VRScripts.CONFIG_PERSIST_LOCATION, destinationFile, gson.toJson(configuration)); +final String remoteFilename = appendUuidToJsonFiles(destinationFile); +if (s_logger.isDebugEnabled()) { +s_logger.debug("Transformed filename: " + destinationFile + " to: " + remoteFilename); +} + +final ConfigItem configFile = new FileConfigItem(VRScripts.CONFIG_PERSIST_LOCATION, remoteFilename, gson.toJson(configuration)); cfg.add(configFile); -final ConfigItem updateCommand = new ScriptConfigItem(VRScripts.UPDATE_CONFIG, destinationFile); +final ConfigItem updateCommand = new ScriptConfigItem(VRScripts.UPDATE_CONFIG, remoteFilename); cfg.add(updateCommand); return cfg; diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index 51b9737..ebd36bd 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -330,6 +330,9 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv if (details == null) { details = parser.getLines(); } + +
[cloudstack] 08/22: CLOUDSTACK-10013: Fix ipsec VPN configuration
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 6409f62fe055184f0f73f8e53b802c11a802679a Author: Rohit YadavAuthorDate: Fri Dec 1 20:58:18 2017 +0530 CLOUDSTACK-10013: Fix ipsec VPN configuration - Fixes strongswan/ipsec, l2tpd and pppd configs - Uses auto=route in ipsec configs - Fixes road-warrior setup - Fixes site-to-site VPN with automatic connection configuration - Fixes vpc_vpn tests Signed-off-by: Rohit Yadav --- systemvm/patches/debian/opt/cloud/bin/configure.py | 38 +- .../patches/debian/opt/cloud/bin/ipsectunnel.sh| 10 +- .../debian/opt/cloud/bin/monitor_service.sh| 2 -- systemvm/patches/vpn/etc/ipsec.d/l2tp.conf | 12 +++ systemvm/patches/vpn/etc/ppp/options.xl2tpd| 2 -- systemvm/patches/vpn/opt/cloud/bin/vpn_l2tp.sh | 18 +- test/integration/smoke/test_vpc_vpn.py | 26 +++ 7 files changed, 55 insertions(+), 53 deletions(-) diff --git a/systemvm/patches/debian/opt/cloud/bin/configure.py b/systemvm/patches/debian/opt/cloud/bin/configure.py index 68d1c26..b8a3e02 100755 --- a/systemvm/patches/debian/opt/cloud/bin/configure.py +++ b/systemvm/patches/debian/opt/cloud/bin/configure.py @@ -546,10 +546,6 @@ class CsSite2SiteVpn(CsDataBag): ikepolicy=obj['ike_policy'].replace(';','-') esppolicy=obj['esp_policy'].replace(';','-') -pfs='no' -if 'modp' in esppolicy: -pfs='yes' - if rightpeer in self.confips: self.confips.remove(rightpeer) file = CsFile(vpnconffile) @@ -557,7 +553,6 @@ class CsSite2SiteVpn(CsDataBag): file.search("conn ", "conn vpn-%s" % rightpeer) file.addeq(" left=%s" % leftpeer) file.addeq(" leftsubnet=%s" % obj['local_guest_cidr']) -file.addeq(" leftnexthop=%s" % obj['local_public_gateway']) file.addeq(" right=%s" % rightpeer) file.addeq(" rightsubnet=%s" % peerlist) file.addeq(" type=tunnel") @@ -567,9 +562,8 @@ class CsSite2SiteVpn(CsDataBag): file.addeq(" ikelifetime=%s" % self.convert_sec_to_h(obj['ike_lifetime'])) file.addeq(" esp=%s" % esppolicy) file.addeq(" lifetime=%s" % self.convert_sec_to_h(obj['esp_lifetime'])) -file.addeq(" pfs=%s" % pfs) file.addeq(" keyingtries=2") -file.addeq(" auto=start") +file.addeq(" auto=route") if 'encap' not in obj: obj['encap']=False file.addeq(" forceencaps=%s" % CsHelper.bool_to_yn(obj['encap'])) @@ -585,10 +579,20 @@ class CsSite2SiteVpn(CsDataBag): logging.info("Configured vpn %s %s", leftpeer, rightpeer) CsHelper.execute("ipsec rereadsecrets") -# This will load the new config and start the connection when needed since auto=start in the config +# This will load the new config CsHelper.execute("ipsec reload") os.chmod(vpnsecretsfile, 0400) +for i in xrange(3): +result = CsHelper.execute('ipsec status vpn-%s | grep "%s"' % (rightpeer, peerlist.split(",", 1)[0])) +if len(result) > 0: +break +time.sleep(1) + +# With 'auto=route', connections are established on an attempt to +# communicate over the S2S VPN. This uses ping to initialize the connection. +CsHelper.execute("timeout 5 ping -c 3 %s" % (peerlist.split("/", 1)[0].replace(".0", ".1"))) + def convert_sec_to_h(self, val): hrs = int(val) / 3600 return "%sh" % hrs @@ -658,6 +662,7 @@ class CsRemoteAccessVpn(CsDataBag): self.confips = [] logging.debug(self.dbag) + for public_ip in self.dbag: if public_ip == "id": continue @@ -665,12 +670,13 @@ class CsRemoteAccessVpn(CsDataBag): #Enable remote access vpn if vpnconfig['create']: +shutdownIpsec = False logging.debug("Enabling remote access vpn on "+ public_ip) dev = CsHelper.get_device(public_ip) if dev == "": -logging.error("Request for ipsec to %s not possible because ip is not configured", public_ip) -continue +logging.error("Request for ipsec to %s not possible because ip is not configured", public_ip) +continue CsHelper.start_if_stopped("ipsec") self.configure_l2tpIpsec(public_ip, self.dbag[public_ip]) @@ -682,7 +688,6 @@ class CsRemoteAccessVpn(CsDataBag): CsHelper.execute("ipsec rereadsecrets") else: logging.debug("Disabling remote access vpn .") -
[cloudstack] 13/22: CLOUDSTACK-10193: Fix smoke tests failures with new systemvmtemplate
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 998437190051a4b663b3f8a20291cc59cd13af57 Author: Rohit YadavAuthorDate: Sat Dec 9 16:37:31 2017 +0530 CLOUDSTACK-10193: Fix smoke tests failures with new systemvmtemplate - Several systemvmtemplate optimizations - Uses new macchinina template for running smoke tests - Switch to latest Debian 9.3.0 release for systemvmtemplate - Introduce a new `get_test_template` that uses tiny test template such as macchinina as defined test_data.py - rVR related fixes and improvements Signed-off-by: Rohit Yadav --- .travis.yml| 11 +-- .../framework/jobs/impl/AsyncJobManagerImpl.java | 4 + .../com/cloud/resource/ResourceManagerImpl.java| 2 +- server/src/com/cloud/server/StatsCollector.java| 12 ++- .../secondary/SecondaryStorageVmManager.java | 6 +- .../SecondaryStorageManagerImpl.java | 2 +- systemvm/debian/etc/issue | 2 +- systemvm/debian/etc/rc.local | 28 --- .../etc/systemd/system/cloud-postinit.service | 2 +- systemvm/debian/opt/cloud/bin/cs/CsApp.py | 2 +- systemvm/debian/opt/cloud/bin/cs/CsRedundant.py| 11 ++- systemvm/debian/opt/cloud/bin/passwd_server| 26 -- systemvm/debian/opt/cloud/bin/passwd_server_ip | 29 --- systemvm/debian/opt/cloud/bin/setup/common.sh | 61 +- .../debian/opt/cloud/bin/setup/consoleproxy.sh | 2 +- systemvm/debian/opt/cloud/bin/setup/dhcpsrvr.sh| 2 +- systemvm/debian/opt/cloud/bin/setup/elbvm.sh | 2 +- systemvm/debian/opt/cloud/bin/setup/ilbvm.sh | 2 +- .../debian/opt/cloud/bin/setup/patchsystemvm.sh| 4 + systemvm/debian/opt/cloud/bin/setup/postinit.sh| 46 +-- systemvm/debian/opt/cloud/bin/setup/router.sh | 5 -- systemvm/debian/opt/cloud/bin/setup/secstorage.sh | 2 +- systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh | 5 -- systemvm/debian/opt/cloud/bin/update_config.py | 7 -- systemvm/debian/opt/cloud/bin/vpc_passwd_server| 32 .../opt/cloud/templates/keepalived.conf.templ | 11 ++- test/integration/smoke/test_accounts.py| 22 +++--- test/integration/smoke/test_affinity_groups.py | 10 +-- .../smoke/test_affinity_groups_projects.py | 11 +-- test/integration/smoke/test_deploy_vm_iso.py | 7 +- .../smoke/test_deploy_vm_with_userdata.py | 11 +-- ...st_deploy_vms_with_varied_deploymentplanners.py | 9 ++- test/integration/smoke/test_host_maintenance.py| 6 +- test/integration/smoke/test_hostha_kvm.py | 4 +- test/integration/smoke/test_internal_lb.py | 53 ++--- test/integration/smoke/test_list_ids_parameter.py | 10 +-- test/integration/smoke/test_loadbalance.py | 10 +-- test/integration/smoke/test_metrics_api.py | 4 +- test/integration/smoke/test_multipleips_per_nic.py | 7 +- .../smoke/test_nested_virtualization.py| 15 ++-- test/integration/smoke/test_network.py | 36 - test/integration/smoke/test_network_acl.py | 9 ++- test/integration/smoke/test_nic_adapter_type.py| 6 +- test/integration/smoke/test_password_server.py | 7 +- test/integration/smoke/test_portforwardingrules.py | 6 +- test/integration/smoke/test_privategw_acl.py | 7 +- test/integration/smoke/test_projects.py| 7 +- test/integration/smoke/test_reset_vm_on_reboot.py | 7 +- test/integration/smoke/test_router_dhcphosts.py| 12 +-- test/integration/smoke/test_router_dns.py | 11 ++- test/integration/smoke/test_router_dnsservice.py | 11 +-- test/integration/smoke/test_routers.py | 12 ++- .../smoke/test_routers_iptables_default_policy.py | 15 ++-- test/integration/smoke/test_routers_network_ops.py | 71 ++--- test/integration/smoke/test_service_offerings.py | 11 ++- test/integration/smoke/test_snapshots.py | 65 +-- test/integration/smoke/test_templates.py | 22 +++--- test/integration/smoke/test_usage.py | 22 +- test/integration/smoke/test_vpc_redundant.py | 55 ++--- test/integration/smoke/test_vpc_router_nics.py | 30 --- test/integration/smoke/test_vpc_vpn.py | 92 +++--- tools/appliance/build.sh | 4 +- .../definitions/systemvmtemplate/apt_upgrade.sh| 9 ++- .../definitions/systemvmtemplate/cleanup.sh| 5 +- .../definitions/systemvmtemplate/configure_grub.sh | 4 +- .../definitions/systemvmtemplate/definition.rb | 8 +- .../definitions/systemvmtemplate/finalize.sh | 3 +-
[GitHub] marcaurele commented on issue #1760: CLOUDSTACK-9593: userdata: enforce data is a multiple of 4 characters
marcaurele commented on issue #1760: CLOUDSTACK-9593: userdata: enforce data is a multiple of 4 characters URL: https://github.com/apache/cloudstack/pull/1760#issuecomment-352663581 @rhtyd conflict fixed This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #1448: CLOUDSTACK-9315: Removed unused Classes
blueorangutan commented on issue #1448: CLOUDSTACK-9315: Removed unused Classes URL: https://github.com/apache/cloudstack/pull/1448#issuecomment-352663113 Packaging result: ?centos6 ?centos7 ?debian. JID-1413 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #1446: CLOUDSTACK-9313: Remove unused code from CloudZoneStartupProcessor
blueorangutan commented on issue #1446: CLOUDSTACK-9313: Remove unused code from CloudZoneStartupProcessor URL: https://github.com/apache/cloudstack/pull/1446#issuecomment-352663116 Packaging result: ?centos6 ?centos7 ?debian. JID-1414 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #1499: Undetected bug correct and refactor of the class NfsSecondaryStorageResource
blueorangutan commented on issue #1499: Undetected bug correct and refactor of the class NfsSecondaryStorageResource URL: https://github.com/apache/cloudstack/pull/1499#issuecomment-352663115 Packaging result: ?centos6 ?centos7 ?debian. JID-1415 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2340: CLOUDSTACK-10106: GPU/vGPU Support on VMWare
rhtyd commented on issue #2340: CLOUDSTACK-10106: GPU/vGPU Support on VMWare URL: https://github.com/apache/cloudstack/pull/2340#issuecomment-352662115 @nitin-maharana can you address outstanding comments, then I can initiate testing for your PR. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2336: CLOUDSTACK-10153: Introduce string API arg trust validation
rhtyd commented on issue #2336: CLOUDSTACK-10153: Introduce string API arg trust validation URL: https://github.com/apache/cloudstack/pull/2336#issuecomment-352661968 Due to several failures, I'll close this one now and may work in future. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2340: CLOUDSTACK-10106: GPU/vGPU Support on VMWare
rhtyd commented on issue #2340: CLOUDSTACK-10106: GPU/vGPU Support on VMWare URL: https://github.com/apache/cloudstack/pull/2340#issuecomment-352662115 @nitin-maharana can you address outstanding comments, then I can initiate testing for you. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2301: CLOUDSTACK-10121 moveUser
rhtyd commented on issue #2301: CLOUDSTACK-10121 moveUser URL: https://github.com/apache/cloudstack/pull/2301#issuecomment-352661900 @DaanHoogland can you check failing tests? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2102: CLOUDSTACK-9889 Dedication of guest vlan range to a domain
rhtyd commented on issue #2102: CLOUDSTACK-9889 Dedication of guest vlan range to a domain URL: https://github.com/apache/cloudstack/pull/2102#issuecomment-352661435 @yvsubhash can you fix the conflict? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] marcaurele commented on issue #1934: [CLOUDSTACK-9772] Template: perform a HEAD request to check file size from a URL
marcaurele commented on issue #1934: [CLOUDSTACK-9772] Template: perform a HEAD request to check file size from a URL URL: https://github.com/apache/cloudstack/pull/1934#issuecomment-352661127 @rhtyd I did the code update regarding @wido comment. So now it tries to download using the HEAD request and reads the information. If that does not work, for example because the URL is a pre-signed S3 download one, it performs a GET and tries to read the content length from the header. If it is not found, it will read the length out of the downloaded content. IMO it's just waiting for @wido comment, and/or other people from the community This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2117: CLOUDSTACK-8735:Browser Based Volume and Template Upload Test Automat?
rhtyd commented on issue #2117: CLOUDSTACK-8735:Browser Based Volume and Template Upload Test Automat? URL: https://github.com/apache/cloudstack/pull/2117#issuecomment-352661023 @borisstoyanov can you have a look on this? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2128: CLOUDSTACK-9885: VPCVR: Updated to the private the traffic_type
rhtyd commented on issue #2128: CLOUDSTACK-9885: VPCVR: Updated to the private the traffic_type URL: https://github.com/apache/cloudstack/pull/2128#issuecomment-352288277 @jayapalu ping? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2139: CLOUDSTACK-9921: NPE when storage garbage collector is running.
blueorangutan commented on issue #2139: CLOUDSTACK-9921: NPE when storage garbage collector is running. URL: https://github.com/apache/cloudstack/pull/2139#issuecomment-352660909 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2128: CLOUDSTACK-9885: VPCVR: Updated to the private the traffic_type
rhtyd commented on issue #2128: CLOUDSTACK-9885: VPCVR: Updated to the private the traffic_type URL: https://github.com/apache/cloudstack/pull/2128#issuecomment-352660881 @jayapalu this is marked as a blocker, can you help fix this? Thanks. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2139: CLOUDSTACK-9921: NPE when storage garbage collector is running.
rhtyd commented on issue #2139: CLOUDSTACK-9921: NPE when storage garbage collector is running. URL: https://github.com/apache/cloudstack/pull/2139#issuecomment-352660728 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2139: CLOUDSTACK-9921: NPE when storage garbage collector is running.
rhtyd commented on issue #2139: CLOUDSTACK-9921: NPE when storage garbage collector is running. URL: https://github.com/apache/cloudstack/pull/2139#issuecomment-352660681 @jayakarteek can you fix build/packaging? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2203: [CLOUDSTACK-10029] All private, public, and guest interfaceses are marked as untagged ca?
blueorangutan commented on issue #2203: [CLOUDSTACK-10029] All private, public, and guest interfaceses are marked as untagged ca? URL: https://github.com/apache/cloudstack/pull/2203#issuecomment-352660533 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2146: Multidisk ova import
rhtyd commented on issue #2146: Multidisk ova import URL: https://github.com/apache/cloudstack/pull/2146#issuecomment-352660556 @nvazquez @DaanHoogland /cc @borisstoyanov - can you fix conflicts on this PR? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2203: [CLOUDSTACK-10029] All private, public, and guest interfaceses are marked as untagged ca?
rhtyd commented on issue #2203: [CLOUDSTACK-10029] All private, public, and guest interfaceses are marked as untagged ca? URL: https://github.com/apache/cloudstack/pull/2203#issuecomment-352660362 Additional review requested @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2204: [CLOUDSTACK-10025] Adding Support for NoVNC Console for KVM and XENSERVER
rhtyd commented on issue #2204: [CLOUDSTACK-10025] Adding Support for NoVNC Console for KVM and XENSERVER URL: https://github.com/apache/cloudstack/pull/2204#issuecomment-352660130 @syed any update on this? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2208: CLOUDSTACK-9542 make listNics and ListUserVms return uniform NIC data
rhtyd commented on issue #2208: CLOUDSTACK-9542 make listNics and ListUserVms return uniform NIC data URL: https://github.com/apache/cloudstack/pull/2208#issuecomment-352660012 @DaanHoogland can you fix conflicts on your PR? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2361: CLOUDSTACK-10190:Duplicate public VLAN for two different admin accounts.
rhtyd commented on issue #2361: CLOUDSTACK-10190:Duplicate public VLAN for two different admin accounts. URL: https://github.com/apache/cloudstack/pull/2361#issuecomment-352659833 Test LGTM, ignoring known failures. Additional review requested. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2073: CLOUDSTACK-9896: API: listDedicatedXXX should respect pagination
rhtyd commented on issue #2073: CLOUDSTACK-9896: API: listDedicatedXXX should respect pagination URL: https://github.com/apache/cloudstack/pull/2073#issuecomment-352659592 @marcaurele can you fix build failures? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2042: CLOUDSTACK-9875: Unable to re-apply Explicit dedication to VM
blueorangutan commented on issue #2042: CLOUDSTACK-9875: Unable to re-apply Explicit dedication to VM URL: https://github.com/apache/cloudstack/pull/2042#issuecomment-352659337 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2035: CLOUDSTACK-9867:VM snapshot on primary storage usage metrics
rhtyd commented on issue #2035: CLOUDSTACK-9867:VM snapshot on primary storage usage metrics URL: https://github.com/apache/cloudstack/pull/2035#issuecomment-352659268 @nvazquez can you help fix the conflicts on this PR? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2042: CLOUDSTACK-9875: Unable to re-apply Explicit dedication to VM
rhtyd commented on issue #2042: CLOUDSTACK-9875: Unable to re-apply Explicit dedication to VM URL: https://github.com/apache/cloudstack/pull/2042#issuecomment-352659306 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1934: [CLOUDSTACK-9772] Template: perform a HEAD request to check file size from a URL
rhtyd commented on issue #1934: [CLOUDSTACK-9772] Template: perform a HEAD request to check file size from a URL URL: https://github.com/apache/cloudstack/pull/1934#issuecomment-352659104 Update on this? @marcaurele This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #1906: CLOUDSTACK-9743 - ODL plugin responds to deleteHost causing other plugin in the chain to be ignored
blueorangutan commented on issue #1906: CLOUDSTACK-9743 - ODL plugin responds to deleteHost causing other plugin in the chain to be ignored URL: https://github.com/apache/cloudstack/pull/1906#issuecomment-352659196 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #1891: CLOUDSTACK-9730: [VMware] Unable to add a host with space in its name to existing VMware cluster
blueorangutan commented on issue #1891: CLOUDSTACK-9730: [VMware] Unable to add a host with space in its name to existing VMware cluster URL: https://github.com/apache/cloudstack/pull/1891#issuecomment-352659025 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1891: CLOUDSTACK-9730: [VMware] Unable to add a host with space in its name to existing VMware cluster
rhtyd commented on issue #1891: CLOUDSTACK-9730: [VMware] Unable to add a host with space in its name to existing VMware cluster URL: https://github.com/apache/cloudstack/pull/1891#issuecomment-352659002 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1906: CLOUDSTACK-9743 - ODL plugin responds to deleteHost causing other plugin in the chain to be ignored
rhtyd commented on issue #1906: CLOUDSTACK-9743 - ODL plugin responds to deleteHost causing other plugin in the chain to be ignored URL: https://github.com/apache/cloudstack/pull/1906#issuecomment-352659038 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1775: CLOUDSTACK-9606: While IP address is released, tag are not deleted.
rhtyd commented on issue #1775: CLOUDSTACK-9606: While IP address is released, tag are not deleted. URL: https://github.com/apache/cloudstack/pull/1775#issuecomment-352658259 @priyankparihar can you fix the conflict? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #1740: CLOUDSTACK-9572 Snapshot on primary storage not cleaned up after Stor?
blueorangutan commented on issue #1740: CLOUDSTACK-9572 Snapshot on primary storage not cleaned up after Stor? URL: https://github.com/apache/cloudstack/pull/1740#issuecomment-352658230 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1760: CLOUDSTACK-9593: userdata: enforce data is a multiple of 4 characters
rhtyd commented on issue #1760: CLOUDSTACK-9593: userdata: enforce data is a multiple of 4 characters URL: https://github.com/apache/cloudstack/pull/1760#issuecomment-352658153 @marcaurele can you fix the conflict? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1740: CLOUDSTACK-9572 Snapshot on primary storage not cleaned up after Stor?
rhtyd commented on issue #1740: CLOUDSTACK-9572 Snapshot on primary storage not cleaned up after Stor? URL: https://github.com/apache/cloudstack/pull/1740#issuecomment-352658106 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1730: VMTemplateZone needs some love
rhtyd commented on issue #1730: VMTemplateZone needs some love URL: https://github.com/apache/cloudstack/pull/1730#issuecomment-352658016 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #1730: VMTemplateZone needs some love
blueorangutan commented on issue #1730: VMTemplateZone needs some love URL: https://github.com/apache/cloudstack/pull/1730#issuecomment-352658047 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1709: CLOUDSTACK-7982: KVM live migration with local storage
rhtyd commented on issue #1709: CLOUDSTACK-7982: KVM live migration with local storage URL: https://github.com/apache/cloudstack/pull/1709#issuecomment-352657861 @marcaurele can you fix the conflicts? @DaanHoogland for reference we've another such implementation at https://github.com/MissionCriticalCloud/cosmic/pull/541 and https://github.com/MissionCriticalCloud/cosmic/pull/539 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1593: CLOUDSTACK-9417: Usage module refactoring
rhtyd commented on issue #1593: CLOUDSTACK-9417: Usage module refactoring URL: https://github.com/apache/cloudstack/pull/1593#issuecomment-352657415 @nvazquez ping, please fix the conflicts? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #1554: CLOUDSTACK-9602: API: improve resource limits comprehension
blueorangutan commented on issue #1554: CLOUDSTACK-9602: API: improve resource limits comprehension URL: https://github.com/apache/cloudstack/pull/1554#issuecomment-352657225 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1554: CLOUDSTACK-9602: API: improve resource limits comprehension
rhtyd commented on issue #1554: CLOUDSTACK-9602: API: improve resource limits comprehension URL: https://github.com/apache/cloudstack/pull/1554#issuecomment-352657113 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #1499: Undetected bug correct and refactor of the class NfsSecondaryStorageResource
blueorangutan commented on issue #1499: Undetected bug correct and refactor of the class NfsSecondaryStorageResource URL: https://github.com/apache/cloudstack/pull/1499#issuecomment-352657052 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1499: Undetected bug correct and refactor of the class NfsSecondaryStorageResource
rhtyd commented on issue #1499: Undetected bug correct and refactor of the class NfsSecondaryStorageResource URL: https://github.com/apache/cloudstack/pull/1499#issuecomment-352656989 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #1448: CLOUDSTACK-9315: Removed unused Classes
blueorangutan commented on issue #1448: CLOUDSTACK-9315: Removed unused Classes URL: https://github.com/apache/cloudstack/pull/1448#issuecomment-352656705 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #1446: CLOUDSTACK-9313: Remove unused code from CloudZoneStartupProcessor
blueorangutan commented on issue #1446: CLOUDSTACK-9313: Remove unused code from CloudZoneStartupProcessor URL: https://github.com/apache/cloudstack/pull/1446#issuecomment-352656712 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1448: CLOUDSTACK-9315: Removed unused Classes
rhtyd commented on issue #1448: CLOUDSTACK-9315: Removed unused Classes URL: https://github.com/apache/cloudstack/pull/1448#issuecomment-352656657 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1446: CLOUDSTACK-9313: Remove unused code from CloudZoneStartupProcessor
rhtyd commented on issue #1446: CLOUDSTACK-9313: Remove unused code from CloudZoneStartupProcessor URL: https://github.com/apache/cloudstack/pull/1446#issuecomment-352656508 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd closed pull request #1439: Changed Void Methods to void
rhtyd closed pull request #1439: Changed Void Methods to void URL: https://github.com/apache/cloudstack/pull/1439 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java index cdcab754e91..a7d985c783f 100644 --- a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java +++ b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java @@ -164,40 +164,30 @@ public void copyAsync(DataObject srcData, DataObject destData, Host destHost, As private void validate(SnapshotInfo snapshotInfo) { long volumeId = snapshotInfo.getVolumeId(); - VolumeVO volumeVO = _volumeDao.findByIdIncludingRemoved(volumeId); - if (volumeVO.getFormat() != ImageFormat.VHD) { throw new CloudRuntimeException("Only the " + ImageFormat.VHD.toString() + " image type is currently supported."); } } -private Void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, TemplateInfo templateInfo, AsyncCompletionCallback callback) { +private void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, TemplateInfo templateInfo, AsyncCompletionCallback callback) { try { snapshotInfo.processEvent(Event.CopyingRequested); } catch (Exception ex) { throw new CloudRuntimeException("This snapshot is not currently in a state where it can be used to create a template."); } - HostVO hostVO = getHost(snapshotInfo.getDataStore().getId()); DataStore srcDataStore = snapshotInfo.getDataStore(); - String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString()); int primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue())); CopyCommand copyCommand = new CopyCommand(snapshotInfo.getTO(), templateInfo.getTO(), primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value()); - String errMsg = null; - CopyCmdAnswer copyCmdAnswer = null; - try { _volumeService.grantAccess(snapshotInfo, hostVO, srcDataStore); - MapsrcDetails = getSnapshotDetails(_storagePoolDao.findById(srcDataStore.getId()), snapshotInfo); - copyCommand.setOptions(srcDetails); - copyCmdAnswer = (CopyCmdAnswer)_agentMgr.send(hostVO.getId(), copyCommand); } catch (Exception ex) { @@ -210,7 +200,6 @@ private Void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, Templat catch (Exception ex) { s_logger.debug(ex.getMessage(), ex); } - if (copyCmdAnswer == null || !copyCmdAnswer.getResult()) { if (copyCmdAnswer != null && copyCmdAnswer.getDetails() != null && !copyCmdAnswer.getDetails().isEmpty()) { errMsg = copyCmdAnswer.getDetails(); @@ -219,7 +208,6 @@ private Void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, Templat errMsg = "Unable to perform host-side operation"; } } - try { if (errMsg == null) { snapshotInfo.processEvent(Event.OperationSuccessed); @@ -232,17 +220,12 @@ private Void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, Templat s_logger.debug(ex.getMessage(), ex); } } - CopyCommandResult result = new CopyCommandResult(null, copyCmdAnswer); - result.setResult(errMsg); - callback.complete(result); - -return null; } -private Void handleCreateVolumeFromSnapshotBothOnStorageSystem(SnapshotInfo snapshotInfo, VolumeInfo volumeInfo, AsyncCompletionCallback callback) { +private void handleCreateVolumeFromSnapshotBothOnStorageSystem(SnapshotInfo snapshotInfo, VolumeInfo volumeInfo, AsyncCompletionCallback callback) { try { // at this point, the snapshotInfo and volumeInfo should have the same disk offering ID (so either one should be OK to get a DiskOfferingVO instance) DiskOfferingVO diskOffering = _diskOfferingDao.findByIdIncludingRemoved(volumeInfo.getDiskOfferingId()); @@ -250,11 +233,8 @@ private Void handleCreateVolumeFromSnapshotBothOnStorageSystem(SnapshotInfo snap // update the volume's hv_ss_reserve (hypervisor snapshot reserve) from a disk offering (used for managed storage)
[GitHub] rhtyd commented on issue #1439: Changed Void Methods to void
rhtyd commented on issue #1439: Changed Void Methods to void URL: https://github.com/apache/cloudstack/pull/1439#issuecomment-352656258 Thanks for your contribution. I'm closing this on the remark that there is valid usage for the refactored/removed code. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[cloudstack] branch master updated: CLOUDSTACK-10198: removed unused (#1437)
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 7cb4551 CLOUDSTACK-10198: removed unused (#1437) 7cb4551 is described below commit 7cb4551d7560e53aacbaabf11df21551caea39a0 Author: pedro-martinsAuthorDate: Tue Dec 19 04:54:25 2017 -0200 CLOUDSTACK-10198: removed unused (#1437) com.cloud.hypervisor.hyperv.resource.HypervDummyResourceBase class and change the log message in com.cloud.hypervisor.hyperv.discoverer.HypervServerDiscoverer --- .../hyperv/resource/HypervDummyResourceBase.java | 98 -- .../hyperv/discoverer/HypervServerDiscoverer.java | 4 +- 2 files changed, 2 insertions(+), 100 deletions(-) diff --git a/core/src/com/cloud/hypervisor/hyperv/resource/HypervDummyResourceBase.java b/core/src/com/cloud/hypervisor/hyperv/resource/HypervDummyResourceBase.java deleted file mode 100644 index 5c9aecd..000 --- a/core/src/com/cloud/hypervisor/hyperv/resource/HypervDummyResourceBase.java +++ /dev/null @@ -1,98 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -package com.cloud.hypervisor.hyperv.resource; - -import java.util.Map; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; -import com.cloud.agent.api.PingCommand; -import com.cloud.agent.api.StartupCommand; -import com.cloud.host.Host.Type; -import com.cloud.resource.ServerResource; -import com.cloud.resource.ServerResourceBase; - -/** - * Implementation of dummy resource to be returned from discoverer - **/ - -public class HypervDummyResourceBase extends ServerResourceBase implements ServerResource { - -@Override -public Type getType() { -// TODO Auto-generated method stub -return null; -} - -@Override -public StartupCommand[] initialize() { -// TODO Auto-generated method stub -return null; -} - -@Override -public PingCommand getCurrentStatus(long id) { -// TODO Auto-generated method stub -return null; -} - -@Override -public Answer executeRequest(Command cmd) { -// TODO Auto-generated method stub -return null; -} - -@Override -protected String getDefaultScriptsDir() { -// TODO Auto-generated method stub -return null; -} - -@Override -public void setName(String name) { -// TODO Auto-generated method stub - -} - -@Override -public void setConfigParams(Map params) { -// TODO Auto-generated method stub - -} - -@Override -public Map getConfigParams() { -// TODO Auto-generated method stub -return null; -} - -@Override -public int getRunLevel() { -// TODO Auto-generated method stub -return 0; -} - -@Override -public void setRunLevel(int level) { -// TODO Auto-generated method stub - -} - -} diff --git a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java index fd54d43..51b4230 100644 --- a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java +++ b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java @@ -42,8 +42,8 @@ import com.cloud.agent.api.SetupAnswer; import com.cloud.agent.api.SetupCommand; import com.cloud.agent.api.StartupCommand; import com.cloud.agent.api.StartupRoutingCommand; -import com.cloud.configuration.Config; import com.cloud.alert.AlertManager; +import com.cloud.configuration.Config; import com.cloud.dc.ClusterVO; import com.cloud.dc.DataCenterVO; import com.cloud.dc.HostPodVO; @@ -257,7 +257,7 @@ public class HypervServerDiscoverer extends DiscovererBase implements Discoverer return null; } -s_logger.info("Creating" + HypervDirectConnectResource.class.getName() + " HypervDummyResourceBase for
[GitHub] rhtyd closed pull request #1437: removed unused HypervDummyResourceBase class
rhtyd closed pull request #1437: removed unused HypervDummyResourceBase class URL: https://github.com/apache/cloudstack/pull/1437 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/core/src/com/cloud/hypervisor/hyperv/resource/HypervDummyResourceBase.java b/core/src/com/cloud/hypervisor/hyperv/resource/HypervDummyResourceBase.java deleted file mode 100644 index 5c9aecd95e1..000 --- a/core/src/com/cloud/hypervisor/hyperv/resource/HypervDummyResourceBase.java +++ /dev/null @@ -1,98 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -package com.cloud.hypervisor.hyperv.resource; - -import java.util.Map; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; -import com.cloud.agent.api.PingCommand; -import com.cloud.agent.api.StartupCommand; -import com.cloud.host.Host.Type; -import com.cloud.resource.ServerResource; -import com.cloud.resource.ServerResourceBase; - -/** - * Implementation of dummy resource to be returned from discoverer - **/ - -public class HypervDummyResourceBase extends ServerResourceBase implements ServerResource { - -@Override -public Type getType() { -// TODO Auto-generated method stub -return null; -} - -@Override -public StartupCommand[] initialize() { -// TODO Auto-generated method stub -return null; -} - -@Override -public PingCommand getCurrentStatus(long id) { -// TODO Auto-generated method stub -return null; -} - -@Override -public Answer executeRequest(Command cmd) { -// TODO Auto-generated method stub -return null; -} - -@Override -protected String getDefaultScriptsDir() { -// TODO Auto-generated method stub -return null; -} - -@Override -public void setName(String name) { -// TODO Auto-generated method stub - -} - -@Override -public void setConfigParams(Mapparams) { -// TODO Auto-generated method stub - -} - -@Override -public Map getConfigParams() { -// TODO Auto-generated method stub -return null; -} - -@Override -public int getRunLevel() { -// TODO Auto-generated method stub -return 0; -} - -@Override -public void setRunLevel(int level) { -// TODO Auto-generated method stub - -} - -} diff --git a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java index fd8db4a5644..bd3697732d5 100644 --- a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java +++ b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java @@ -42,8 +42,8 @@ import com.cloud.agent.api.SetupCommand; import com.cloud.agent.api.StartupCommand; import com.cloud.agent.api.StartupRoutingCommand; -import com.cloud.configuration.Config; import com.cloud.alert.AlertManager; +import com.cloud.configuration.Config; import com.cloud.dc.ClusterVO; import com.cloud.dc.DataCenterVO; import com.cloud.dc.HostPodVO; @@ -245,7 +245,7 @@ public final boolean processTimeout(final long agentId, final long seq) { return null; } -s_logger.info("Creating" + HypervDirectConnectResource.class.getName() + " HypervDummyResourceBase for zone/pod/cluster " + dcId + "/" + podId + "/" + +s_logger.info("Creating" + HypervDirectConnectResource.class.getName() + " HypervDirectConnectResource for zone/pod/cluster " + dcId + "/" + podId + "/" + clusterId); // Some Hypervisors organise themselves in pools. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above
[GitHub] blueorangutan commented on issue #2211: CLOUDSTACK-10013: Migrate systemvmtemplate to Debian9
blueorangutan commented on issue #2211: CLOUDSTACK-10013: Migrate systemvmtemplate to Debian9 URL: https://github.com/apache/cloudstack/pull/2211#issuecomment-352655838 Packaging result: ?centos6 ?centos7 ?debian. JID-1412 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1278: CLOUDSTACK-9198: Virtual router gets deployed in disabled Pod
rhtyd commented on issue #1278: CLOUDSTACK-9198: Virtual router gets deployed in disabled Pod URL: https://github.com/apache/cloudstack/pull/1278#issuecomment-352655146 Additional discussion and review is requested. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2350: Cloudstack 10170 - fixes resource tags security bugs and adds account tags support
blueorangutan commented on issue #2350: Cloudstack 10170 - fixes resource tags security bugs and adds account tags support URL: https://github.com/apache/cloudstack/pull/2350#issuecomment-352654800 @rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-55u3) has been kicked to run smoke tests This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2350: Cloudstack 10170 - fixes resource tags security bugs and adds account tags support
rhtyd commented on issue #2350: Cloudstack 10170 - fixes resource tags security bugs and adds account tags support URL: https://github.com/apache/cloudstack/pull/2350#issuecomment-352654728 @blueorangutan test centos7 vmware-55u3 component/test_tags.py This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2350: Cloudstack 10170 - fixes resource tags security bugs and adds account tags support
blueorangutan commented on issue #2350: Cloudstack 10170 - fixes resource tags security bugs and adds account tags support URL: https://github.com/apache/cloudstack/pull/2350#issuecomment-352654526 @rhtyd I understand these words: "help", "hello", "thanks", "package", "test" Test command usage: test [mgmt os] [hypervisor] [additional tests] Mgmt OS options: ['centos6', 'centos7', 'ubuntu'] Hypervisor options: ['kvm-centos6', 'kvm-centos7', 'kvm-ubuntu', 'xenserver-65sp1', 'xenserver-62sp1', 'vmware-60u2', 'vmware-55u3', 'vmware-51u1', 'vmware-50u1'] Additional tests: list of space separated tests with paths relative to the `test/integration` directory, for example: component/test_acl_listvm.py component/test_volumes.py Note: when additional tests are passed, you need to specify mgmt server os and hypervisor or use the `matrix` command. Blessed contributors for kicking Trillian test jobs: ['rhtyd', 'nvazquez', 'PaulAngus', 'borisstoyanov', 'DaanHoogland'] This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2320: CLOUDSTACK-10178: Hotfixes to make 4.10 work
blueorangutan commented on issue #2320: CLOUDSTACK-10178: Hotfixes to make 4.10 work URL: https://github.com/apache/cloudstack/pull/2320#issuecomment-352654522 @rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2320: CLOUDSTACK-10178: Hotfixes to make 4.10 work
rhtyd commented on issue #2320: CLOUDSTACK-10178: Hotfixes to make 4.10 work URL: https://github.com/apache/cloudstack/pull/2320#issuecomment-352654491 @blueorangutan test This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2350: Cloudstack 10170 - fixes resource tags security bugs and adds account tags support
rhtyd commented on issue #2350: Cloudstack 10170 - fixes resource tags security bugs and adds account tags support URL: https://github.com/apache/cloudstack/pull/2350#issuecomment-352654391 @blueorangutan help This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2364: [CLOUDSTACK-10195] CloudStack MySQL HA problem -- No database selected
rhtyd commented on issue #2364: [CLOUDSTACK-10195] CloudStack MySQL HA problem -- No database selected URL: https://github.com/apache/cloudstack/pull/2364#issuecomment-352653376 Tests LGTM. We'll need an additional review on this. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #1940: CLOUDSTACK-9781:ACS records ID in events tables instead of UUID.
rhtyd commented on issue #1940: CLOUDSTACK-9781:ACS records ID in events tables instead of UUID. URL: https://github.com/apache/cloudstack/pull/1940#issuecomment-352652956 Tests lgtm. @syed @DaanHoogland are you lgtm on this? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[cloudstack] 01/06: CLOUDSTACK-10013: Fix VMware related issues and fix misc tests
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 924965fd95b1a0f215819ee853a0856d4fb1efa9 Author: Rohit YadavAuthorDate: Wed Dec 13 01:42:05 2017 +0530 CLOUDSTACK-10013: Fix VMware related issues and fix misc tests This fixes test failures around VMware with the new systemvmtemplate. In addition: - Does not skip rVR related test cases for VMware - Removes rc.local - Processes unprocessed cmd_line.json - Fixed NPEs around VMware tests/code - On VMware, use udevadm to reconfigure nic/mac address than rebooting - Fix proper acpi shutdown script for faster systemvm shutdowns - Give at least 256MB of swap for VRs to avoid OOM on VMware - Fixes smoke tests for environment related failures Signed-off-by: Rohit Yadav --- .../com/cloud/vm/VirtualMachineManagerImpl.java| 2 +- server/src/com/cloud/server/StatsCollector.java| 20 +++- systemvm/debian/etc/rc.local | 19 systemvm/debian/opt/cloud/bin/cs/CsDhcp.py | 2 +- systemvm/debian/opt/cloud/bin/setup/common.sh | 8 ++-- systemvm/debian/opt/cloud/bin/setup/router.sh | 6 +-- systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh | 7 +-- systemvm/debian/opt/cloud/bin/update_config.py | 6 +++ .../smoke/test_deploy_virtio_scsi_vm.py| 3 +- .../smoke/test_deploy_vm_root_resize.py| 56 +- test/integration/smoke/test_internal_lb.py | 10 test/integration/smoke/test_iso.py | 0 test/integration/smoke/test_list_ids_parameter.py | 0 .../smoke/test_nested_virtualization.py| 0 test/integration/smoke/test_privategw_acl.py | 8 test/integration/smoke/test_routers_network_ops.py | 10 test/integration/smoke/test_ssvm.py| 4 +- test/integration/smoke/test_vm_life_cycle.py | 0 test/integration/smoke/test_volumes.py | 2 + test/integration/smoke/test_vpc_redundant.py | 10 test/integration/smoke/test_vpc_vpn.py | 10 .../systemvmtemplate/configure_acpid.sh| 13 ++--- .../definitions/systemvmtemplate/configure_grub.sh | 2 +- .../systemvmtemplate/install_systemvm_packages.sh | 4 +- .../definitions/systemvmtemplate/preseed.cfg | 6 +-- 25 files changed, 71 insertions(+), 137 deletions(-) diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index 74927b9..50e53e3 100755 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -4743,8 +4743,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final VMInstanceVO vm = _entityMgr.findById(VMInstanceVO.class, work.getVmId()); if (vm == null) { s_logger.info("Unable to find vm " + work.getVmId()); +throw new CloudRuntimeException("Unable to find VM id=" + work.getVmId()); } -assert vm != null; orchestrateStop(vm.getUuid(), work.isCleanup()); return new Pair (JobInfo.Status.SUCCEEDED, null); diff --git a/server/src/com/cloud/server/StatsCollector.java b/server/src/com/cloud/server/StatsCollector.java index d32ed98..b66fa5f 100644 --- a/server/src/com/cloud/server/StatsCollector.java +++ b/server/src/com/cloud/server/StatsCollector.java @@ -64,6 +64,7 @@ import com.cloud.cluster.ManagementServerHostVO; import com.cloud.cluster.dao.ManagementServerHostDao; import com.cloud.dc.Vlan.VlanType; import com.cloud.dc.VlanVO; +import com.cloud.dc.dao.ClusterDao; import com.cloud.dc.dao.VlanDao; import com.cloud.exception.StorageUnavailableException; import com.cloud.gpu.dao.HostGpuGroupsDao; @@ -92,18 +93,20 @@ import com.cloud.network.as.dao.AutoScaleVmGroupVmMapDao; import com.cloud.network.as.dao.AutoScaleVmProfileDao; import com.cloud.network.as.dao.ConditionDao; import com.cloud.network.as.dao.CounterDao; +import com.cloud.org.Cluster; import com.cloud.resource.ResourceManager; import com.cloud.resource.ResourceState; import com.cloud.service.ServiceOfferingVO; import com.cloud.service.dao.ServiceOfferingDao; import com.cloud.storage.ImageStoreDetailsUtil; +import com.cloud.storage.ScopeType; +import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.StorageManager; import com.cloud.storage.StorageStats; import com.cloud.storage.VolumeStats; import com.cloud.storage.VolumeVO; import com.cloud.storage.dao.VolumeDao; import com.cloud.user.UserStatisticsVO; -import com.cloud.storage.Storage.ImageFormat; import com.cloud.user.VmDiskStatisticsVO; import
[cloudstack] 03/06: CLOUDSTACK-10194: Use packer for building systemvmtemplates
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit c57943eee95e834df12cd5d7828ced312705e70f Author: Rohit YadavAuthorDate: Sun Dec 17 12:55:26 2017 +0530 CLOUDSTACK-10194: Use packer for building systemvmtemplates - This migrates the current systemvmtemplate build system from veewee/virtualbox to packer and qemu based. - This also introduces and updates a CentOS7 built-in template. - Remove old appliance build scripts and files. Signed-off-by: Rohit Yadav --- pom.xml| 8 +- tools/appliance/.ruby-version | 1 - tools/appliance/.rvmrc | 24 -- tools/appliance/README.md | 105 +- tools/appliance/build.sh | 359 +++-- tools/appliance/builtin/http/kickstart.cfg | 91 ++ .../scripts/base.sh} | 28 +- .../{Gemfile => builtin/scripts/cleanup.sh}| 20 +- tools/appliance/builtin/template.json | 53 +++ tools/appliance/convert/Convert.class | Bin 984 -> 0 bytes tools/appliance/convert/Convert.java | 36 --- tools/appliance/convert_ovf_vbox_to_esx.xslt | 42 --- tools/appliance/definitions/builtin/base.sh| 14 - tools/appliance/definitions/builtin/cleanup.sh | 21 -- tools/appliance/definitions/builtin/definition.rb | 33 -- .../definitions/builtin/install-xs-tools.sh| 10 - tools/appliance/definitions/builtin/ks.cfg | 35 -- tools/appliance/definitions/builtin/postinstall.sh | 54 tools/appliance/definitions/builtin/zerodisk.sh| 3 - tools/appliance/definitions/debianbase/cleanup.sh | 49 --- .../definitions/debianbase/configure_login.sh | 78 - .../appliance/definitions/debianbase/definition.rb | 80 - tools/appliance/definitions/debianbase/preseed.cfg | 129 tools/appliance/definitions/debianbase/zerodisk.sh | 43 --- tools/appliance/definitions/devcloud/base.sh | 12 - tools/appliance/definitions/devcloud/cleanup.sh| 21 -- tools/appliance/definitions/devcloud/definition.rb | 45 --- .../appliance/definitions/devcloud/postinstall.sh | 60 tools/appliance/definitions/devcloud/preseed.cfg | 357 tools/appliance/definitions/devcloud/zerodisk.sh | 11 - tools/appliance/shar_cloud_scripts.sh | 2 +- .../http}/preseed.cfg | 13 +- .../scripts}/apt_upgrade.sh| 5 +- .../scripts}/authorized_keys.sh| 0 .../scripts}/cleanup.sh| 0 .../scripts}/configure_acpid.sh| 0 .../scripts}/configure_conntrack.sh| 0 .../scripts}/configure_grub.sh | 4 + .../scripts}/configure_locale.sh | 0 .../scripts}/configure_login.sh| 0 .../scripts}/configure_networking.sh | 0 .../scripts}/configure_persistent_config.sh| 1 - .../scripts}/configure_systemvm_services.sh| 0 .../scripts}/definition.rb | 4 +- .../scripts}/finalize.sh | 8 +- .../scripts}/install_systemvm_packages.sh | 14 +- tools/appliance/systemvmtemplate/template.json | 82 + tools/appliance/test.sh| 180 --- tools/appliance/vbox_disk_clean.rb | 49 --- tools/appliance/vbox_vm_clean.rb | 77 - tools/vagrant/devcloud/Vagrantfile | 206 tools/vagrant/devcloud/templates/tmpl/1/1/README | 1 - tools/vagrant/devcloud/templates/tmpl/1/5/README | 2 - tools/vagrant/systemvm/.gitignore | 52 --- tools/vagrant/systemvm/.ruby-version | 1 - tools/vagrant/systemvm/.rvmrc | 24 -- tools/vagrant/systemvm/Gemfile | 20 -- tools/vagrant/systemvm/README.md | 30 -- tools/vagrant/systemvm/VBoxManage | 41 --- tools/vagrant/systemvm/Vagrantfile | 123 --- tools/vagrant/systemvm/test.sh | 213 tools/vagrant/systemvm/vagrant.pub | 1 - 62 files changed, 341 insertions(+), 2634 deletions(-) diff --git a/pom.xml b/pom.xml index 39a611d..00a3542 100644 --- a/pom.xml +++ b/pom.xml @@ -880,14 +880,8 @@ services/secondary-storage/conf/agent.properties services/secondary-storage/conf/environment.properties test/systemvm/README.md - tools/appliance/.ruby-version -
[cloudstack] 06/06: CLOUDSTACK-10127: KVM + Ovs: Incorrect devId on static nat
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit daf21944ec1f4fc06fe9a670834a9c1921f95b13 Author: Frank MaximusAuthorDate: Wed Nov 1 18:32:08 2017 +0100 CLOUDSTACK-10127: KVM + Ovs: Incorrect devId on static nat This ports blocker fix by @fmaximus from #2304. Signed-off-by: Rohit Yadav --- .../kvm/resource/LibvirtComputingResource.java | 20 +- .../LibvirtNetworkElementCommandWrapperTest.java | 243 + 2 files changed, 254 insertions(+), 9 deletions(-) diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index 7c60878..97e6cfc 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -31,6 +31,7 @@ import java.util.Arrays; import java.util.Calendar; import java.util.Collections; import java.util.Comparator; +import java.util.EnumMap; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -1688,27 +1689,28 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv final String routerName = cmd.getAccessDetail(NetworkElementCommand.ROUTER_NAME); try { -conn = LibvirtConnection.getConnectionByVmName(routerName); +conn = getLibvirtUtilitiesHelper().getConnectionByVmName(routerName); final IpAddressTO[] ips = cmd.getIpAddresses(); Integer devNum = 0; -final Map broadcastUriToNicNum = new HashMap (); +final Map trafficTypeToNicNum = new EnumMap<>(TrafficType.class); final List pluggedNics = getInterfaces(conn, routerName); for (final InterfaceDef pluggedNic : pluggedNics) { final String pluggedVlan = pluggedNic.getBrName(); if (pluggedVlan.equalsIgnoreCase(_linkLocalBridgeName)) { -broadcastUriToNicNum.put("LinkLocal", devNum); -} else if (pluggedVlan.equalsIgnoreCase(_publicBridgeName) || pluggedVlan.equalsIgnoreCase(_privBridgeName) || -pluggedVlan.equalsIgnoreCase(_guestBridgeName)) { - broadcastUriToNicNum.put(BroadcastDomainType.Vlan.toUri(Vlan.UNTAGGED).toString(), devNum); -} else { - broadcastUriToNicNum.put(getBroadcastUriFromBridge(pluggedVlan), devNum); +trafficTypeToNicNum.put(TrafficType.Control, devNum); +} else if (pluggedVlan.equalsIgnoreCase(_publicBridgeName)) { +trafficTypeToNicNum.put(TrafficType.Public, devNum); +} else if (pluggedVlan.equalsIgnoreCase(_privBridgeName)) { +trafficTypeToNicNum.put(TrafficType.Management, devNum); +} else if (pluggedVlan.equalsIgnoreCase(_guestBridgeName)) { +trafficTypeToNicNum.put(TrafficType.Guest, devNum); } devNum++; } for (final IpAddressTO ip : ips) { -ip.setNicDevId(broadcastUriToNicNum.get(ip.getBroadcastUri())); +ip.setNicDevId(trafficTypeToNicNum.get(ip.getTrafficType())); } return new ExecutionResult(true, null); diff --git a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtNetworkElementCommandWrapperTest.java b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtNetworkElementCommandWrapperTest.java new file mode 100644 index 000..c0a973e --- /dev/null +++ b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtNetworkElementCommandWrapperTest.java @@ -0,0 +1,243 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +//
[cloudstack] branch debian9-systemvmtemplate updated (9d9c309 -> daf2194)
This is an automated email from the ASF dual-hosted git repository. rohit pushed a change to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git. discard 9d9c309 CLOUDSTACK-10013: Add systemvm 4.11 migration in 4.10->4.11 upgrade path discard 4ee43ac CLOUDSTACK-10194: Use packer for building systemvmtemplates discard 1d39164 CLOUDSTACK-10193: Use other64Linux for systemvms on VMware discard 981fc42 CLOUDSTACK-10013: Fix VMware related issues new 924965f CLOUDSTACK-10013: Fix VMware related issues and fix misc tests new 04f4baa CLOUDSTACK-10193: Use other64Linux for systemvms on VMware new c57943e CLOUDSTACK-10194: Use packer for building systemvmtemplates new 2b5598b CLOUDSTACK-10013: Add systemvm 4.11 migration in 4.10->4.11 upgrade path new ef2774e CLOUDSTACK-10001: Fix incorrect total host memory in responses new daf2194 CLOUDSTACK-10127: KVM + Ovs: Incorrect devId on static nat This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (9d9c309) \ N -- N -- N refs/heads/debian9-systemvmtemplate (daf2194) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 6 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../kvm/resource/LibvirtComputingResource.java | 20 +- .../LibvirtNetworkElementCommandWrapperTest.java | 243 + .../com/cloud/api/query/dao/HostJoinDaoImpl.java | 12 +- .../smoke/test_deploy_virtio_scsi_vm.py| 3 +- 4 files changed, 262 insertions(+), 16 deletions(-) create mode 100644 plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtNetworkElementCommandWrapperTest.java -- To stop receiving notification emails like this one, please contact ['"commits@cloudstack.apache.org"'].
[cloudstack] 04/06: CLOUDSTACK-10013: Add systemvm 4.11 migration in 4.10->4.11 upgrade path
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 2b5598bb6033782b819bf775be6bdfe033e9d660 Author: Rohit YadavAuthorDate: Tue Dec 19 11:06:59 2017 +0530 CLOUDSTACK-10013: Add systemvm 4.11 migration in 4.10->4.11 upgrade path This moves the systevmtemplate migration logic from previous upgrade path to 4.10.0.0->4.11.0.0 upgrade path. Signed-off-by: Rohit Yadav --- .../com/cloud/upgrade/dao/Upgrade41000to41100.java | 190 - .../com/cloud/upgrade/dao/Upgrade4930to41000.java | 186 +--- 2 files changed, 191 insertions(+), 185 deletions(-) diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade41000to41100.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade41000to41100.java index 0189ce8..4a9cd9e 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade41000to41100.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade41000to41100.java @@ -17,12 +17,21 @@ package com.cloud.upgrade.dao; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; -import org.apache.log4j.Logger; - import java.io.File; import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import org.apache.log4j.Logger; + +import com.cloud.hypervisor.Hypervisor; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.script.Script; public class Upgrade41000to41100 implements DbUpgrade { final static Logger LOG = Logger.getLogger(Upgrade41000to41100.class); @@ -53,8 +62,181 @@ public class Upgrade41000to41100 implements DbUpgrade { @Override public void performDataMigration(Connection conn) { +updateSystemVmTemplates(conn); +} + +@SuppressWarnings("serial") +private void updateSystemVmTemplates(final Connection conn) { +LOG.debug("Updating System Vm template IDs"); +// Get all hypervisors in use +final Set hypervisorsListInUse = new HashSet(); +try (PreparedStatement pstmt = conn.prepareStatement("select distinct(hypervisor_type) from `cloud`.`cluster` where removed is null"); ResultSet rs = pstmt.executeQuery()) { +while (rs.next()) { +switch (Hypervisor.HypervisorType.getType(rs.getString(1))) { +case XenServer: + hypervisorsListInUse.add(Hypervisor.HypervisorType.XenServer); +break; +case KVM: + hypervisorsListInUse.add(Hypervisor.HypervisorType.KVM); +break; +case VMware: + hypervisorsListInUse.add(Hypervisor.HypervisorType.VMware); +break; +case Hyperv: + hypervisorsListInUse.add(Hypervisor.HypervisorType.Hyperv); +break; +case LXC: + hypervisorsListInUse.add(Hypervisor.HypervisorType.LXC); +break; +case Ovm3: + hypervisorsListInUse.add(Hypervisor.HypervisorType.Ovm3); +break; +default: +break; +} +} +} catch (final SQLException e) { +LOG.error("updateSystemVmTemplates: Exception caught while getting hypervisor types from clusters: " + e.getMessage()); +throw new CloudRuntimeException("updateSystemVmTemplates:Exception while getting hypervisor types from clusters", e); +} + +final Map NewTemplateNameList = new HashMap () { +{ +put(Hypervisor.HypervisorType.KVM, "systemvm-kvm-4.11"); +put(Hypervisor.HypervisorType.VMware, "systemvm-vmware-4.11"); +put(Hypervisor.HypervisorType.XenServer, "systemvm-xenserver-4.11"); +put(Hypervisor.HypervisorType.Hyperv, "systemvm-hyperv-4.11"); +put(Hypervisor.HypervisorType.LXC, "systemvm-lxc-4.11"); +put(Hypervisor.HypervisorType.Ovm3, "systemvm-ovm3-4.11"); +} +}; + +final Map routerTemplateConfigurationNames = new HashMap () { +{ +put(Hypervisor.HypervisorType.KVM, "router.template.kvm"); +put(Hypervisor.HypervisorType.VMware, "router.template.vmware"); +put(Hypervisor.HypervisorType.XenServer, "router.template.xenserver"); +
[cloudstack] 02/06: CLOUDSTACK-10193: Use other64Linux for systemvms on VMware
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 04f4baa1dc89bbaf54d5168866c1ac70cedecce3 Author: Rohit YadavAuthorDate: Sun Dec 17 12:26:35 2017 +0530 CLOUDSTACK-10193: Use other64Linux for systemvms on VMware In default/fresh installations, the guest os type for systemvms with id=15 or Debian 5 (32-bit) can cause memory allocation issues to guest. Using Other Linux 64-bit as guest OS systemvms get all the allocated RAM. This avoids OOM related kernel panics for certain VRs such as rVRs, lbvm etc. Signed-off-by: Rohit Yadav --- setup/db/db/schema-41000to41100.sql | 4 1 file changed, 4 insertions(+) diff --git a/setup/db/db/schema-41000to41100.sql b/setup/db/db/schema-41000to41100.sql index 2a2fe2d..76bcb3f 100644 --- a/setup/db/db/schema-41000to41100.sql +++ b/setup/db/db/schema-41000to41100.sql @@ -495,3 +495,7 @@ UPDATE `cloud`.`monitoring_services` SET pidfile="/var/run/apache2/apache2.pid" -- Boost secondary storage systemvm UPDATE `cloud`.`service_offering` SET ram_size=1024, cpu=2 WHERE vm_type="secondarystoragevm" and cpu=1 and ram_size=512; + +-- Use 'Other Linux 64-bit' as guest os for the default systemvmtemplate for VMware +-- This fixes a memory allocation issue to systemvms on VMware/ESXi +UPDATE `cloud`.`vm_template` SET guest_os_id=99 WHERE id=8; -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" .
[cloudstack] 05/06: CLOUDSTACK-10001: Fix incorrect total host memory in responses
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit ef2774e7dcdf796c55079128b6cf96841ea58016 Author: Rohit YadavAuthorDate: Tue Dec 19 11:45:24 2017 +0530 CLOUDSTACK-10001: Fix incorrect total host memory in responses This fixes incorrect total host memory in listHosts and related host responses, regression introduced in #2120. Signed-off-by: Rohit Yadav --- server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java index 4d411f2..4cb8a76 100644 --- a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java @@ -159,8 +159,8 @@ public class HostJoinDaoImpl extends GenericDaoBase implements Long mem = host.getMemReservedCapacity() + host.getMemUsedCapacity(); Long cpu = host.getCpuReservedCapacity() + host.getCpuUsedCapacity(); -hostResponse.setMemoryTotal(mem); -Float totalMemorywithOverprovisioning=new Float((host.getTotalMemory()*ApiDBUtils.getMemOverprovisioningFactor(host.getClusterId(; +hostResponse.setMemoryTotal(host.getTotalMemory()); +Float totalMemorywithOverprovisioning = host.getTotalMemory() * ApiDBUtils.getMemOverprovisioningFactor(host.getClusterId()); hostResponse.setMemWithOverprovisioning(totalMemorywithOverprovisioning.toString()); hostResponse.setMemoryAllocated(mem); @@ -180,7 +180,7 @@ public class HostJoinDaoImpl extends GenericDaoBase implements hostResponse.setHypervisorVersion(host.getHypervisorVersion()); -Float cpuWithOverprovisioning = new Float(host.getCpus() * host.getSpeed() * ApiDBUtils.getCpuOverprovisioningFactor(host.getClusterId())); +Float cpuWithOverprovisioning = host.getCpus() * host.getSpeed() * ApiDBUtils.getCpuOverprovisioningFactor(host.getClusterId()); String cpuAlloc = decimalFormat.format(((float)cpu / cpuWithOverprovisioning * 100f)) + "%"; hostResponse.setCpuAllocated(cpuAlloc); hostResponse.setCpuWithOverprovisioning(cpuWithOverprovisioning.toString()); @@ -308,10 +308,10 @@ public class HostJoinDaoImpl extends GenericDaoBase implements Long mem = host.getMemReservedCapacity() + host.getMemUsedCapacity(); Long cpu = host.getCpuReservedCapacity() + host.getCpuReservedCapacity(); -hostResponse.setMemoryTotal(mem); -Float memWithOverprovisioning =new Float((host.getTotalMemory()*ApiDBUtils.getMemOverprovisioningFactor(host.getClusterId(; +hostResponse.setMemoryTotal(host.getTotalMemory()); +Float memWithOverprovisioning = host.getTotalMemory() * ApiDBUtils.getMemOverprovisioningFactor(host.getClusterId()); hostResponse.setMemWithOverprovisioning(memWithOverprovisioning.toString()); - hostResponse.setMemoryAllocated(decimalFormat.format((float)mem/ memWithOverprovisioning*100f).toString()+"%"); +hostResponse.setMemoryAllocated(decimalFormat.format((float) mem / memWithOverprovisioning * 100.0f) +"%"); String hostTags = host.getTag(); hostResponse.setHostTags(host.getTag()); -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" .
[GitHub] blueorangutan commented on issue #2211: CLOUDSTACK-10013: Migrate systemvmtemplate to Debian9
blueorangutan commented on issue #2211: CLOUDSTACK-10013: Migrate systemvmtemplate to Debian9 URL: https://github.com/apache/cloudstack/pull/2211#issuecomment-352477334 Trillian test result (tid-1810) Environment: kvm-centos6 (x2), Advanced Networking with Mgmt server 7 Total time taken: 26650 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2211-t1810-kvm-centos6.zip Smoke tests completed. 63 look OK, 3 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_01_verify_libvirt | `Failure` | 0.83 | test_deploy_virtio_scsi_vm.py test_02_verify_libvirt_after_restart | `Failure` | 137.03 | test_deploy_virtio_scsi_vm.py test_03_verify_libvirt_attach_disk | `Failure` | 11.09 | test_deploy_virtio_scsi_vm.py test_05_change_vm_ostype_restart | `Failure` | 16.41 | test_deploy_virtio_scsi_vm.py ContextSuite context=TestListIdsParams>:setup | `Error` | 0.00 | test_list_ids_parameter.py test_01_snapshot_usage | `Error` | 5.18 | test_usage.py `test_list_ids_parameter.py` and `test_usage.py` failed due to qemu-img limitation on CentOS6 that does not allow `-s` option for the snapshots to work. After downgrading to an older version which supports this, the tests and snapshot feature works on CentOS6+KVM, as described in http://www.nux.ro/oldblog/archive/2014/01/Taking_KVM_volume_snapshots_with_Cloudstack_4_2_on_CentOS_6_5.html. `test_deploy_virtio_scsi_vm.py` fails due to missing `discard` setting in a VM/domain's xml as created by older libvirt/qemu. By removing the constraint the tests pass now: ``` Test that libvirt properly created domain with scsi controller ... === TestName: test_01_verify_libvirt | Status : SUCCESS === ok Verify that libvirt settings are as expected after a VM stop / start ... === TestName: test_02_verify_libvirt_after_restart | Status : SUCCESS === ok Verify that libvirt settings are expected after a disk add ... === TestName: test_03_verify_libvirt_attach_disk | Status : SUCCESS === ok Verify that guest sees scsi controller and disks ... === TestName: test_04_verify_guest_lspci | Status : SUCCESS === ok Update os type to Ubuntu, change vm details rootdiskController ... === TestName: test_05_change_vm_ostype_restart | Status : SUCCESS === ok Verify that guest sees scsi controller and disks after switching ostype and rdc ... === TestName: test_06_verify_guest_lspci_again | Status : SUCCESS === ok Ran 6 tests in 786.238s OK ``` :white_check_mark: all good :tada: This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2363: 4.8.0.1 rc20160525 t1247
rhtyd commented on issue #2363: 4.8.0.1 rc20160525 t1247 URL: https://github.com/apache/cloudstack/pull/2363#issuecomment-352649092 I checked both the commits, they are in master and recent branches. For both the changes, subsequent fixes were fixed in #2009 and #1763. This PR does not describe the intention and why it's resubmitted @toshen ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #1940: CLOUDSTACK-9781:ACS records ID in events tables instead of UUID.
blueorangutan commented on issue #1940: CLOUDSTACK-9781:ACS records ID in events tables instead of UUID. URL: https://github.com/apache/cloudstack/pull/1940#issuecomment-352648049 Trillian test result (tid-1820) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 33023 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1940-t1820-kvm-centos7.zip Smoke tests completed. 62 look OK, 5 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- ContextSuite context=TestDeployVirtioSCSIVM>:setup | `Error` | 0.00 | test_deploy_virtio_scsi_vm.py test_01_vpc_privategw_acl | `Failure` | 86.92 | test_privategw_acl.py test_02_vpc_privategw_static_routes | `Failure` | 273.65 | test_privategw_acl.py test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 132.89 | test_privategw_acl.py test_04_rvpc_privategw_static_routes | `Failure` | 384.26 | test_privategw_acl.py test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Error` | 61.84 | test_routers_network_ops.py test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Failure` | 337.71 | test_routers_network_ops.py test_02_create_template_with_checksum_sha1 | `Error` | 5.22 | test_templates.py test_03_create_template_with_checksum_sha256 | `Error` | 5.23 | test_templates.py test_04_create_template_with_checksum_md5 | `Error` | 5.23 | test_templates.py test_01_vpc_remote_access_vpn | `Error` | 50.95 | test_vpc_vpn.py This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[cloudstack] 01/01: CLOUDSTACK-10013: Add systemvm 4.11 migration in 4.10->4.11 upgrade path
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 9d9c3094defa2945b82c8db71c7770e58b0ca251 Author: Rohit YadavAuthorDate: Tue Dec 19 11:06:59 2017 +0530 CLOUDSTACK-10013: Add systemvm 4.11 migration in 4.10->4.11 upgrade path This moves the systevmtemplate migration logic from previous upgrade path to 4.10.0.0->4.11.0.0 upgrade path. Signed-off-by: Rohit Yadav --- .../com/cloud/upgrade/dao/Upgrade41000to41100.java | 190 - .../com/cloud/upgrade/dao/Upgrade4930to41000.java | 186 +--- 2 files changed, 191 insertions(+), 185 deletions(-) diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade41000to41100.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade41000to41100.java index 0189ce8..4a9cd9e 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade41000to41100.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade41000to41100.java @@ -17,12 +17,21 @@ package com.cloud.upgrade.dao; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; -import org.apache.log4j.Logger; - import java.io.File; import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import org.apache.log4j.Logger; + +import com.cloud.hypervisor.Hypervisor; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.script.Script; public class Upgrade41000to41100 implements DbUpgrade { final static Logger LOG = Logger.getLogger(Upgrade41000to41100.class); @@ -53,8 +62,181 @@ public class Upgrade41000to41100 implements DbUpgrade { @Override public void performDataMigration(Connection conn) { +updateSystemVmTemplates(conn); +} + +@SuppressWarnings("serial") +private void updateSystemVmTemplates(final Connection conn) { +LOG.debug("Updating System Vm template IDs"); +// Get all hypervisors in use +final Set hypervisorsListInUse = new HashSet(); +try (PreparedStatement pstmt = conn.prepareStatement("select distinct(hypervisor_type) from `cloud`.`cluster` where removed is null"); ResultSet rs = pstmt.executeQuery()) { +while (rs.next()) { +switch (Hypervisor.HypervisorType.getType(rs.getString(1))) { +case XenServer: + hypervisorsListInUse.add(Hypervisor.HypervisorType.XenServer); +break; +case KVM: + hypervisorsListInUse.add(Hypervisor.HypervisorType.KVM); +break; +case VMware: + hypervisorsListInUse.add(Hypervisor.HypervisorType.VMware); +break; +case Hyperv: + hypervisorsListInUse.add(Hypervisor.HypervisorType.Hyperv); +break; +case LXC: + hypervisorsListInUse.add(Hypervisor.HypervisorType.LXC); +break; +case Ovm3: + hypervisorsListInUse.add(Hypervisor.HypervisorType.Ovm3); +break; +default: +break; +} +} +} catch (final SQLException e) { +LOG.error("updateSystemVmTemplates: Exception caught while getting hypervisor types from clusters: " + e.getMessage()); +throw new CloudRuntimeException("updateSystemVmTemplates:Exception while getting hypervisor types from clusters", e); +} + +final Map NewTemplateNameList = new HashMap () { +{ +put(Hypervisor.HypervisorType.KVM, "systemvm-kvm-4.11"); +put(Hypervisor.HypervisorType.VMware, "systemvm-vmware-4.11"); +put(Hypervisor.HypervisorType.XenServer, "systemvm-xenserver-4.11"); +put(Hypervisor.HypervisorType.Hyperv, "systemvm-hyperv-4.11"); +put(Hypervisor.HypervisorType.LXC, "systemvm-lxc-4.11"); +put(Hypervisor.HypervisorType.Ovm3, "systemvm-ovm3-4.11"); +} +}; + +final Map routerTemplateConfigurationNames = new HashMap () { +{ +put(Hypervisor.HypervisorType.KVM, "router.template.kvm"); +put(Hypervisor.HypervisorType.VMware, "router.template.vmware"); +put(Hypervisor.HypervisorType.XenServer, "router.template.xenserver"); +
[cloudstack] branch debian9-systemvmtemplate updated (cf42a69 -> 9d9c309)
This is an automated email from the ASF dual-hosted git repository. rohit pushed a change to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git. discard cf42a69 CLOUDSTACK-10013: Add systemvm 4.11 migration in 4.10->4.11 upgrade path new 9d9c309 CLOUDSTACK-10013: Add systemvm 4.11 migration in 4.10->4.11 upgrade path This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (cf42a69) \ N -- N -- N refs/heads/debian9-systemvmtemplate (9d9c309) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../src/com/cloud/upgrade/dao/Upgrade4930to41000.java | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) -- To stop receiving notification emails like this one, please contact ['"commits@cloudstack.apache.org"'].
[cloudstack] 14/20: CLOUDSTACK-10187: Don't delete vifs for VPCs with source nat
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 13316e874f6989ece49d572269c37d5e0d3fd50d Author: Rohit YadavAuthorDate: Wed Dec 13 01:28:18 2017 +0530 CLOUDSTACK-10187: Don't delete vifs for VPCs with source nat On XenServer, both redundant router's vifs were getting deleted when any PF rule is removed from any of the acquired public IPs. This fix ensures that lastIp is set to `false` when processed by hypervisor resources to avoid removing of VIFs when VPCs have any source nat IP. Signed-off-by: Rohit Yadav --- .../com/cloud/network/router/CommandSetupHelper.java | 19 ++- test/integration/smoke/test_vpc_redundant.py | 4 ++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/server/src/com/cloud/network/router/CommandSetupHelper.java b/server/src/com/cloud/network/router/CommandSetupHelper.java index cadaf4f..c8d85fe 100644 --- a/server/src/com/cloud/network/router/CommandSetupHelper.java +++ b/server/src/com/cloud/network/router/CommandSetupHelper.java @@ -475,7 +475,7 @@ public class CommandSetupHelper { public void createAssociateIPCommands(final VirtualRouter router, final List ips, final Commands cmds, final long vmId) { final String ipAssocCommand = "IPAssocCommand"; -createRedundantAssociateIPCommands(router, ips, cmds, ipAssocCommand, vmId); +createRedundantAssociateIPCommands(router, ips, cmds, ipAssocCommand, false); } public void createNetworkACLsCommands(final List rules, final VirtualRouter router, final Commands cmds, final long guestNetworkId, @@ -645,7 +645,7 @@ public class CommandSetupHelper { final String ipAssocCommand = "IPAssocVpcCommand"; if (router.getIsRedundantRouter()) { -createRedundantAssociateIPCommands(router, ips, cmds, ipAssocCommand, 0); +createRedundantAssociateIPCommands(router, ips, cmds, ipAssocCommand, true); return; } @@ -742,7 +742,7 @@ public class CommandSetupHelper { } } -public void createRedundantAssociateIPCommands(final VirtualRouter router, final List ips, final Commands cmds, final String ipAssocCommand, final long vmId) { +public void createRedundantAssociateIPCommands(final VirtualRouter router, final List ips, final Commands cmds, final String ipAssocCommand, final boolean isVPC) { // Ensure that in multiple vlans case we first send all ip addresses of // vlan1, then all ip addresses of vlan2, etc.. @@ -840,7 +840,16 @@ public class CommandSetupHelper { } // for network if the ips does not have any rules, then only last ip -List userIps = _ipAddressDao.listByAssociatedNetwork(associatedWithNetworkId, null); +final List userIps = _ipAddressDao.listByAssociatedNetwork(associatedWithNetworkId, null); +boolean hasSourceNat = false; +if (isVPC && userIps.size() > 0 && userIps.get(0) != null) { +// All ips should belong to a VPC +final Long vpcId = userIps.get(0).getVpcId(); +final List sourceNatIps = _ipAddressDao.listByAssociatedVpc(vpcId, true); +if (sourceNatIps != null && sourceNatIps.size() > 0) { +hasSourceNat = true; +} +} int ipsWithrules = 0; int ipsStaticNat = 0; @@ -864,7 +873,7 @@ public class CommandSetupHelper { cmd.setAccessDetail(NetworkElementCommand.ZONE_NETWORK_TYPE, dcVo.getNetworkType().toString()); // if there is 1 static nat then it will be checked for remove at the resource -if (ipsWithrules == 0 && ipsStaticNat == 0) { +if (ipsWithrules == 0 && ipsStaticNat == 0 && !hasSourceNat) { // there is only one ip address for the network. cmd.setAccessDetail(NetworkElementCommand.NETWORK_PUB_LAST_IP, "true"); } else { diff --git a/test/integration/smoke/test_vpc_redundant.py b/test/integration/smoke/test_vpc_redundant.py index b87ce43..e7b29b1 100644 --- a/test/integration/smoke/test_vpc_redundant.py +++ b/test/integration/smoke/test_vpc_redundant.py @@ -610,7 +610,7 @@ class TestVPCRedundancy(cloudstackTestCase): gc_wait = Configurations.list(self.apiclient, name="network.gc.wait") gc_interval = Configurations.list(self.apiclient, name="network.gc.interval") - + self.logger.debug("network.gc.wait is ==> %s" % gc_wait) self.logger.debug("network.gc.interval is ==> %s" % gc_interval) @@ -628,7 +628,7 @@ class TestVPCRedundancy(cloudstackTestCase): @attr(tags=["advanced", "intervlan"], required_hardware="true") def
[cloudstack] 16/20: CLOUDSTACK-9953: Resize root disk for VMware when full clone is enabled
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit c28df5f7824630f628b378605dde0512a57f4539 Author: Rohit YadavAuthorDate: Sat Dec 16 14:19:28 2017 +0530 CLOUDSTACK-9953: Resize root disk for VMware when full clone is enabled Resize for VMware root disk should only be performed during VM start when vmware.create.full.clone is true i.e. the disk chain length is one. Signed-off-by: Rohit Yadav --- .../hypervisor/vmware/resource/VmwareResource.java | 34 ++ 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java index 40ffdf4..7f8c2a5 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java @@ -2093,9 +2093,9 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa hyperHost.setRestartPriorityForVM(vmMo, DasVmPriority.HIGH.value()); } -//For resizing root disk. +// For resizing root disk. if (rootDiskTO != null && !hasSnapshot) { -resizeRootDisk(vmMo, rootDiskTO, hyperHost, context); +resizeRootDiskOnVMStart(vmMo, rootDiskTO, hyperHost, context); } // @@ -2165,28 +2165,24 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa return path + fileType; } -private void resizeRootDisk(VirtualMachineMO vmMo, DiskTO rootDiskTO, VmwareHypervisorHost hyperHost, VmwareContext context) throws Exception -{ -Pair vdisk = getVirtualDiskInfo(vmMo, appendFileType(rootDiskTO.getPath(), ".vmdk")); +private void resizeRootDiskOnVMStart(VirtualMachineMO vmMo, DiskTO rootDiskTO, VmwareHypervisorHost hyperHost, VmwareContext context) throws Exception { +final Pair vdisk = getVirtualDiskInfo(vmMo, appendFileType(rootDiskTO.getPath(), ".vmdk")); assert(vdisk != null); -Long reqSize=((VolumeObjectTO)rootDiskTO.getData()).getSize()/1024; -VirtualDisk disk = vdisk.first(); -if (reqSize > disk.getCapacityInKB()) -{ -VirtualMachineDiskInfo diskInfo = getMatchingExistingDisk(vmMo.getDiskInfoBuilder(), rootDiskTO, hyperHost, context); +final Long reqSize = ((VolumeObjectTO)rootDiskTO.getData()).getSize() / 1024; +final VirtualDisk disk = vdisk.first(); +if (reqSize > disk.getCapacityInKB()) { +final VirtualMachineDiskInfo diskInfo = getMatchingExistingDisk(vmMo.getDiskInfoBuilder(), rootDiskTO, hyperHost, context); assert (diskInfo != null); -String[] diskChain = diskInfo.getDiskChain(); +final String[] diskChain = diskInfo.getDiskChain(); -if (diskChain != null && diskChain.length>1) -{ -s_logger.error("Unsupported Disk chain length "+ diskChain.length); -throw new Exception("Unsupported Disk chain length "+ diskChain.length); +if (diskChain != null && diskChain.length > 1) { +s_logger.warn("Disk chain length for the VM is greater than one, skipping resizing of root disk."); +return; } -if (diskInfo.getDiskDeviceBusName() == null || !diskInfo.getDiskDeviceBusName().toLowerCase().startsWith("scsi")) -{ -s_logger.error("Unsupported root disk device bus "+ diskInfo.getDiskDeviceBusName() ); -throw new Exception("Unsupported root disk device bus "+ diskInfo.getDiskDeviceBusName()); +if (diskInfo.getDiskDeviceBusName() == null || !diskInfo.getDiskDeviceBusName().toLowerCase().startsWith("scsi")) { +s_logger.warn("Resizing of root disk is only support for scsi device/bus, the provide disk's device bus name is " + diskInfo.getDiskDeviceBusName()); +return; } disk.setCapacityInKB(reqSize); -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" .
[cloudstack] 09/20: CLOUDSTACK-10010: Port marvin test from #2190 by @swill
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit bdda9b4bfd4019f70892eda5ecbdd5ddf619178d Author: Will StevensAuthorDate: Sat Dec 2 21:11:40 2017 +0530 CLOUDSTACK-10010: Port marvin test from #2190 by @swill This ports the S2S config test by @swill from #2190 with additional changes to make robust and environment agnostic. Signed-off-by: Rohit Yadav --- test/integration/smoke/test_vpc_vpn.py | 468 - 1 file changed, 463 insertions(+), 5 deletions(-) diff --git a/test/integration/smoke/test_vpc_vpn.py b/test/integration/smoke/test_vpc_vpn.py index 83c244b..b3dfab2 100644 --- a/test/integration/smoke/test_vpc_vpn.py +++ b/test/integration/smoke/test_vpc_vpn.py @@ -1138,8 +1138,19 @@ class TestRVPCSite2SiteVpn(cloudstackTestCase): self.apiclient, customer2_response.id, vpn1_response['id']) self.debug("VPN connection created for VPC %s" % vpc1.id) -self.assertEqual( -vpnconn2_response['state'], "Connected", "Failed to connect between VPCs!") +def checkVpnConnected(): +connections = Vpn.listVpnConnection( +self.apiclient, +listall='true', +vpcid=vpc2.id) +if isinstance(connections, list): +return connections[0].state == 'Connected', None +return False, None + +# Wait up to 60 seconds for passive connection to show up as Connected +res, _ = wait_until(2, 30, checkVpnConnected) +if not res: +self.fail("Failed to connect between VPCs, see VPN state as Connected") # acquire an extra ip address to use to ssh into vm2 try: @@ -1174,9 +1185,8 @@ class TestRVPCSite2SiteVpn(cloudstackTestCase): if ssh_client: # run ping test -packet_loss = ssh_client.execute( -"/bin/ping -c 3 -t 10 " + vm1.nic[0].ipaddress + " |grep packet|cut -d ' ' -f 7| cut -f1 -d'%'")[0] -self.assert_(int(packet_loss) == 0, "Ping did not succeed") +packet_loss = ssh_client.execute("/bin/ping -c 3 -t 10 " + vm1.nic[0].ipaddress + " | grep packet | sed 's/.*received, //g' | sed 's/[% ]*packet.*//g'")[0] +self.assert_(int(packet_loss) < 50, "Ping did not succeed") else: self.fail("Failed to setup ssh connection to %s" % vm2.public_ip) @@ -1189,3 +1199,451 @@ class TestRVPCSite2SiteVpn(cloudstackTestCase): cleanup_resources(cls.apiclient, cls.cleanup) except Exception, e: raise Exception("Cleanup failed with %s" % e) + + +class TestVPCSite2SiteVPNMultipleOptions(cloudstackTestCase): + +@classmethod +def setUpClass(cls): +cls.logger = logging.getLogger('TestVPCSite2SiteVPNMultipleOptions') +cls.stream_handler = logging.StreamHandler() +cls.logger.setLevel(logging.DEBUG) +cls.logger.addHandler(cls.stream_handler) + +testClient = super(TestVPCSite2SiteVPNMultipleOptions, cls).getClsTestClient() +cls.apiclient = testClient.getApiClient() +cls.services = Services().services + +cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) +cls.domain = get_domain(cls.apiclient) + +cls.compute_offering = ServiceOffering.create( +cls.apiclient, +cls.services["compute_offering"] +) + +cls.account = Account.create( +cls.apiclient, services=cls.services["account"]) + +cls.hypervisor = testClient.getHypervisorInfo() + +cls.logger.debug("Downloading Template: %s from: %s" % (cls.services["template"][ + cls.hypervisor.lower()], cls.services["template"][cls.hypervisor.lower()]["url"])) +cls.template = Template.register(cls.apiclient, cls.services["template"][cls.hypervisor.lower( +)], cls.zone.id, hypervisor=cls.hypervisor.lower(), account=cls.account.name, domainid=cls.domain.id) +cls.template.download(cls.apiclient) + +if cls.template == FAILED: +assert False, "get_template() failed to return template" + +cls.logger.debug("Successfully created account: %s, id: \ + %s" % (cls.account.name, + cls.account.id)) + +cls.cleanup = [cls.account, cls.compute_offering] +return + +def _get_ssh_client(self, virtual_machine, services, retries): +""" Setup ssh client connection and return connection +vm requires attributes public_ip, public_port, username, password """ + +try: +ssh_client = SshClient( +virtual_machine.public_ip, +services["virtual_machine"]["ssh_port"], +
[cloudstack] 05/20: CLOUDSTACK-9348: Improve Nio SSH handshake buffers
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 2a0ed0c010ac96b9dadab63c8f0ce02370a5f4fd Author: Rohit YadavAuthorDate: Thu Nov 30 16:51:48 2017 +0530 CLOUDSTACK-9348: Improve Nio SSH handshake buffers Use a holder class to pass buffers, fixes potential leak. Signed-off-by: Rohit Yadav --- .../agent/manager/ClusteredAgentManagerImpl.java | 2 +- utils/src/main/java/com/cloud/utils/nio/Link.java | 72 +- .../main/java/com/cloud/utils/nio/NioClient.java | 2 +- .../java/com/cloud/utils/nio/NioConnection.java| 2 +- 4 files changed, 58 insertions(+), 20 deletions(-) diff --git a/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java b/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java index 2ebfeb5..0b9899e 100644 --- a/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java +++ b/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java @@ -519,7 +519,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust sslEngine.setUseClientMode(true); sslEngine.setEnabledProtocols(SSLUtils.getSupportedProtocols(sslEngine.getEnabledProtocols())); sslEngine.beginHandshake(); -if (!Link.doHandshake(ch1, sslEngine, true)) { +if (!Link.doHandshake(ch1, sslEngine)) { ch1.close(); throw new IOException(String.format("SSL: Handshake failed with peer management server '%s' on %s:%d ", peerName, ip, port)); } diff --git a/utils/src/main/java/com/cloud/utils/nio/Link.java b/utils/src/main/java/com/cloud/utils/nio/Link.java index 8f1b811..35211c8 100644 --- a/utils/src/main/java/com/cloud/utils/nio/Link.java +++ b/utils/src/main/java/com/cloud/utils/nio/Link.java @@ -32,6 +32,8 @@ import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.SecureRandom; import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; @@ -462,7 +464,7 @@ public class Link { return buffer; } -public static ByteBuffer handleBufferUnderflow(final SSLEngine engine, ByteBuffer buffer) { +public static ByteBuffer handleBufferUnderflow(final SSLEngine engine, final ByteBuffer buffer) { if (engine == null || buffer == null) { return buffer; } @@ -475,14 +477,14 @@ public class Link { return replaceBuffer; } -private static boolean doHandshakeUnwrap(final SocketChannel socketChannel, final SSLEngine sslEngine, +private static HandshakeHolder doHandshakeUnwrap(final SocketChannel socketChannel, final SSLEngine sslEngine, ByteBuffer peerAppData, ByteBuffer peerNetData, final int appBufferSize) throws IOException { if (socketChannel == null || sslEngine == null || peerAppData == null || peerNetData == null || appBufferSize < 0) { -return false; +return new HandshakeHolder(peerAppData, peerNetData, false); } if (socketChannel.read(peerNetData) < 0) { if (sslEngine.isInboundDone() && sslEngine.isOutboundDone()) { -return false; +return new HandshakeHolder(peerAppData, peerNetData, false); } try { sslEngine.closeInbound(); @@ -492,7 +494,7 @@ public class Link { sslEngine.closeOutbound(); // After closeOutbound the engine will be set to WRAP state, // in order to try to send a close message to the client. -return true; +return new HandshakeHolder(peerAppData, peerNetData, true); } peerNetData.flip(); SSLEngineResult result = null; @@ -503,7 +505,10 @@ public class Link { s_logger.error(String.format("SSL error caught during unwrap data: %s, for local address=%s, remote address=%s. The client may have invalid ca-certificates.", sslException.getMessage(), socketChannel.getLocalAddress(), socketChannel.getRemoteAddress())); sslEngine.closeOutbound(); -return false; +return new HandshakeHolder(peerAppData, peerNetData, true); +} +if (result == null) { +return new HandshakeHolder(peerAppData, peerNetData, false); } switch (result.getStatus()) { case OK: @@ -519,23 +524,23 @@ public class Link {
[cloudstack] 12/20: CLOUDSTACK-10181: Skip rVR test cases for VMware until supported
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 7a37dcce9c2078841397fb651309f99895027c1f Author: Rohit YadavAuthorDate: Sat Dec 9 00:43:25 2017 +0530 CLOUDSTACK-10181: Skip rVR test cases for VMware until supported With this change, rVR related test cases will be skipped for VMware where this feature is not properly supported. Signed-off-by: Rohit Yadav --- test/integration/smoke/test_internal_lb.py | 11 +++ test/integration/smoke/test_privategw_acl.py | 11 +++ test/integration/smoke/test_routers_network_ops.py | 13 - test/integration/smoke/test_vpc_redundant.py | 11 +++ test/integration/smoke/test_vpc_vpn.py | 10 ++ 5 files changed, 55 insertions(+), 1 deletion(-) diff --git a/test/integration/smoke/test_internal_lb.py b/test/integration/smoke/test_internal_lb.py index 5b4c663..379bbb0 100644 --- a/test/integration/smoke/test_internal_lb.py +++ b/test/integration/smoke/test_internal_lb.py @@ -50,6 +50,8 @@ from marvin.lib.common import (get_zone, get_template, list_network_offerings) +from marvin.lib.decoratorGenerators import skipTestIf + from nose.plugins.attrib import attr import logging @@ -280,6 +282,7 @@ class TestInternalLb(cloudstackTestCase): cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) cls.domain = get_domain(cls.apiclient) + cls.logger.debug("Creating compute offering: %s" %cls.services["compute_offering"]["name"]) cls.compute_offering = ServiceOffering.create( cls.apiclient, @@ -302,6 +305,12 @@ class TestInternalLb(cloudstackTestCase): %s" % (cls.account.name, cls.account.id)) +# Skip rVR related test cases for VMware, for details see +# https://issues.apache.org/jira/browse/CLOUDSTACK-10181 +cls.rvrNotSupported = False +if cls.hypervisor.lower() in ['vmware']: +cls.rvrNotSupported = True + cls._cleanup = [cls.account, cls.compute_offering] return @@ -598,6 +607,7 @@ class TestInternalLb(cloudstackTestCase): self.cleanup.insert(0, vpc_offering) self.execute_internallb_roundrobin_tests(vpc_offering) +@skipTestIf("rvrNotSupported") @attr(tags=["smoke", "advanced"], required_hardware="true") def test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80(self): """ @@ -766,6 +776,7 @@ class TestInternalLb(cloudstackTestCase): self.execute_internallb_haproxy_tests(vpc_offering) +@skipTestIf("rvrNotSupported") @attr(tags=["smoke", "advanced"], required_hardware="true") def test_04_rvpc_internallb_haproxy_stats_on_all_interfaces(self): """ Test to verify access to loadbalancer haproxy admin stats page diff --git a/test/integration/smoke/test_privategw_acl.py b/test/integration/smoke/test_privategw_acl.py index b86b96e..d48eb42 100644 --- a/test/integration/smoke/test_privategw_acl.py +++ b/test/integration/smoke/test_privategw_acl.py @@ -25,6 +25,7 @@ from marvin.lib.base import * from marvin.lib.common import * from nose.plugins.attrib import attr from marvin.codes import PASS +from marvin.lib.decoratorGenerators import skipTestIf import time import logging @@ -182,6 +183,14 @@ class TestPrivateGwACL(cloudstackTestCase): cls.services["service_offering"]) cls._cleanup = [cls.service_offering] +cls.hypervisor = cls.testClient.getHypervisorInfo() + +# Skip rVR related test cases for VMware, for details see +# https://issues.apache.org/jira/browse/CLOUDSTACK-10181 +cls.rvrNotSupported = False +if cls.hypervisor.lower() in ['vmware']: +cls.rvrNotSupported = True + cls.logger = logging.getLogger('TestPrivateGwACL') cls.stream_handler = logging.StreamHandler() cls.logger.setLevel(logging.DEBUG) @@ -289,6 +298,7 @@ class TestPrivateGwACL(cloudstackTestCase): self.performVPCTests(vpc_off, restart_with_cleanup = True) +@skipTestIf("rvrNotSupported") @attr(tags=["advanced"], required_hardware="true") def test_04_rvpc_privategw_static_routes(self): self.logger.debug("Creating a Redundant VPC offering..") @@ -301,6 +311,7 @@ class TestPrivateGwACL(cloudstackTestCase): self.performVPCTests(vpc_off) +@skipTestIf("rvrNotSupported") @attr(tags=["advanced"], required_hardware="true") def _test_05_rvpc_privategw_check_interface(self): self.logger.debug("Creating a Redundant VPC offering..") diff --git a/test/integration/smoke/test_routers_network_ops.py
[cloudstack] 18/20: CLOUDSTACK-10193: Use other64Linux for systemvms on VMware
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 1d3916441be3dab15b5de510f64d3cfa1dec349b Author: Rohit YadavAuthorDate: Sun Dec 17 12:26:35 2017 +0530 CLOUDSTACK-10193: Use other64Linux for systemvms on VMware In default/fresh installations, the guest os type for systemvms with id=15 or Debian 5 (32-bit) can cause memory allocation issues to guest. Using Other Linux 64-bit as guest OS systemvms get all the allocated RAM. This avoids OOM related kernel panics for certain VRs such as rVRs, lbvm etc. Signed-off-by: Rohit Yadav --- setup/db/db/schema-41000to41100.sql | 4 1 file changed, 4 insertions(+) diff --git a/setup/db/db/schema-41000to41100.sql b/setup/db/db/schema-41000to41100.sql index 2a2fe2d..76bcb3f 100644 --- a/setup/db/db/schema-41000to41100.sql +++ b/setup/db/db/schema-41000to41100.sql @@ -495,3 +495,7 @@ UPDATE `cloud`.`monitoring_services` SET pidfile="/var/run/apache2/apache2.pid" -- Boost secondary storage systemvm UPDATE `cloud`.`service_offering` SET ram_size=1024, cpu=2 WHERE vm_type="secondarystoragevm" and cpu=1 and ram_size=512; + +-- Use 'Other Linux 64-bit' as guest os for the default systemvmtemplate for VMware +-- This fixes a memory allocation issue to systemvms on VMware/ESXi +UPDATE `cloud`.`vm_template` SET guest_os_id=99 WHERE id=8; -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" .
[cloudstack] 10/20: CLOUDSTACK-10013: Make the generated VR/json files unique (ports #1470)
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 32e525f83f5dd65a81c0f24aa15035940f2e7969 Author: Remi BergsmaAuthorDate: Sat Dec 2 23:19:14 2017 +0530 CLOUDSTACK-10013: Make the generated VR/json files unique (ports #1470) This ports PR #1470 by @remibergsma. Make the generated json files unique to prevent concurrency issues: The json files now have UUIDs to prevent them from getting overwritten before they've been executed. Prevents config to be pushed to the wrong router. 2016-02-25 18:32:23,797 DEBUG [c.c.a.t.Request] (AgentManager-Handler-1:null) (logid:) Seq 2-4684025087442026584: Processing: { Ans: , MgmtId: 90520732674657, via: 2, Ver: v1, Flags: 10, [{"com.cloud.agent.api.routing.GroupA nswer":{"results":["null - success: null","null - success: [INFO] update_config.py :: Processing incoming file => vm_dhcp_entry.json.4ea45061-2efb-4467-8eaa-db3d77fb0a7b\n[INFO] Processing JSON file vm_dhcp_entry.json.4ea4506 1-2efb-4467-8eaa-db3d77fb0a7b\n"],"result":true,"wait":0}}] } On the router: 2016-02-25 18:32:23,416 merge.py __moveFile:298 Processed file written to /var/cache/cloud/processed/vm_dhcp_entry.json.4ea45061-2efb-4467-8eaa-db3d77fb0a7b.gz Signed-off-by: Rohit Yadav --- .../facade/AbstractConfigItemFacade.java | 21 +- .../kvm/resource/LibvirtComputingResource.java | 5 + systemvm/patches/debian/etc/rc.local | 9 - systemvm/patches/debian/opt/cloud/bin/configure.py | 220 + systemvm/patches/debian/opt/cloud/bin/merge.py | 37 ++-- .../patches/debian/opt/cloud/bin/update_config.py | 22 ++- 6 files changed, 159 insertions(+), 155 deletions(-) diff --git a/core/src/com/cloud/agent/resource/virtualnetwork/facade/AbstractConfigItemFacade.java b/core/src/com/cloud/agent/resource/virtualnetwork/facade/AbstractConfigItemFacade.java index f017384..a083012 100644 --- a/core/src/com/cloud/agent/resource/virtualnetwork/facade/AbstractConfigItemFacade.java +++ b/core/src/com/cloud/agent/resource/virtualnetwork/facade/AbstractConfigItemFacade.java @@ -22,6 +22,8 @@ package com.cloud.agent.resource.virtualnetwork.facade; import java.util.Hashtable; import java.util.LinkedList; import java.util.List; +import java.util.UUID; +import org.apache.log4j.Logger; import com.cloud.agent.api.BumpUpPriorityCommand; import com.cloud.agent.api.SetupGuestNetworkCommand; @@ -58,6 +60,8 @@ import com.google.gson.GsonBuilder; public abstract class AbstractConfigItemFacade { +private static final Logger s_logger = Logger.getLogger(AbstractConfigItemFacade.class); + private final static Gson gson; private static Hashtable flyweight = new Hashtable (); @@ -104,13 +108,26 @@ public abstract class AbstractConfigItemFacade { return instance; } +private static String appendUuidToJsonFiles(final String filename) { +String remoteFileName = new String(filename); +if (remoteFileName.endsWith("json")) { +remoteFileName += "." + UUID.randomUUID().toString(); +} +return remoteFileName; +} + protected List generateConfigItems(final ConfigBase configuration) { final List cfg = new LinkedList<>(); -final ConfigItem configFile = new FileConfigItem(VRScripts.CONFIG_PERSIST_LOCATION, destinationFile, gson.toJson(configuration)); +final String remoteFilename = appendUuidToJsonFiles(destinationFile); +if (s_logger.isDebugEnabled()) { +s_logger.debug("Transformed filename: " + destinationFile + " to: " + remoteFilename); +} + +final ConfigItem configFile = new FileConfigItem(VRScripts.CONFIG_PERSIST_LOCATION, remoteFilename, gson.toJson(configuration)); cfg.add(configFile); -final ConfigItem updateCommand = new ScriptConfigItem(VRScripts.UPDATE_CONFIG, destinationFile); +final ConfigItem updateCommand = new ScriptConfigItem(VRScripts.UPDATE_CONFIG, remoteFilename); cfg.add(updateCommand); return cfg; diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index 51b9737..ebd36bd 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -330,6 +330,9 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv if (details == null) { details = parser.getLines(); } + +