cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [cloudstack] branch debian9-systemvmtemplate updated: fix failures
Date Fri, 24 Nov 2017 19:24:37 GMT
This is an automated email from the ASF dual-hosted git repository.

bhaisaab 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 9596650  fix failures
9596650 is described below

commit 9596650af89268b36882c4dd8396accbc8299665
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
AuthorDate: Sat Nov 25 00:54:13 2017 +0530

    fix failures
    
    Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
---
 .../patches/debian/config/opt/cloud/bin/setup/common.sh  | 14 ++++++++------
 .../debian/config/opt/cloud/bin/setup/consoleproxy.sh    | 10 ++++++++--
 .../debian/config/opt/cloud/bin/setup/dhcpsrvr.sh        | 14 ++++++--------
 .../patches/debian/config/opt/cloud/bin/setup/elbvm.sh   | 11 ++++-------
 .../patches/debian/config/opt/cloud/bin/setup/ilbvm.sh   | 10 +++-------
 .../patches/debian/config/opt/cloud/bin/setup/router.sh  | 16 +++++++---------
 .../debian/config/opt/cloud/bin/setup/secstorage.sh      | 12 +++++++-----
 .../debian/config/opt/cloud/bin/setup/vpcrouter.sh       |  5 +++--
 8 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/systemvm/patches/debian/config/opt/cloud/bin/setup/common.sh b/systemvm/patches/debian/config/opt/cloud/bin/setup/common.sh
