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 1b5d90cbf5a7432be2ce404491ba3d89d8d9b72e Author: Rohit Yadav <[email protected]> AuthorDate: Wed Dec 13 00:26:27 2017 +0530 fixes Signed-off-by: Rohit Yadav <[email protected]> --- systemvm/debian/etc/rc.local | 28 ---------------- .../etc/systemd/system/cloud-postinit.service | 2 +- systemvm/debian/opt/cloud/bin/setup/common.sh | 3 +- .../debian/opt/cloud/bin/setup/consoleproxy.sh | 2 +- systemvm/debian/opt/cloud/bin/setup/dhcpsrvr.sh | 2 +- systemvm/debian/opt/cloud/bin/setup/elbvm.sh | 2 +- systemvm/debian/opt/cloud/bin/setup/ilbvm.sh | 2 +- .../debian/opt/cloud/bin/setup/patchsystemvm.sh | 4 +++ systemvm/debian/opt/cloud/bin/setup/postinit.sh | 39 +++++++++++++++++++--- systemvm/debian/opt/cloud/bin/setup/secstorage.sh | 2 +- systemvm/debian/opt/cloud/bin/update_config.py | 7 ---- ui/l10n/en.js | 1 - ui/scripts/system.js | 4 +-- ui/scripts/ui/dialog.js | 2 +- ui/scripts/ui/widgets/multiEdit.js | 2 +- 15 files changed, 49 insertions(+), 53 deletions(-) diff --git a/systemvm/debian/etc/rc.local b/systemvm/debian/etc/rc.local index 94c6466..e419de0 100755 --- a/systemvm/debian/etc/rc.local +++ b/systemvm/debian/etc/rc.local @@ -16,32 +16,4 @@ # specific language governing permissions and limitations # under the License. -[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs -for svc in $(cat /var/cache/cloud/enabled_svcs) -do - logger -t cloud "Starting $svc" - systemctl enable --no-block --now $svc -done -[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs -for svc in $(cat /var/cache/cloud/disabled_svcs) -do - logger -t cloud "Stopping $svc" - systemctl disable --no-block --now $svc -done - -# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist -ipv4="/etc/iptables/rules.v4" -if [ -e $ipv4 ] -then - iptables-restore < $ipv4 -fi - -ipv6="/etc/iptables/rules.v6" -if [ -e $ipv6 ] -then - iptables-restore < $ipv6 -fi - -date > /var/cache/cloud/boot_up_done -logger -t cloud "Boot up process done" diff --git a/systemvm/debian/etc/systemd/system/cloud-postinit.service b/systemvm/debian/etc/systemd/system/cloud-postinit.service index 04f71a3..c23516e 100644 --- a/systemvm/debian/etc/systemd/system/cloud-postinit.service +++ b/systemvm/debian/etc/systemd/system/cloud-postinit.service @@ -11,4 +11,4 @@ WantedBy=multi-user.target Type=oneshot ExecStart=/opt/cloud/bin/setup/postinit.sh RemainAfterExit=true -TimeoutStartSec=5min +TimeoutStartSec=10min diff --git a/systemvm/debian/opt/cloud/bin/setup/common.sh b/systemvm/debian/opt/cloud/bin/setup/common.sh index f1f72f4..078cb58 100755 --- a/systemvm/debian/opt/cloud/bin/setup/common.sh +++ b/systemvm/debian/opt/cloud/bin/setup/common.sh @@ -590,8 +590,7 @@ routing_svcs() { systemctl disable --now portmap systemctl enable apache2 systemctl enable haproxy - systemctl enable ssh - echo "ssh haproxy apache2" > /var/cache/cloud/enabled_svcs + echo "haproxy apache2" > /var/cache/cloud/enabled_svcs echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs if [ $RROUTER -eq 1 ] then diff --git a/systemvm/debian/opt/cloud/bin/setup/consoleproxy.sh b/systemvm/debian/opt/cloud/bin/setup/consoleproxy.sh index a3b2797..225dc6f 100755 --- a/systemvm/debian/opt/cloud/bin/setup/consoleproxy.sh +++ b/systemvm/debian/opt/cloud/bin/setup/consoleproxy.sh @@ -19,7 +19,7 @@ . /opt/cloud/bin/setup/common.sh consoleproxy_svcs() { - echo "cloud ssh" > /var/cache/cloud/enabled_svcs + echo "cloud" > /var/cache/cloud/enabled_svcs echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs mkdir -p /var/log/cloud } diff --git a/systemvm/debian/opt/cloud/bin/setup/dhcpsrvr.sh b/systemvm/debian/opt/cloud/bin/setup/dhcpsrvr.sh index 467bb56..9161aeb 100755 --- a/systemvm/debian/opt/cloud/bin/setup/dhcpsrvr.sh +++ b/systemvm/debian/opt/cloud/bin/setup/dhcpsrvr.sh @@ -19,7 +19,7 @@ . /opt/cloud/bin/setup/common.sh dhcpsrvr_svcs() { - echo "ssh dnsmasq apache2" > /var/cache/cloud/enabled_svcs + echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs } diff --git a/systemvm/debian/opt/cloud/bin/setup/elbvm.sh b/systemvm/debian/opt/cloud/bin/setup/elbvm.sh index 600fb0d..ae16b4b 100755 --- a/systemvm/debian/opt/cloud/bin/setup/elbvm.sh +++ b/systemvm/debian/opt/cloud/bin/setup/elbvm.sh @@ -19,7 +19,7 @@ . /opt/cloud/bin/setup/common.sh elbvm_svcs() { - echo "ssh haproxy" > /var/cache/cloud/enabled_svcs + echo "haproxy" > /var/cache/cloud/enabled_svcs echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs } diff --git a/systemvm/debian/opt/cloud/bin/setup/ilbvm.sh b/systemvm/debian/opt/cloud/bin/setup/ilbvm.sh index 58a711c..ac801b2 100755 --- a/systemvm/debian/opt/cloud/bin/setup/ilbvm.sh +++ b/systemvm/debian/opt/cloud/bin/setup/ilbvm.sh @@ -19,7 +19,7 @@ . /opt/cloud/bin/setup/common.sh ilbvm_svcs() { - echo "ssh haproxy" > /var/cache/cloud/enabled_svcs + echo "haproxy" > /var/cache/cloud/enabled_svcs echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs } diff --git a/systemvm/debian/opt/cloud/bin/setup/patchsystemvm.sh b/systemvm/debian/opt/cloud/bin/setup/patchsystemvm.sh index 8642945..ba5e2d8 100755 --- a/systemvm/debian/opt/cloud/bin/setup/patchsystemvm.sh +++ b/systemvm/debian/opt/cloud/bin/setup/patchsystemvm.sh @@ -44,6 +44,10 @@ CMDLINE=/var/cache/cloud/cmdline PATCH_MOUNT=$1 TYPE=$2 +# Refresh and setup systemd +chmod -x /etc/systemd/system/cloud*.service +systemctl daemon-reload + echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] diff --git a/systemvm/debian/opt/cloud/bin/setup/postinit.sh b/systemvm/debian/opt/cloud/bin/setup/postinit.sh index 9a16966..d29203f 100755 --- a/systemvm/debian/opt/cloud/bin/setup/postinit.sh +++ b/systemvm/debian/opt/cloud/bin/setup/postinit.sh @@ -21,10 +21,6 @@ # 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) @@ -44,7 +40,7 @@ if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsr then if [ -x /opt/cloud/bin/update_config.py ] then - /opt/cloud/bin/update_config.py cmd_line.json + /opt/cloud/bin/update_config.py cmd_line.json || true logger -t cloud "postinit: Updated config cmd_line.json" fi fi @@ -54,3 +50,36 @@ then python /opt/cloud/bin/baremetal-vr.py & logger -t cloud "Started baremetal-vr service" fi + +[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs +for svc in $(cat /var/cache/cloud/enabled_svcs) +do + logger -t cloud "Starting $svc" + systemctl enable --no-block --now $svc +done + +[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs +for svc in $(cat /var/cache/cloud/disabled_svcs) +do + logger -t cloud "Stopping $svc" + systemctl disable --no-block --now $svc +done + +# Enable SSH by default +systemctl enable --no-block --now ssh + +# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist +ipv4="/etc/iptables/rules.v4" +if [ -e $ipv4 ] +then + iptables-restore < $ipv4 +fi + +ipv6="/etc/iptables/rules.v6" +if [ -e $ipv6 ] +then + iptables-restore < $ipv6 +fi + +date > /var/cache/cloud/boot_up_done +logger -t cloud "Boot up process done" diff --git a/systemvm/debian/opt/cloud/bin/setup/secstorage.sh b/systemvm/debian/opt/cloud/bin/setup/secstorage.sh index b890d77..8b6d4ee 100755 --- a/systemvm/debian/opt/cloud/bin/setup/secstorage.sh +++ b/systemvm/debian/opt/cloud/bin/setup/secstorage.sh @@ -19,7 +19,7 @@ . /opt/cloud/bin/setup/common.sh secstorage_svcs() { - echo "apache2 cloud ssh nfs-common portmap" > /var/cache/cloud/enabled_svcs + echo "apache2 cloud nfs-common portmap" > /var/cache/cloud/enabled_svcs echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs mkdir -p /var/log/cloud } diff --git a/systemvm/debian/opt/cloud/bin/update_config.py b/systemvm/debian/opt/cloud/bin/update_config.py index b63cd0e..7b86378 100755 --- a/systemvm/debian/opt/cloud/bin/update_config.py +++ b/systemvm/debian/opt/cloud/bin/update_config.py @@ -117,13 +117,6 @@ if not (os.path.isfile(jsonConfigFile) and os.access(jsonConfigFile, os.R_OK)): print "[ERROR] update_config.py :: Unable to read and access %s to process it" % jsonConfigFile sys.exit(1) -# If the command line json file is unprocessed process it -# This is important or, the control interfaces will get deleted! -if jsonFilename != "cmd_line.json" and os.path.isfile(jsonPath % "cmd_line.json"): - qf = QueueFile() - qf.setFile("cmd_line.json") - qf.load(None) - # If the guest network is already configured and have the same IP, do not try to configure it again otherwise it will break if jsonFilename.startswith("guest_network.json"): if os.path.isfile(currentGuestNetConfig): diff --git a/ui/l10n/en.js b/ui/l10n/en.js index e32f358..73fa706 100644 --- a/ui/l10n/en.js +++ b/ui/l10n/en.js @@ -556,7 +556,6 @@ var dictionary = {"ICMP.code":"ICMP Code", "label.console.proxy.vm":"Console Proxy VM", "label.continue":"Continue", "label.continue.basic.install":"Continue with basic installation", -"label.control.ip":"Control IP", "label.copying.iso":"Copying ISO", "label.corrections.saved":"Corrections saved", "label.counter":"Counter", diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 5bb3ca5..b27007f 100755 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -10895,8 +10895,8 @@ return args; } }, - controlip: { - label: 'label.control.ip' + publicip: { + label: 'label.public.ip' }, hostname: { label: 'label.host' diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js index 1564a2b..c518859 100644 --- a/ui/scripts/ui/dialog.js +++ b/ui/scripts/ui/dialog.js @@ -897,7 +897,7 @@ $listView.dialog({ dialogClass: 'multi-edit-add-list panel', - width: 825, + width: 900, title: _l('Select VM'), buttons: [{ text: _l('label.apply'), diff --git a/ui/scripts/ui/widgets/multiEdit.js b/ui/scripts/ui/widgets/multiEdit.js index 48d597e..677448a 100755 --- a/ui/scripts/ui/widgets/multiEdit.js +++ b/ui/scripts/ui/widgets/multiEdit.js @@ -579,7 +579,7 @@ var $dataList = $listView.addClass('multi-edit-add-list').dialog({ dialogClass: 'multi-edit-add-list panel', - width: 825, + width: 900, title: label, buttons: [{ text: _l('label.apply'), -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
