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: systemvm template building refactorings
Date Mon, 04 Dec 2017 07:22:25 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 a1b6bce  systemvm template building refactorings
a1b6bce is described below

commit a1b6bce36d3baadac5e84e6ac204054bf2cdba9b
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
AuthorDate: Mon Dec 4 12:49:26 2017 +0530

    systemvm template building refactorings
    
    Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
---
 .../etc/systemd/system/cloud-postinit.service      |  3 +-
 .../debian/etc/systemd/system/cloud.service        |  2 +-
 .../patches/debian/opt/cloud/bin/setup/postinit.sh |  3 ++
 .../configure_systemvm_services.sh                 | 40 +---------------------
 tools/travis/before_install.sh                     |  2 +-
 5 files changed, 8 insertions(+), 42 deletions(-)

diff --git a/systemvm/patches/debian/etc/systemd/system/cloud-postinit.service b/systemvm/patches/debian/etc/systemd/system/cloud-postinit.service
index a5ca9b0..83f0636 100644
--- a/systemvm/patches/debian/etc/systemd/system/cloud-postinit.service
+++ b/systemvm/patches/debian/etc/systemd/system/cloud-postinit.service
@@ -1,5 +1,5 @@
 [Unit]
-Description=cloud-postinit: post init script
+Description=CloudStack post-patching init script
 After=cloud-early-config.service network.target local-fs.target
 Before=ssh.service
 Requires=network.service
@@ -11,3 +11,4 @@ WantedBy=multi-user.target
 Type=oneshot
 ExecStart=/opt/cloud/bin/setup/postinit.sh
 RemainAfterExit=true
+TimeoutStartSec=1min
diff --git a/systemvm/patches/debian/etc/systemd/system/cloud.service b/systemvm/patches/debian/etc/systemd/system/cloud.service
index 9cd0f49..9c61be4 100644
--- a/systemvm/patches/debian/etc/systemd/system/cloud.service
+++ b/systemvm/patches/debian/etc/systemd/system/cloud.service
@@ -1,5 +1,5 @@
 [Unit]
-Description=cloud: startup cloud service
+Description=CloudStack Agent service
 After=cloud-early-config.service network.target local-fs.target
 
 [Install]
diff --git a/systemvm/patches/debian/opt/cloud/bin/setup/postinit.sh b/systemvm/patches/debian/opt/cloud/bin/setup/postinit.sh
index 6024329..58a3ecc 100755
--- a/systemvm/patches/debian/opt/cloud/bin/setup/postinit.sh
+++ b/systemvm/patches/debian/opt/cloud/bin/setup/postinit.sh
@@ -16,6 +16,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
+# This scripts before ssh.service but after cloud-early-config
+
 . /opt/cloud/bin/setup/common.sh
 
 if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ]
@@ -24,5 +26,6 @@ then
   then
       /opt/cloud/bin/update_config.py cmd_line.json
       logger -t cloud "Updated config: cmd_line.json"
+      systemctl restart networking
   fi
 fi
diff --git a/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh b/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
index 51ffc86..4789e65 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
@@ -39,45 +39,7 @@ function install_cloud_scripts() {
     /etc/init.d/cloud-early-config \
     /etc/profile.d/cloud.sh
 
-  cat > /etc/systemd/system/cloud-early-config.service << EOF
-[Unit]
-Description=cloud-early-config: configures systemvm using cmdline
-DefaultDependencies=no
-
-Before=network-pre.target
-Wants=network-pre.target
-
-Requires=local-fs.target
-After=local-fs.target
-
-[Install]
-WantedBy=multi-user.target
-
-[Service]
-Type=oneshot
-ExecStart=/etc/init.d/cloud-early-config start
-ExecStop=/etc/init.d/cloud-early-config stop
-RemainAfterExit=true
-TimeoutStartSec=5min
-
-EOF
-
-  cat > /etc/systemd/system/cloud-postinit.service << EOF
-[Unit]
-Description=cloud-postinit: post init script
-After=cloud-early-config.service network.target local-fs.target
-Before=ssh.service
-Requires=network.service
-
-[Install]
-WantedBy=multi-user.target
-
-[Service]
-Type=oneshot
-ExecStart=/opt/cloud/bin/setup/postinit.sh
-RemainAfterExit=true
-TimeoutStartSec=1min
-EOF
+  chmod -x /etc/systemd/system/*
 
   systemctl daemon-reload
   systemctl enable cloud-early-config
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 2333ad9..c31213e 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -100,7 +100,7 @@ pip install --user --upgrade pip
 
 for ((i=0;i<$RETRY_COUNT;i++))
 do
-  pip install --user --upgrade lxml paramiko nose texttable ipmisim pyopenssl flask netaddr
pylint pep8 > /tmp/piplog
+  pip install --user --upgrade lxml paramiko nose texttable ipmisim pyopenssl mock flask
netaddr pylint pep8 > /tmp/piplog
   if [[ $? -eq 0 ]]; then
     echo -e "\npython packages installed successfully"
     break;

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

Mime
View raw message