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 a8a929ca73ab6f30f79099e5e2b7cfccf46f1f29
Author: Rohit Yadav <rohit.ya...@shapeblue.com>
AuthorDate: Mon Dec 11 17:39:44 2017 +0530

    more fixes
    
    Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com>
---
 systemvm/debian/opt/cloud/bin/update_config.py         |  2 +-
 test/integration/smoke/test_templates.py               |  4 ++--
 .../definitions/systemvmtemplate/apt_upgrade.sh        |  1 -
 .../appliance/definitions/systemvmtemplate/cleanup.sh  |  3 +--
 .../definitions/systemvmtemplate/configure_grub.sh     |  2 +-
 .../definitions/systemvmtemplate/definition.rb         |  2 +-
 .../appliance/definitions/systemvmtemplate/finalize.sh |  2 +-
 .../appliance/definitions/systemvmtemplate/preseed.cfg | 18 ++++++++++++++----
 tools/marvin/marvin/lib/common.py                      | 15 +++++----------
 9 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/systemvm/debian/opt/cloud/bin/update_config.py 
b/systemvm/debian/opt/cloud/bin/update_config.py
index a603f47..db47c53 100755
--- a/systemvm/debian/opt/cloud/bin/update_config.py
+++ b/systemvm/debian/opt/cloud/bin/update_config.py
@@ -41,7 +41,7 @@ currentGuestNetConfig = "/etc/cloudstack/guestnetwork.json"
 
 # If the command line json file is unprocessed process it
 # This is important or, the control interfaces will get deleted!
-if os.path.isfile(jsonPath % "cmd_line.json"):
+if jsonFilename != "cmd_line.json" and os.path.isfile(jsonPath % 
"cmd_line.json"):
     qf = QueueFile()
     qf.setFile("cmd_line.json")
     qf.load(None)
diff --git a/test/integration/smoke/test_templates.py 
b/test/integration/smoke/test_templates.py
index 955fe6e..6544ad2 100644
--- a/test/integration/smoke/test_templates.py
+++ b/test/integration/smoke/test_templates.py
@@ -158,7 +158,6 @@ class TestCreateTemplateWithChecksum(cloudstackTestCase):
                 cmd.id = temp.id
                 cmd.zoneid = self.zone.id
                 self.apiclient.deleteTemplate(cmd)
-
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -227,7 +226,8 @@ class TestCreateTemplateWithChecksum(cloudstackTestCase):
 
     def registerTemplate(self, cmd):
         temp = self.apiclient.registerTemplate(cmd)[0]
-        self.cleanup.append(temp)
+        if not temp:
+            self.cleanup.append(temp)
         return temp
 
     def getOsType(self, param):
