CLOUDSTACK-10341: VR minor fixes to systemvmtemplate (#2468)

- Fixes rsyslog: fix config error in rsylslog.conf

Feb 26 08:09:54 r-413-VM liblogging-stdlog[19754]: action '*' treated as ':omusrmsg:*' - please use ':omusrmsg:*' syntax instead, '*' will not be supported in the future [v8.24.0 try http://www.rsyslog.com/e/2184 ]
Feb 26 08:09:54 r-413-VM liblogging-stdlog[19754]: error during parsing file /etc/rsyslog.conf, on or before line 95: warnings occured in file '/etc/rsyslog.conf' around line 95 [v8.24.0 try http://www.rsyslog.com/e/2207 ]

- Run apache2 only after cloud-postinit

- Increase /run size for VR with 256M RAM

root@r-395-VM:~# systemctl daemon-reload
Failed to reload daemon: Refusing to reload, not enough space available on /run/systemd. Currently, 15.8M are free, but a safety buffer of 16.0M is enforced.

tmpfs            23M  6.5M   16M  29% /run
This commit is contained in:
René Moser 2018-03-23 07:22:29 +01:00 committed by Rohit Yadav
parent 2a068696f8
commit c8dcc64b65
3 changed files with 9 additions and 2 deletions

View File

@ -92,7 +92,7 @@ news.notice -/var/log/news/news.notice
#
# Emergencies are sent to everybody logged in.
#
*.emerg *
*.emerg :omusrmsg:*
#
# I like to have messages displayed on the console, but only on a virtual

View File

@ -1,7 +1,7 @@
[Unit]
Description=CloudStack post-patching init script
After=cloud-early-config.service network.target local-fs.target
Before=ssh.service
Before=ssh.service apache2.service
Requires=network.service
[Install]

View File

@ -24,6 +24,12 @@ function configure_misc() {
echo "cloud:`openssl rand -base64 32`" | chpasswd
}
function configure_rundisk_size() {
# Debian's default is 10% of total RAM. This is too low when total is 256M.
# See https://manpages.debian.org/stretch/initscripts/tmpfs.5.en.html
echo "tmpfs /run tmpfs nodev,nosuid,size=20%,mode=755 0 0" >> /etc/fstab
}
function configure_sudoers() {
cat >/etc/sudoers <<END
Defaults env_reset
@ -63,6 +69,7 @@ function zero_disk() {
function finalize() {
configure_misc
configure_rundisk_size
configure_sudoers
cleanup_final
sync