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 51490db705410d391363377a14c0baa261259c10 Author: Rohit Yadav <rohit.ya...@shapeblue.com> AuthorDate: Sun Dec 10 21:26:24 2017 +0530 update per new macchinina template Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com> --- server/src/com/cloud/resource/ResourceManagerImpl.java | 2 +- .../storage/secondary/SecondaryStorageVmManager.java | 6 +++--- .../secondarystorage/SecondaryStorageManagerImpl.java | 2 +- systemvm/debian/opt/cloud/bin/setup/common.sh | 11 ++++++++++- .../debian/opt/cloud/templates/keepalived.conf.templ | 8 ++++++++ test/integration/smoke/test_templates.py | 18 +++++++++--------- tools/appliance/build.sh | 2 +- .../definitions/systemvmtemplate/configure_grub.sh | 2 +- 8 files changed, 34 insertions(+), 17 deletions(-) diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java b/server/src/com/cloud/resource/ResourceManagerImpl.java index 33c36de..c9916e9 100755 --- a/server/src/com/cloud/resource/ResourceManagerImpl.java +++ b/server/src/com/cloud/resource/ResourceManagerImpl.java @@ -2274,7 +2274,7 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager, } try { - SSHCmdHelper.SSHCmdResult result = SSHCmdHelper.sshExecuteCmdOneShot(connection, "service cloudstack-agent restart || systemctl restart cloudstack-agent"); + SSHCmdHelper.SSHCmdResult result = SSHCmdHelper.sshExecuteCmdOneShot(connection, "service cloudstack-agent restart"); s_logger.debug("cloudstack-agent restart result: " + result.toString()); } catch (final SshException e) { return false; diff --git a/server/src/com/cloud/storage/secondary/SecondaryStorageVmManager.java b/server/src/com/cloud/storage/secondary/SecondaryStorageVmManager.java index 3b32c85..99073f7 100644 --- a/server/src/com/cloud/storage/secondary/SecondaryStorageVmManager.java +++ b/server/src/com/cloud/storage/secondary/SecondaryStorageVmManager.java @@ -27,11 +27,11 @@ import com.cloud.vm.SecondaryStorageVmVO; public interface SecondaryStorageVmManager extends Manager { - public static final int DEFAULT_SS_VM_RAMSIZE = 512; // 512M - public static final int DEFAULT_SS_VM_CPUMHZ = 500; // 500 MHz + public static final int DEFAULT_SS_VM_RAMSIZE = 1024; // 1024M + public static final int DEFAULT_SS_VM_CPUMHZ = 500; // 500 MHz public static final int DEFAULT_SS_VM_MTUSIZE = 1500; public static final int DEFAULT_SS_VM_CAPACITY = 50; // max command execution session per SSVM - public static final int DEFAULT_STANDBY_CAPACITY = 10; // standy capacity to reserve per zone + public static final int DEFAULT_STANDBY_CAPACITY = 10; // standy capacity to reserve per zone public static final String ALERT_SUBJECT = "secondarystoragevm-alert"; diff --git a/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java b/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java index 273fdd0..bed0313 100644 --- a/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java +++ b/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java @@ -951,7 +951,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar int ramSize = NumbersUtil.parseInt(_configDao.getValue("ssvm.ram.size"), DEFAULT_SS_VM_RAMSIZE); int cpuFreq = NumbersUtil.parseInt(_configDao.getValue("ssvm.cpu.mhz"), DEFAULT_SS_VM_CPUMHZ); List<ServiceOfferingVO> offerings = _offeringDao.createSystemServiceOfferings("System Offering For Secondary Storage VM", - ServiceOffering.ssvmDefaultOffUniqueName, 1, ramSize, cpuFreq, null, null, false, null, + ServiceOffering.ssvmDefaultOffUniqueName, 2, ramSize, cpuFreq, null, null, false, null, Storage.ProvisioningType.THIN, true, null, true, VirtualMachine.Type.SecondaryStorageVm, true); // this can sometimes happen, if DB is manually or programmatically manipulated if (offerings == null || offerings.size() < 2) { diff --git a/systemvm/debian/opt/cloud/bin/setup/common.sh b/systemvm/debian/opt/cloud/bin/setup/common.sh index e6a4417..76ec826 100755 --- a/systemvm/debian/opt/cloud/bin/setup/common.sh +++ b/systemvm/debian/opt/cloud/bin/setup/common.sh @@ -620,12 +620,18 @@ setup_redundant_router() { ip route delete default # Seed keepalived + if [ "$RROUTER_STATE" == "MASTER" ] + then + sed -i "s/priority.*/priority 100/g" /opt/cloud/templates/keepalived.conf.templ + else + sed -i "s/priority.*/priority 50/g" /opt/cloud/templates/keepalived.conf.templ + fi cp /opt/cloud/templates/keepalived.conf.templ /etc/keepalived/keepalived.conf # changes! sed -i "s/\[ROUTER_ID\]/$NAME/g" /etc/keepalived/keepalived.conf sed -i "s/\[ROUTER_IP\]/$GUEST_GW\/$GUEST_CIDR_SIZE/g" /etc/keepalived/keepalived.conf #fixme, multiple ips? sed -i "s/\[BOARDCAST\]/$GUEST_BRD/g" /etc/keepalived/keepalived.conf sed -i "s/\[PRIORITY\]/$ROUTER_PR/g" /etc/keepalived/keepalived.conf - sed -i "s/\[PASS\]/$VM_PASSWORD/g" /etc/keepalived/keepalived.conf #FIXME, router password? + sed -i "s/\[PASS\]/$VM_PASSWORD/g" /etc/keepalived/keepalived.conf sed -i "s/\[RROUTER_BIN_PATH\]/$rrouter_bin_path_str/g" /etc/keepalived/keepalived.conf sed -i "s/\[DELTA\]/2/g" /etc/keepalived/keepalived.conf sed -i "s/--exec\ \$DAEMON;/--exec\ \$DAEMON\ --\ --vrrp;/g" /etc/init.d/keepalived @@ -782,6 +788,9 @@ parse_cmd_line() { redundant_router) export RROUTER=$VALUE ;; + redundant_state) + export RROUTER_STATE=$VALUE + ;; guestgw) export GUEST_GW=$VALUE ;; diff --git a/systemvm/debian/opt/cloud/templates/keepalived.conf.templ b/systemvm/debian/opt/cloud/templates/keepalived.conf.templ index 5434ec5..bf896f9 100644 --- a/systemvm/debian/opt/cloud/templates/keepalived.conf.templ +++ b/systemvm/debian/opt/cloud/templates/keepalived.conf.templ @@ -28,9 +28,17 @@ vrrp_instance inside_network { state BACKUP interface eth2 virtual_router_id 51 + priority 50 nopreempt advert_int 1 + garp_master_delay 1 + garp_master_repeat 10 + garp_master_refresh 5 + + #use_vmac + #vmac_xmit_base + authentication { auth_type AH auth_pass PASS diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py index 8d76de3..955fe6e 100644 --- a/test/integration/smoke/test_templates.py +++ b/test/integration/smoke/test_templates.py @@ -106,7 +106,7 @@ class TestCreateTemplateWithChecksum(cloudstackTestCase): if "kvm" in self.hypervisor.lower(): self.test_template = registerTemplate.registerTemplateCmd() self.test_template = registerTemplate.registerTemplateCmd() - self.test_template.checksum = "{SHA-1}" + "bf580a13f791d86acf3449a7b457a91a14389264" + self.test_template.checksum = "{SHA-1}" + "6952e58f39b470bd166ace11ffd20bf479bed936" self.test_template.hypervisor = self.hypervisor self.test_template.zoneid = self.zone.id self.test_template.name = 'test sha-2333' @@ -114,13 +114,13 @@ class TestCreateTemplateWithChecksum(cloudstackTestCase): self.test_template.url = "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-kvm.qcow2.bz2" self.test_template.format = "QCOW2" self.test_template.ostypeid = self.getOsType("Other Linux (64-bit)") - self.md5 = "ada77653dcf1e59495a9e1ac670ad95f" - self.sha256 = "0efc03633f2b8f5db08acbcc5dc1be9028572dfd8f1c6c8ea663f0ef94b458c5" + self.md5 = "88c60fd500ce7ced985cf845df0db9da" + self.sha256 = "bc4cc040bbab843000fab78db6cb4a33f3a06ae1ced2cf563d36b38c7fee3049" if "vmware" in self.hypervisor.lower(): self.test_template = registerTemplate.registerTemplateCmd() self.test_template = registerTemplate.registerTemplateCmd() - self.test_template.checksum = "{SHA-1}" + "b25d404de8335b4348ff01e49a95b403c90df466" + self.test_template.checksum = "{SHA-1}" + "178639bd5ec089a27f6d39025be28c3de5d9393b" self.test_template.hypervisor = self.hypervisor self.test_template.zoneid = self.zone.id self.test_template.name = 'test sha-2333' @@ -128,13 +128,13 @@ class TestCreateTemplateWithChecksum(cloudstackTestCase): self.test_template.url = "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.ova" self.test_template.format = "OVA" self.test_template.ostypeid = self.getOsType("Other Linux (64-bit)") - self.md5 = "d6d97389b129c7d898710195510bf4fb" - self.sha256 = "f57b59f118ab59284a70d6c63229d1de8f2d69bffc5a82b773d6c47e769c12d9" + self.md5 = "3c23ac66bac7888dc7c972783646c644" + self.sha256 = "97aaa096d419522158c54f83eb61d9242d9f6bca9166fd4030d73683d647c7e7" if "xen" in self.hypervisor.lower(): self.test_template = registerTemplate.registerTemplateCmd() self.test_template = registerTemplate.registerTemplateCmd() - self.test_template.checksum = "{SHA-1}" + "427fad501d0d8a1d63b8600a9a469fbf91191314" + self.test_template.checksum = "{SHA-1}" + "80af2c18f96e94273188808c3d56e561a1cda717" self.test_template.hypervisor = self.hypervisor self.test_template.zoneid = self.zone.id self.test_template.name = 'test sha-2333' @@ -142,8 +142,8 @@ class TestCreateTemplateWithChecksum(cloudstackTestCase): self.test_template.url = "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-xen.vhd.bz2" self.test_template.format = "VHD" self.test_template.ostypeid = self.getOsType("Other Linux (64-bit)") - self.md5 = "54ebc933e6e07ae58c0dc97dfd37c824" - self.sha256 = "bddd9876021d33df9792b71ae4b776598680ac68ecf55e9d9af33c80904cc1f3" + self.md5 = "1662bbf224e41bb62b1dee043d785731" + self.sha256 = "80fba5a7a83842ec4e5f67cc6755d61d4fca46ae170d59b0c6ed47ebf7162722" if self.unsupportedHypervisor: self.skipTest("Skipping test because unsupported hypervisor\ diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh index 6f2ab6b..ab3cac8 100755 --- a/tools/appliance/build.sh +++ b/tools/appliance/build.sh @@ -611,8 +611,8 @@ function main() { ovm_export "${hdd_path}" kvm_export "${hdd_path}" vmware_export "${machine_uuid}" "${hdd_uuid}" - vagrant_export "${machine_uuid}" hyperv_export "${hdd_uuid}" + #vagrant_export "${machine_uuid}" md5sum dist/* > dist/md5sum.txt add_on_exit log INFO "BUILD SUCCESSFUL" } diff --git a/tools/appliance/definitions/systemvmtemplate/configure_grub.sh b/tools/appliance/definitions/systemvmtemplate/configure_grub.sh index eb2692e..85f9da2 100644 --- a/tools/appliance/definitions/systemvmtemplate/configure_grub.sh +++ b/tools/appliance/definitions/systemvmtemplate/configure_grub.sh @@ -28,7 +28,7 @@ GRUB_DEFAULT=0 GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR=Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet" -GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 console=hvc0 earlyprintk=xen net.ifnames=0 biosdevname=0 debian-installer=en_US" +GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 console=hvc0 earlyprintk=xen net.ifnames=0 biosdevname=0 debian-installer=en_US nomodeset" GRUB_CMDLINE_XEN="com1=115200 console=com1" GRUB_TERMINAL="console serial" GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1" -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" <commits@cloudstack.apache.org>.