diff --git a/tools/appliance/definitions/systemvmtemplate/apt_upgrade.sh 
b/tools/appliance/definitions/systemvmtemplate/apt_upgrade.sh
index 2d7394d..4a408c3 100644
--- a/tools/appliance/definitions/systemvmtemplate/apt_upgrade.sh
+++ b/tools/appliance/definitions/systemvmtemplate/apt_upgrade.sh
@@ -22,7 +22,6 @@ set -x
 function fix_tune2fs() {
   for partition in $(blkid -o list | grep ext | awk '{print $1}')
   do
-    tune2fs -m0 $partition
     tune2fs -c 1 $partition
   done
   fdisk -l
diff --git a/tools/appliance/definitions/systemvmtemplate/cleanup.sh 
b/tools/appliance/definitions/systemvmtemplate/cleanup.sh
index 00f068d..fd7d9f3 100644
--- a/tools/appliance/definitions/systemvmtemplate/cleanup.sh
+++ b/tools/appliance/definitions/systemvmtemplate/cleanup.sh
@@ -22,7 +22,7 @@ set -x
 function cleanup_apt() {
   apt-get -y remove --purge dictionaries-common busybox isc-dhcp-client 
isc-dhcp-common \
     task-english task-ssh-server tasksel tasksel-data laptop-detect nano 
wamerican \
-    debconf-i18n sharutils gnupg gnupg-agent keyboard-configuration
+    debconf-i18n sharutils gnupg gnupg-agent
 
   apt-get -y autoremove --purge
   apt-get autoclean
@@ -59,7 +59,6 @@ function cleanup_misc() {
   # Docs and data files
   rm -fr /var/lib/apt/*
   rm -fr /var/cache/apt/*
-  rm -fr /usr/lib/gnupg*
   rm -fr /usr/share/doc
   rm -fr /usr/share/man
   rm -fr /usr/share/info
diff --git a/tools/appliance/definitions/systemvmtemplate/configure_grub.sh 
b/tools/appliance/definitions/systemvmtemplate/configure_grub.sh
index 4a42dc6..c0a2596 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_grub.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_grub.sh
@@ -27,7 +27,7 @@ function configure_grub() {
 GRUB_DEFAULT=0
 GRUB_TIMEOUT=0
 GRUB_DISTRIBUTOR=Debian
-GRUB_CMDLINE_LINUX_DEFAULT="quiet"
+GRUB_CMDLINE_LINUX_DEFAULT=""
 GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 console=hvc0 
earlyprintk=xen net.ifnames=0 biosdevname=0 debian-installer=en_US 
fsck.mode=force nomodeset"
 GRUB_CMDLINE_XEN="com1=115200 console=com1"
 GRUB_TERMINAL="console serial"
diff --git a/tools/appliance/definitions/systemvmtemplate/definition.rb 
b/tools/appliance/definitions/systemvmtemplate/definition.rb
index 917dd77..b5e4da2 100644
--- a/tools/appliance/definitions/systemvmtemplate/definition.rb
+++ b/tools/appliance/definitions/systemvmtemplate/definition.rb
@@ -36,7 +36,7 @@ architectures = {
 config = {
     :cpu_count => '1',
     :memory_size => '512',
-    :disk_size => '2000', :disk_format => 'VDI', :hostiocache => 'off',
+    :disk_size => '2500', :disk_format => 'VDI', :hostiocache => 'off',
     :iso_download_timeout => '1000',
     :boot_wait => '10',
     :boot_cmd_sequence => [
diff --git a/tools/appliance/definitions/systemvmtemplate/finalize.sh 
b/tools/appliance/definitions/systemvmtemplate/finalize.sh
index febae7b..fb8c8f3 100644
--- a/tools/appliance/definitions/systemvmtemplate/finalize.sh
+++ b/tools/appliance/definitions/systemvmtemplate/finalize.sh
@@ -53,7 +53,7 @@ function cleanup_veewee() {
 function zero_disk() {
   df -h
   fstrim -av
-  for path in / /boot /var/log /tmp
+  for path in / /boot /var /var/log /tmp
   do
     dd if=/dev/zero of=${path}/zero bs=1M || true
     sync
diff --git a/tools/appliance/definitions/systemvmtemplate/preseed.cfg 
b/tools/appliance/definitions/systemvmtemplate/preseed.cfg
index 7fbe2a1..290d867 100644
--- a/tools/appliance/definitions/systemvmtemplate/preseed.cfg
+++ b/tools/appliance/definitions/systemvmtemplate/preseed.cfg
@@ -57,23 +57,33 @@ d-i partman-auto/method string regular
 d-i partman-auto/choose_recipe select atomic
 d-i partman-auto/expert_recipe string                         \
       boot-root ::                                            \
-              100 50 100 ext2                                 \
+              100 50 200 ext2                                 \
                       $primary{ } $bootable{ }                \
                       method{ format } format{ }              \
                       use_filesystem{ } filesystem{ ext2 }    \
                       mountpoint{ /boot }                     \
               .                                               \
-              1500 40 1600 ext4                               \
+              1000 40 1200 ext4                               \
                       method{ format } format{ }              \
                       use_filesystem{ } filesystem{ ext4 }    \
                       mountpoint{ / }                         \
               .                                               \
-              350 60 400 ext4                                 \
+              700 70 800 ext4                                 \
+                      method{ format } format{ }              \
+                      use_filesystem{ } filesystem{ ext4 }    \
+                      mountpoint{ /var }                      \
+              .                                               \
+              400 60 500 ext4                                 \
                       method{ format } format{ }              \
                       use_filesystem{ } filesystem{ ext4 }    \
                       mountpoint{ /var/log }                  \
               .                                               \
-              50 100 200 linux-swap                           \
+              100 90 200 ext4                                 \
+                      method{ format } format{ }              \
+                      use_filesystem{ } filesystem{ ext4 }    \
+                      mountpoint{ /tmp }                      \
+              .                                               \
+              200 100 1024 linux-swap                         \
                       method{ swap } format{ }                \
               .
 
diff --git a/tools/marvin/marvin/lib/common.py 
b/tools/marvin/marvin/lib/common.py
index 64182d9..73fdf2a 100644
--- a/tools/marvin/marvin/lib/common.py
+++ b/tools/marvin/marvin/lib/common.py
@@ -394,16 +394,6 @@ def get_test_template(apiclient, zone_id=None, 
hypervisor=None):
             "url": 
"http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.ova";,
             "requireshvm": "True",
             "ispublic": "True"
-        },
-        "simulator": {
-            "name": "tiny-simulator",
-            "displaytext": "tiny simulator",
-            "format": "vhd",
-            "hypervisor": "simulator",
-            "ostype": "Other Linux (64-bit)",
-            "url": 
"http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-xen.vhd.bz2";,
-            "requireshvm": "True",
-            "ispublic": "True"
         }
     }
 
@@ -411,6 +401,11 @@ def get_test_template(apiclient, zone_id=None, 
hypervisor=None):
         return FAILED
 
     hypervisor = hypervisor.lower()
+
+    # Return built-in template for simulator
+    if hypervisor == 'simulator':
+        return get_template(apiclient, zone_id)
+
     if hypervisor not in test_templates.keys():
         print "Provided hypervisor has no test template"
         return FAILED

-- 
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <commits@cloudstack.apache.org>.

Reply via email to