Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3A759200D55 for ; Sat, 9 Dec 2017 12:58:34 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 38855160C0E; Sat, 9 Dec 2017 11:58:34 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5A2DB160C03 for ; Sat, 9 Dec 2017 12:58:33 +0100 (CET) Received: (qmail 53249 invoked by uid 500); 9 Dec 2017 11:58:32 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 53240 invoked by uid 99); 9 Dec 2017 11:58:32 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Dec 2017 11:58:32 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 14B0581FEA; Sat, 9 Dec 2017 11:58:29 +0000 (UTC) Date: Sat, 09 Dec 2017 11:58:29 +0000 To: "commits@cloudstack.apache.org" Subject: [cloudstack] 01/01: more systemvmtemplate optimizations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: rohit@apache.org In-Reply-To: <151282070867.12809.9228276828831518734@gitbox.apache.org> References: <151282070867.12809.9228276828831518734@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: cloudstack X-Git-Refname: refs/heads/debian9-systemvmtemplate X-Git-Reftype: branch X-Git-Rev: d9c4ab56fdd303cc5642730d61f67aa2ee0aca24 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20171209115830.14B0581FEA@gitbox.apache.org> archived-at: Sat, 09 Dec 2017 11:58:34 -0000 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 d9c4ab56fdd303cc5642730d61f67aa2ee0aca24 Author: Rohit Yadav AuthorDate: Sat Dec 9 16:37:31 2017 +0530 more systemvmtemplate optimizations Signed-off-by: Rohit Yadav --- systemvm/debian/opt/cloud/bin/setup/postinit.sh | 15 ++++++++++----- tools/appliance/build.sh | 2 +- tools/appliance/definitions/systemvmtemplate/cleanup.sh | 1 + tools/appliance/definitions/systemvmtemplate/finalize.sh | 1 + .../systemvmtemplate/install_systemvm_packages.sh | 2 +- tools/appliance/definitions/systemvmtemplate/preseed.cfg | 6 +++--- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/setup/postinit.sh b/systemvm/debian/opt/cloud/bin/setup/postinit.sh index efd1b4b..9a16966 100755 --- a/systemvm/debian/opt/cloud/bin/setup/postinit.sh +++ b/systemvm/debian/opt/cloud/bin/setup/postinit.sh @@ -15,9 +15,17 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. - +# # This scripts before ssh.service but after cloud-early-config +# Eject cdrom if any +eject || true + +# Refresh and setup systemd +chmod -x /etc/systemd/system/cloud*.service +systemctl daemon-reload + +# Setup router CMDLINE=/var/cache/cloud/cmdline for str in $(cat $CMDLINE) do @@ -32,15 +40,12 @@ for str in $(cat $CMDLINE) esac done -chmod -x /etc/systemd/system/cloud*.service -systemctl daemon-reload - if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] then if [ -x /opt/cloud/bin/update_config.py ] then /opt/cloud/bin/update_config.py cmd_line.json - logger -t cloud "Updated config: cmd_line.json" + logger -t cloud "postinit: Updated config cmd_line.json" fi fi diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh index 45f4728..6f2ab6b 100755 --- a/tools/appliance/build.sh +++ b/tools/appliance/build.sh @@ -397,7 +397,7 @@ function stage_vmx (){ displayname = "${1}" annotation = "${1}" guestos = "otherlinux-64" -virtualhw.version = "7" +virtualHW.version = "8" config.version = "8" numvcpus = "1" cpuid.coresPerSocket = "1" diff --git a/tools/appliance/definitions/systemvmtemplate/cleanup.sh b/tools/appliance/definitions/systemvmtemplate/cleanup.sh index 00f068d..f1591ac 100644 --- a/tools/appliance/definitions/systemvmtemplate/cleanup.sh +++ b/tools/appliance/definitions/systemvmtemplate/cleanup.sh @@ -64,6 +64,7 @@ function cleanup_misc() { rm -fr /usr/share/man rm -fr /usr/share/info rm -fr /usr/share/lintian + rm -fr /usr/share/vim find /usr/share/locale -type f | grep -v en | xargs rm -fr } diff --git a/tools/appliance/definitions/systemvmtemplate/finalize.sh b/tools/appliance/definitions/systemvmtemplate/finalize.sh index 1a25e39..912887c 100644 --- a/tools/appliance/definitions/systemvmtemplate/finalize.sh +++ b/tools/appliance/definitions/systemvmtemplate/finalize.sh @@ -57,6 +57,7 @@ function zero_disk() { sync rm -f ${path}/zero done + fstrim -av df -h } diff --git a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh index 40ff6df..b60f908 100644 --- a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh +++ b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh @@ -53,7 +53,7 @@ function install_packages() { fi ${apt_get} install grub-legacy \ - rsyslog logrotate cron net-tools ifupdown vim netbase iptables \ + rsyslog logrotate cron net-tools ifupdown tmux vim netbase iptables \ openssh-server e2fsprogs tcpdump socat wget \ python bzip2 sed gawk diffutils grep gzip less tar telnet ftp rsync traceroute psmisc lsof procps \ inetutils-ping iputils-arping httping curl \ diff --git a/tools/appliance/definitions/systemvmtemplate/preseed.cfg b/tools/appliance/definitions/systemvmtemplate/preseed.cfg index 5a8e2d9..88c0daf 100644 --- a/tools/appliance/definitions/systemvmtemplate/preseed.cfg +++ b/tools/appliance/definitions/systemvmtemplate/preseed.cfg @@ -57,13 +57,13 @@ d-i partman-auto/method string regular d-i partman-auto/choose_recipe select atomic d-i partman-auto/expert_recipe string \ boot-root :: \ - 50 50 50 ext2 \ + 100 50 100 ext2 \ $primary{ } $bootable{ } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext2 } \ mountpoint{ /boot } \ . \ - 1500 40 1600 ext4 \ + 1450 40 1600 ext4 \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ / } \ @@ -73,7 +73,7 @@ d-i partman-auto/expert_recipe string \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ /var/log } \ . \ - 100 100 100 linux-swap \ + 100 100 200 linux-swap \ method{ swap } format{ } \ . -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" .