index e6bfa0c..b7bc8f9 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/setup/common.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/setup/common.sh
@@ -592,23 +592,25 @@ routing_svcs() {
    systemctl disable --now haproxy
    systemctl disable --now nfs-common
    systemctl disable --now portmap
-   systemctl enable --now ssh
+   systemctl enable apache2
+   systemctl enable haproxy
+   systemctl enable ssh
    echo "ssh haproxy apache2" > /var/cache/cloud/enabled_svcs
    echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs
    if [ $RROUTER -eq 0 ]
    then
        systemctl disable --now cloud-passwd-srvr
        systemctl disable --now dnsmasq
-       systemctl enable --now conntrackd
-       systemctl enable --now keepalived
-       systemctl enable --now postinit
+       systemctl enable conntrackd
+       systemctl enable keepalived
+       systemctl enable postinit
        echo "keepalived conntrackd postinit" >> /var/cache/cloud/enabled_svcs
        echo "dnsmasq cloud-passwd-srvr" >> /var/cache/cloud/disabled_svcs
    else
        systemctl disable --now conntrackd
        systemctl disable --now keepalived
-       systemctl enable --now cloud-passwd-srvr
-       systemctl enable --now dnsmasq
+       systemctl enable cloud-passwd-srvr
+       systemctl enable dnsmasq
        echo "dnsmasq cloud-passwd-srvr " >> /var/cache/cloud/enabled_svcs
        echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs
    fi
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/setup/consoleproxy.sh b/systemvm/patches/debian/config/opt/cloud/bin/setup/consoleproxy.sh
index adaf5c9..fc05d75 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/setup/consoleproxy.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/setup/consoleproxy.sh
@@ -27,6 +27,7 @@ consoleproxy_svcs() {
    systemctl disable --now keepalived
    systemctl disable --now nfs-common
    systemctl disable --now portmap
+   systemctl enable cloud
    systemctl enable postinit
    systemctl enable ssh
    echo "cloud postinit ssh" > /var/cache/cloud/enabled_svcs
@@ -38,11 +39,17 @@ setup_console_proxy() {
   log_it "Setting up console proxy system vm"
   setup_common eth0 eth1 eth2
   setup_system_rfc1918_internal
+
+  log_it "Setting up entry in hosts"
+  sed -i /$NAME/d /etc/hosts
   public_ip=`getPublicIp`
-  sed -i  /gateway/d /etc/hosts
   echo "$public_ip $NAME" >> /etc/hosts
+
+  log_it "Applying iptables rules"
   cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4
   cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules
+
+  log_it "Configuring sshd"
   local hyp=$HYPERVISOR
   if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then
     setup_sshd $ETH1_IP "eth1"
@@ -50,7 +57,6 @@ setup_console_proxy() {
     setup_sshd $ETH0_IP "eth0"
   fi
 
-  systemctl enable --now cloud
   disable_rpfilter
   enable_fwding 0
   enable_irqbalance 0
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/setup/dhcpsrvr.sh b/systemvm/patches/debian/config/opt/cloud/bin/setup/dhcpsrvr.sh
index 47e9205..73027ae 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/setup/dhcpsrvr.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/setup/dhcpsrvr.sh
@@ -25,9 +25,10 @@ dhcpsrvr_svcs() {
    systemctl disable --now keepalived
    systemctl disable --now nfs-common
    systemctl disable --now portmap
-   systemctl enable --now cloud-passwd-srvr
-   systemctl enable --now dnsmasq
-   systemctl enable --now ssh
+   systemctl enable apache2
+   systemctl enable cloud-passwd-srvr
+   systemctl enable dnsmasq
+   systemctl enable ssh
    echo "ssh dnsmasq cloud-passwd-srvr apache2" > /var/cache/cloud/enabled_svcs
    echo "cloud nfs-common haproxy portmap" > /var/cache/cloud/disabled_svcs
 }
@@ -38,15 +39,12 @@ setup_dhcpsrvr() {
   setup_dnsmasq
   setup_apache2 $ETH0_IP
 
-  sed -i  /gateway/d /etc/hosts
+  sed -i  /$NAME/d /etc/hosts
   [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts
   [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts
 
-  systemctl enable dnsmasq cloud-passwd-srvr
-  systemctl restart dnsmasq cloud-passwd-srvr
   enable_irqbalance 0
   enable_fwding 0
-  systemctl disable nfs-common
 
   cp /etc/iptables/iptables-router /etc/iptables/rules.v4
   cp /etc/iptables/iptables-router /etc/iptables/rules
@@ -70,10 +68,10 @@ setup_dhcpsrvr() {
   fi
 }
 
-setup_dhcpsrvr
 dhcpsrvr_svcs
 if [ $? -gt 0 ]
 then
   log_it "Failed to execute dhcpsrvr_svcs"
   exit 1
 fi
+setup_dhcpsrvr
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/setup/elbvm.sh b/systemvm/patches/debian/config/opt/cloud/bin/setup/elbvm.sh
index 3dd3519..822343e 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/setup/elbvm.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/setup/elbvm.sh
@@ -24,17 +24,16 @@ elbvm_svcs() {
    systemctl disable --now keepalived
    systemctl disable --now nfs-common
    systemctl disable --now portmap
-   systemctl enable --now haproxy
-   systemctl enable --now ssh
+   systemctl enable haproxy
+   systemctl enable ssh
    echo "ssh haproxy" > /var/cache/cloud/enabled_svcs
    echo "cloud dnsmasq cloud-passwd-srvr apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs
 }
 
 setup_elbvm() {
   log_it "Setting up Elastic Load Balancer system vm"
-  local hyp=$HYPERVISOR
   setup_common eth0 eth1
-  sed -i  /gateway/d /etc/hosts
+  sed -i  /$NAME/d /etc/hosts
   public_ip=$ETH2_IP
   [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP
   echo "$public_ip $NAME" >> /etc/hosts
@@ -50,14 +49,12 @@ setup_elbvm() {
 
   enable_fwding 0
   enable_irqbalance 0
-  systemctl disable nfs-common
-  systemctl disable portmap
 }
 
-setup_elbvm
 elbvm_svcs
 if [ $? -gt 0 ]
 then
   log_it "Failed to execute elbvm svcs"
   exit 1
 fi
+setup_elbvm
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/setup/ilbvm.sh b/systemvm/patches/debian/config/opt/cloud/bin/setup/ilbvm.sh
index 1169511..ca95af0 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/setup/ilbvm.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/setup/ilbvm.sh
@@ -24,15 +24,14 @@ ilbvm_svcs() {
    systemctl disable --now keepalived
    systemctl disable --now nfs-common
    systemctl disable --now portmap
-   systemctl enable --now haproxy
-   systemctl enable --now ssh
+   systemctl enable haproxy
+   systemctl enable ssh
    echo "ssh haproxy" > /var/cache/cloud/enabled_svcs
    echo "cloud dnsmasq cloud-passwd-srvr apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs
 }
 
 setup_ilbvm() {
   log_it "Setting up Internal Load Balancer system vm"
-  local hyp=$HYPERVISOR
   setup_common eth0 eth1
   #eth0 = guest network, eth1=control network
 
@@ -44,16 +43,13 @@ setup_ilbvm() {
   setup_sshd $ETH1_IP "eth1"
 
   enable_fwding 0
-  systemctl enable haproxy
   enable_irqbalance 1
-  systemctl disable nfs-common
-  systemctl disable portmap
 }
 
-setup_ilbvm
 ilbvm_svcs
 if [ $? -gt 0 ]
 then
   log_it "Failed to execute ilbvm svcs"
   exit 1
 fi
+setup_ilbvm
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/setup/router.sh b/systemvm/patches/debian/config/opt/cloud/bin/setup/router.sh
index e66b9e2..1096bbf 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/setup/router.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/setup/router.sh
@@ -18,7 +18,6 @@
 
 . /opt/cloud/bin/setup/common.sh
 
-
 setup_router() {
   log_it "Setting up virtual router system vm"
 
@@ -55,7 +54,7 @@ setup_router() {
   #then
     #setup_redundant_router
   #fi
-  
+
   log_it "Checking udev NIC assignment order changes"
   if [ "$NIC_MACS" != "" ]
   then
@@ -63,7 +62,7 @@ setup_router() {
     newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}')
     rm /tmp/interfaces
     rm /tmp/udev-rules
-    
+
     if [ "$oldmd5" != "$newmd5" ]
     then
       log_it "udev NIC assignment requires reboot to take effect"
@@ -72,24 +71,23 @@ setup_router() {
       reboot
     fi
   fi
-  
+
   setup_aesni
   setup_dnsmasq
   setup_apache2 $ETH0_IP
 
-  sed -i  /gateway/d /etc/hosts
+  sed -i /$NAME/d /etc/hosts
   echo "$ETH0_IP $NAME" >> /etc/hosts
 
-
   systemctl enable dnsmasq haproxy cloud-passwd-srvr
-  systemctl restart dnsmasq haproxy cloud-passwd-srvr
+
   enable_irqbalance 1
   disable_rpfilter_domR
   enable_fwding 1
   enable_rpsrfs 1
   systemctl disable nfs-common
   cp /etc/iptables/iptables-router /etc/iptables/rules.v4
-#for old templates
+  #for old templates
   cp /etc/iptables/iptables-router /etc/iptables/rules
   setup_sshd $ETH1_IP "eth1"
 
@@ -108,10 +106,10 @@ setup_router() {
   fi
 }
 
-setup_router
 routing_svcs
 if [ $? -gt 0 ]
 then
   log_it "Failed to execute routing_svcs"
   exit 1
 fi
+setup_router
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/setup/secstorage.sh b/systemvm/patches/debian/config/opt/cloud/bin/setup/secstorage.sh
index 7c4ae63..32e6ba8 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/setup/secstorage.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/setup/secstorage.sh
@@ -24,6 +24,8 @@ secstorage_svcs() {
    systemctl disable --now dnsmasq
    systemctl disable --now haproxy
    systemctl disable --now keepalived
+   systemctl enable apache2
+   systemctl enable cloud
    systemctl enable nfs-common
    systemctl enable portmap
    systemctl enable postinit
@@ -36,13 +38,13 @@ secstorage_svcs() {
 setup_secstorage() {
   log_it "Setting up secondary storage system vm"
   sysctl vm.min_free_kbytes=8192
-  local hyp=$HYPERVISOR
+
   setup_common eth0 eth1 eth2
   setup_storage_network
   setup_system_rfc1918_internal
 
   log_it "Setting up entry in hosts"
-  sed -i  /gateway/d /etc/hosts
+  sed -i /$NAME/d /etc/hosts
   public_ip=`getPublicIp`
   echo "$public_ip $NAME" >> /etc/hosts
 
@@ -51,6 +53,7 @@ setup_secstorage() {
   cp /etc/iptables/iptables-secstorage /etc/iptables/rules
 
   log_it "Configuring sshd"
+  local hyp=$HYPERVISOR
   if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then
     setup_sshd $ETH1_IP "eth1"
   else
@@ -84,11 +87,10 @@ CORS
 
   disable_rpfilter
   enable_fwding 0
-
-  systemctl enable cloud apache2
   enable_irqbalance 0
-  rm -f /etc/logrotate.d/cloud
   setup_ntp
+
+  rm -f /etc/logrotate.d/cloud
 }
 
 secstorage_svcs
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/setup/vpcrouter.sh b/systemvm/patches/debian/config/opt/cloud/bin/setup/vpcrouter.sh
index 4c909f5..83d5366 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/setup/vpcrouter.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/setup/vpcrouter.sh
@@ -112,7 +112,8 @@ EOF
       echo 0 > /var/cache/cloud/dnsmasq_managed_lease
   fi
 
-  systemctl restart dnsmasq haproxy cloud-passwd-srvr
+  #FIXME: additional services to enable to vpc router?
+  #systemctl restart dnsmasq haproxy cloud-passwd-srvr
 
   #setup hourly logrotate
   mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1
@@ -122,10 +123,10 @@ EOF
   fi
 }
 
-setup_vpcrouter
 routing_svcs
 if [ $? -gt 0 ]
 then
   log_it "Failed to execute routing_svcs"
   exit 1
 fi
+setup_vpcrouter

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

Mime
View raw message