You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2015/10/21 23:16:19 UTC
[1/4] git commit: updated refs/heads/master to e7638c0
Repository: cloudstack
Updated Branches:
refs/heads/master c7ca952f2 -> e7638c028
CLOUDSTACK-8933 SSVm and CPVM do not survive a reboot from API
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ac68f2a1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ac68f2a1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ac68f2a1
Branch: refs/heads/master
Commit: ac68f2a116650f9bebc80b183261ba350f8a7db7
Parents: 6fe5ae0
Author: Bharat Kumar <bh...@citrix.com>
Authored: Wed Dec 24 16:48:55 2014 +0530
Committer: Wilder Rodrigues <wr...@schubergphilis.com>
Committed: Tue Oct 20 10:50:14 2015 +0200
----------------------------------------------------------------------
.../patches/debian/config/etc/init.d/cloud-early-config | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac68f2a1/systemvm/patches/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index 79a85e7..d25366e 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -117,7 +117,7 @@ get_boot_params() {
if [ ! -e /dev/vport0p1 ]; then
log_it "/dev/vport0p1 not loaded, perhaps guest kernel is too old." && exit 2
fi
- while [ -z "$cmd" ]; do
+ while [ -z "$cmd" ]; do
while read line; do
if [[ $line == cmdline:* ]]; then
cmd=${line//cmdline:/}
@@ -128,7 +128,14 @@ get_boot_params() {
echo $pubkey > /root/.ssh/authorized_keys
fi
done < /dev/vport0p1
- done
+ # In case of reboot we do not send the boot args again.
+ # so need not wait for them, as the boot args are already set at startup
+ if [ -s /var/cache/cloud/cmdline ]
+ then
+ log_it "found a non empty cmdline file continuing"
+ break;
+ fi
+ done
chmod go-rwx /root/.ssh/authorized_keys
;;
vmware)
[3/4] git commit: updated refs/heads/master to e7638c0
Posted by re...@apache.org.
CLOUDSTACK-8933 - Improves the the test internals of the SSVM/CPVM
- Check if the link local IP is the same a dthe one cached in the cmdline config file.
- SSVM/CPSM can have the same IP after reboot
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ae6aa2af
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ae6aa2af
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ae6aa2af
Branch: refs/heads/master
Commit: ae6aa2af88b0b82f2127f42a90fd975b2ce063f5
Parents: 698171d
Author: Wilder Rodrigues <wr...@schubergphilis.com>
Authored: Wed Oct 21 12:24:14 2015 +0200
Committer: Wilder Rodrigues <wr...@schubergphilis.com>
Committed: Wed Oct 21 14:18:53 2015 +0200
----------------------------------------------------------------------
test/integration/smoke/test_ssvm.py | 91 +++++++++++++++++++++++++++++++-
1 file changed, 90 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae6aa2af/test/integration/smoke/test_ssvm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_ssvm.py b/test/integration/smoke/test_ssvm.py
index fc6abf7..9224893 100644
--- a/test/integration/smoke/test_ssvm.py
+++ b/test/integration/smoke/test_ssvm.py
@@ -47,6 +47,13 @@ class TestSSVMs(cloudstackTestCase):
self.cleanup = []
self.services = self.testClient.getParsedTestDataConfig()
self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests())
+
+ # Default sleep is set to 90 seconds, which is too long if the SSVM takes up to 2min to start.
+ # Second sleep in the loop will waste test time.
+ self.services["sleep"] = 30
+ # Default value is 120 seconds. That's just too much.
+ self.services["configurableData"]["systemVmDelay"] = 60
+
return
def tearDown(self):
@@ -470,6 +477,47 @@ class TestSSVMs(cloudstackTestCase):
1,
"Check cloud service is running or not"
)
+
+ linklocal_ip = None
+ # Check status of cloud service
+ if self.hypervisor.lower() in ('vmware', 'hyperv'):
+ # SSH into SSVMs is done via management server for Vmware and
+ # Hyper-V
+ linklocal_ip = ssvm.privateip
+ result = get_process_status(
+ self.apiclient.connection.mgtSvr,
+ 22,
+ self.apiclient.connection.user,
+ self.apiclient.connection.passwd,
+ ssvm.privateip,
+ "cat /var/cache/cloud/cmdline | xargs | sed \"s/ /\\n/g\" | grep eth0ip= | sed \"s/\=/ /g\" | awk '{print $2}'",
+ hypervisor=self.hypervisor
+ )
+ else:
+ try:
+ linklocal_ip = ssvm.linklocalip
+ host.user, host.passwd = get_host_credentials(
+ self.config, host.ipaddress)
+ result = get_process_status(
+ host.ipaddress,
+ 22,
+ host.user,
+ host.passwd,
+ ssvm.linklocalip,
+ "cat /var/cache/cloud/cmdline | xargs | sed \"s/ /\\n/g\" | grep eth0ip= | sed \"s/\=/ /g\" | awk '{print $2}'"
+ )
+ except KeyError:
+ self.skipTest(
+ "Marvin configuration has no host\
+ credentials to check router services")
+ res = result[0]
+ self.debug("Cached Link Local IP: %s" % res)
+ self.assertEqual(
+ linklocal_ip,
+ res,
+ "The cached Link Local should be the same as the current Link Local IP, but they are different! Current ==> %s; Cached ==> %s " % (linklocal_ip, res)
+ )
+
return
@attr(
@@ -564,6 +612,47 @@ class TestSSVMs(cloudstackTestCase):
1,
"Check cloud service is running or not"
)
+
+ linklocal_ip = None
+ # Check status of cloud service
+ if self.hypervisor.lower() in ('vmware', 'hyperv'):
+ # SSH into SSVMs is done via management server for Vmware and
+ # Hyper-V
+ linklocal_ip = cpvm.privateip
+ result = get_process_status(
+ self.apiclient.connection.mgtSvr,
+ 22,
+ self.apiclient.connection.user,
+ self.apiclient.connection.passwd,
+ cpvm.privateip,
+ "cat /var/cache/cloud/cmdline | xargs | sed \"s/ /\\n/g\" | grep eth0ip= | sed \"s/\=/ /g\" | awk '{print $2}'",
+ hypervisor=self.hypervisor
+ )
+ else:
+ try:
+ linklocal_ip = cpvm.linklocalip
+ host.user, host.passwd = get_host_credentials(
+ self.config, host.ipaddress)
+ result = get_process_status(
+ host.ipaddress,
+ 22,
+ host.user,
+ host.passwd,
+ cpvm.linklocalip,
+ "cat /var/cache/cloud/cmdline | xargs | sed \"s/ /\\n/g\" | grep eth0ip= | sed \"s/\=/ /g\" | awk '{print $2}'"
+ )
+ except KeyError:
+ self.skipTest(
+ "Marvin configuration has no host\
+ credentials to check router services")
+ res = result[0]
+ self.debug("Cached Link Local IP: %s" % res)
+ self.assertEqual(
+ linklocal_ip,
+ res,
+ "The cached Link Local should be the same as the current Link Local IP, but they are different! Current ==> %s; Cached ==> %s " % (linklocal_ip, res)
+ )
+
return
@attr(
@@ -817,7 +906,7 @@ class TestSSVMs(cloudstackTestCase):
old_public_ip,
"Check Public IP after reboot with that of before reboot"
)
-
+
# Private IP Address of System VMs are allowed to change after reboot - CLOUDSTACK-7745
# Wait for the agent to be up
[2/4] git commit: updated refs/heads/master to e7638c0
Posted by re...@apache.org.
CLOUDSTACK-8933 - Replace infinite loop by a for loop
- The loop will also sleep in between iterations, waiting for a couple of seconds and being multiplied by factor 2 per iteration
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/698171d2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/698171d2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/698171d2
Branch: refs/heads/master
Commit: 698171d210affcface5c38a88ca39fe8b4fc42a0
Parents: ac68f2a
Author: Wilder Rodrigues <wr...@schubergphilis.com>
Authored: Wed Oct 21 09:58:35 2015 +0200
Committer: Wilder Rodrigues <wr...@schubergphilis.com>
Committed: Wed Oct 21 11:10:37 2015 +0200
----------------------------------------------------------------------
.../debian/config/etc/init.d/cloud-early-config | 38 +++++++++++---------
1 file changed, 22 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/698171d2/systemvm/patches/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index d25366e..6fbedff 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -117,25 +117,31 @@ get_boot_params() {
if [ ! -e /dev/vport0p1 ]; then
log_it "/dev/vport0p1 not loaded, perhaps guest kernel is too old." && exit 2
fi
- while [ -z "$cmd" ]; do
- while read line; do
- if [[ $line == cmdline:* ]]; then
- cmd=${line//cmdline:/}
+
+ local factor=2
+ local progress=1
+ for i in {1..5}
+ do
+ while read line; do
+ if [[ $line == cmdline:* ]]; then
+ cmd=${line//cmdline:/}
echo $cmd > /var/cache/cloud/cmdline
- elif [[ $line == pubkey:* ]]; then
- pubkey=${line//pubkey:/}
- echo $pubkey > /var/cache/cloud/authorized_keys
- echo $pubkey > /root/.ssh/authorized_keys
+ elif [[ $line == pubkey:* ]]; then
+ pubkey=${line//pubkey:/}
+ echo $pubkey > /var/cache/cloud/authorized_keys
+ echo $pubkey > /root/.ssh/authorized_keys
fi
- done < /dev/vport0p1
- # In case of reboot we do not send the boot args again.
- # so need not wait for them, as the boot args are already set at startup
- if [ -s /var/cache/cloud/cmdline ]
- then
- log_it "found a non empty cmdline file continuing"
- break;
+ done < /dev/vport0p1
+ # In case of reboot we do not send the boot args again.
+ # So, no need to wait for them, as the boot args are already set at startup
+ if [ -s /var/cache/cloud/cmdline ]
+ then
+ log_it "Found a non empty cmdline file. Will now exit the loop and proceed with configuration."
+ break;
fi
- done
+ sleep ${progress}s
+ progress=$[ progress * factor ]
+ done
chmod go-rwx /root/.ssh/authorized_keys
;;
vmware)
[4/4] git commit: updated refs/heads/master to e7638c0
Posted by re...@apache.org.
Merge pull request #959 from ekholabs/pr/930-CLOUDSTACK-8933
CLOUDSTACK-8933 SSVm and CPVM do not survive a reboot from APIThis closes PR #930 as well.
I Rebased @bvbharat's PR with latest Master and tested the SSVM/CPVM and the routers: rVPC; VPC; VR; and RVR.
* pr/959:
CLOUDSTACK-8933 - Improves the the test internals of the SSVM/CPVM
CLOUDSTACK-8933 - Replace infinite loop by a for loop
CLOUDSTACK-8933 SSVm and CPVM do not survive a reboot from API
This closes #930
Signed-off-by: Remi Bergsma <gi...@remi.nl>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e7638c02
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e7638c02
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e7638c02
Branch: refs/heads/master
Commit: e7638c028864f5bd690a90126a82aee333955df2
Parents: c7ca952 ae6aa2a
Author: Remi Bergsma <gi...@remi.nl>
Authored: Wed Oct 21 23:14:13 2015 +0200
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Wed Oct 21 23:14:52 2015 +0200
----------------------------------------------------------------------
.../debian/config/etc/init.d/cloud-early-config | 33 ++++---
test/integration/smoke/test_ssvm.py | 91 +++++++++++++++++++-
2 files changed, 113 insertions(+), 11 deletions(-)
----------------------------------------------------------------------