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
The following commit(s) were added to refs/heads/debian9-systemvmtemplate by
this push:
new 233ed49 more systemvmtemplate optimizations
233ed49 is described below
commit 233ed499533f2b3962cacbc362f52203667d4939
Author: Rohit Yadav <[email protected]>
AuthorDate: Sat Dec 9 16:37:31 2017 +0530
more systemvmtemplate optimizations
Signed-off-by: Rohit Yadav <[email protected]>
---
systemvm/debian/opt/cloud/bin/setup/postinit.sh | 22 +++++++++++++++++-----
.../definitions/systemvmtemplate/finalize.sh | 1 +
.../definitions/systemvmtemplate/preseed.cfg | 7 ++-----
3 files changed, 20 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..8e5ce6b 100755
--- a/systemvm/debian/opt/cloud/bin/setup/postinit.sh
+++ b/systemvm/debian/opt/cloud/bin/setup/postinit.sh
@@ -15,9 +15,24 @@
# 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
+# Enable hot-pluggable swap assuming 20% of 1GB
+rm -f /swapfile
+fallocate -l 200M /swapfile
+chmod 600 /swapfile
+mkswap /swapfile
+swapon /swapfile
+
+# 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 +47,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/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/preseed.cfg
b/tools/appliance/definitions/systemvmtemplate/preseed.cfg
index 5a8e2d9..25c6101 100644
--- a/tools/appliance/definitions/systemvmtemplate/preseed.cfg
+++ b/tools/appliance/definitions/systemvmtemplate/preseed.cfg
@@ -57,7 +57,7 @@ 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 } \
@@ -68,14 +68,11 @@ d-i partman-auto/expert_recipe string
\
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
- 350 50 400 ext4 \
+ 400 50 400 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /var/log } \
. \
- 100 100 100 linux-swap \
- method{ swap } format{ } \
- .
d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].