Skip to content

Allow test to run on tiny linux templates using busybox - #381

Closed
isoutham wants to merge 1 commit into
apache:masterfrom
isoutham:test_vpc_network_pfrules
Closed

isoutham wants to merge 1 commit into
apache:masterfrom
isoutham:test_vpc_network_pfrules

Conversation

@isoutham

Copy link
Copy Markdown
Contributor

When running in test environments containing netted-nested hypervisors, the centos template is a little "heavy". This test presumes that apache will be installed on the target system which is not the case with tiny linux as it is busy box based.

Just adds some extra code to detect the busy box binary and use it if it is there.

Test succeeds under KVM and Xen running tiny linux and centos.

@wilderrodrigues

Copy link
Copy Markdown
Contributor

Once travis is done I will test and merge this one.

Thanks, @isoutham

Cheers,
Wilder

@asfbot

asfbot commented Jun 10, 2015

Copy link
Copy Markdown

Remi Bergsma on dev@cloudstack.apache.org replies:
LGTM, will try to give it a test drive today. Thanks!

Sent from my iPhone
the centos template is a little "heavy". This test presumes that apache wi=
ll be installed on the target system which is not the case with tiny linux a=
s it is busy box based.
t is there.
les
r
e

@asfbot

asfbot commented Jun 10, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #354 SUCCESS
This pull request looks good

@wilderrodrigues

Copy link
Copy Markdown
Contributor

I started testing the PR.

@wilderrodrigues

Copy link
Copy Markdown
Contributor

@isoutham

The KVM tests are running. I had problems with my environment (as you might have seen on Slcak) and had to restart them. However, when I try to run the tests on XenServer62 I get the following error:

CSLog: CRITICAL: EXCEPTION: None: ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/site-packages/nose-1.3.6-py2.7.egg/nose/suite.py", line 209, in run\n self.setUp()\n', ' File "/usr/lib/python2.7/site-packages/nose-1.3.6-py2.7.egg/nose/suite.py", line 292, in setUp\n self.setupContext(ancestor)\n', ' File "/usr/lib/python2.7/site-packages/nose-1.3.6-py2.7.egg/nose/suite.py", line 315, in setupContext\n try_run(context, names)\n', ' File "/usr/lib/python2.7/site-packages/nose-1.3.6-py2.7.egg/nose/util.py", line 471, in try_run\n return func()\n', ' File "/data/git/cs2/cloudstack/test/integration/component/test_vpc_network_pfrules.py", line 195, in setUpClass\n cls.zone.id,\n', "AttributeError: 'str' object has no attribute 'id'\n"]

On line 195 we have the following:

    cls.template = get_template(
                                cls.api_client,
  195 here ===>                              cls.zone.id,
                                cls.services["ostype"]
                                )

It seems that the test can't retrieve the zone when using XenServer, which is very weird.

As I mentioned above, KVM runs just fine! Tests haven't completed yet, but everything seems okay:

====Trying SSH Connection: Host:192.168.23.5 User:root Port:22 RetryCnt:14===
====Trying SSH Connection: Host:192.168.23.5 User:root Port:22 RetryCnt:14===
===SSH to Host 192.168.23.5 port : 22 SUCCESSFUL===
===SSH to Host 192.168.23.5 port : 22 SUCCESSFUL===
=== TestName: test_02_network_services_VPC_CreatePF | Status : SUCCESS ===

Do you have any idea what that might be?

Cheers,
Wilder

@wilderrodrigues

Copy link
Copy Markdown
Contributor

@isoutham

False alarm!

The template was ready, but the configuration file was not correct: there was a typo on the command line and it was loading another configuration instead of the one I used to create the Zone.

Tests are running now.

Cheers,
Wilder

@wilderrodrigues

Copy link
Copy Markdown
Contributor

XenServer results:

Test : Create VPC PF rules on acquired public ip when VpcVirtualRouter is stopped ... === TestName: test_01_network_services_VPC_StopCreatePF | Status : SUCCESS ===
ok
Test Create VPC PF rules on acquired public ip when VpcVirtualRouter is Running ... === TestName: test_02_network_services_VPC_CreatePF | Status : SUCCESS ===
ok
Test Create multiple VPC PF rules on acquired public ip in diff't networks when VpcVirtualRouter is stopped ... === TestName: test_03_network_services_VPC_StopCreateMultiplePF | Status : SUCCESS ===
ok
Test Create multiple VPC PF rules on acquired public ip in diff't networks when VpcVirtualRouter is running ... === TestName: test_04_network_services_VPC_CreateMultiplePF | Status : SUCCESS ===
ok
Test delete a PF rule in VPC when VpcVirtualRouter is Stopped ... === TestName: test_05_network_services_VPC_StopDeletePF | Status : SUCCESS ===
ok
Test delete a PF rule in VPC when VpcVirtualRouter is Running ... === TestName: test_06_network_services_VPC_DeletePF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC when VpcVirtualRouter is Stopped ... === TestName: test_07_network_services_VPC_StopDeleteAllPF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC when VpcVirtualRouter is Running ... === TestName: test_08_network_services_VPC_DeleteAllPF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC across multiple networks when VpcVirtualRouter is Stopped ... === TestName: test_09_network_services_VPC_StopDeleteAllMultiplePF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC across multiple networks when VpcVirtualRouter is Running ... === TestName: test_10_network_services_VPC_DeleteAllMultiplePF | Status : SUCCESS ===
ok


Ran 10 tests in 4615.940s

KVM results:

Test : Create VPC PF rules on acquired public ip when VpcVirtualRouter is stopped ... === TestName: test_01_network_services_VPC_StopCreatePF | Status : SUCCESS ===
ok
Test Create VPC PF rules on acquired public ip when VpcVirtualRouter is Running ... === TestName: test_02_network_services_VPC_CreatePF | Status : SUCCESS ===
ok
Test Create multiple VPC PF rules on acquired public ip in diff't networks when VpcVirtualRouter is stopped ... === TestName: test_03_network_services_VPC_StopCreateMultiplePF | Status : FAILED ===
FAIL
Test Create multiple VPC PF rules on acquired public ip in diff't networks when VpcVirtualRouter is running ... === TestName: test_04_network_services_VPC_CreateMultiplePF | Status : SUCCESS ===
ok
Test delete a PF rule in VPC when VpcVirtualRouter is Stopped ... === TestName: test_05_network_services_VPC_StopDeletePF | Status : SUCCESS ===
ok
Test delete a PF rule in VPC when VpcVirtualRouter is Running ... === TestName: test_06_network_services_VPC_DeletePF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC when VpcVirtualRouter is Stopped ... === TestName: test_07_network_services_VPC_StopDeleteAllPF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC when VpcVirtualRouter is Running ... === TestName: test_08_network_services_VPC_DeleteAllPF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC across multiple networks when VpcVirtualRouter is Stopped ... === TestName: test_09_network_services_VPC_StopDeleteAllMultiplePF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC across multiple networks when VpcVirtualRouter is Running ... === TestName: test_10_network_services_VPC_DeleteAllMultiplePF | Status : SUCCESS ===
ok

FAIL: Test Create multiple VPC PF rules on acquired public ip in diff't networks when VpcVirtualRouter is stopped

@isoutham

1 test failed on KVM with the following trace:

Traceback (most recent call last):
File "/root/dev/cloudstack/test/integration/component/test_vpc_network_pfrules.py", line 607, in test_03_network_services_VPC_StopCreateMultiplePF
self.check_ssh_into_vm(vm_2, public_ip_2, testnegative=False)
File "/root/dev/cloudstack/test/integration/component/test_vpc_network_pfrules.py", line 327, in check_ssh_into_vm
self.fail("Failed to SSH into VM - %s" % (public_ip.ipaddress.ipaddress))
AssertionError: Failed to SSH into VM - 192.168.23.6

Perhaps that was due to the slowness of the KVM machines.

Is that okay with you if I merge the PR?

Cheers,
Wilder

@isoutham

Copy link
Copy Markdown
Contributor Author

Hi,

Yes merge it please. Test 03 does not fail to me. Might be an idea to
increase the retry count for people running slow ivm systems. I will look
into that and generate another PR if necessary.

Thanks
Ian

On 10 June 2015 at 21:46, Wilder Rodrigues notifications@github.com wrote:

XenServer results:

Test : Create VPC PF rules on acquired public ip when VpcVirtualRouter is
stopped ... === TestName: test_01_network_services_VPC_StopCreatePF |
Status : SUCCESS ===
ok
Test Create VPC PF rules on acquired public ip when VpcVirtualRouter is
Running ... === TestName: test_02_network_services_VPC_CreatePF | Status :
SUCCESS ===
ok
Test Create multiple VPC PF rules on acquired public ip in diff't networks
when VpcVirtualRouter is stopped ... === TestName:
test_03_network_services_VPC_StopCreateMultiplePF | Status : SUCCESS ===
ok
Test Create multiple VPC PF rules on acquired public ip in diff't networks
when VpcVirtualRouter is running ... === TestName:
test_04_network_services_VPC_CreateMultiplePF | Status : SUCCESS ===
ok
Test delete a PF rule in VPC when VpcVirtualRouter is Stopped ... ===
TestName: test_05_network_services_VPC_StopDeletePF | Status : SUCCESS ===
ok
Test delete a PF rule in VPC when VpcVirtualRouter is Running ... ===
TestName: test_06_network_services_VPC_DeletePF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC when VpcVirtualRouter is Stopped ... ===

TestName: test_07_network_services_VPC_StopDeleteAllPF | Status : SUCCESS

ok
Test delete all PF rules in VPC when VpcVirtualRouter is Running ... ===
TestName: test_08_network_services_VPC_DeleteAllPF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC across multiple networks when
VpcVirtualRouter is Stopped ... === TestName:
test_09_network_services_VPC_StopDeleteAllMultiplePF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC across multiple networks when
VpcVirtualRouter is Running ... === TestName:
test_10_network_services_VPC_DeleteAllMultiplePF | Status : SUCCESS ===

ok

Ran 10 tests in 4615.940s

KVM results:

Test : Create VPC PF rules on acquired public ip when VpcVirtualRouter is
stopped ... === TestName: test_01_network_services_VPC_StopCreatePF |
Status : SUCCESS ===
ok
Test Create VPC PF rules on acquired public ip when VpcVirtualRouter is
Running ... === TestName: test_02_network_services_VPC_CreatePF | Status :
SUCCESS ===
ok
Test Create multiple VPC PF rules on acquired public ip in diff't networks
when VpcVirtualRouter is stopped ... === TestName:
test_03_network_services_VPC_StopCreateMultiplePF | Status : FAILED ===
FAIL
Test Create multiple VPC PF rules on acquired public ip in diff't networks
when VpcVirtualRouter is running ... === TestName:
test_04_network_services_VPC_CreateMultiplePF | Status : SUCCESS ===
ok
Test delete a PF rule in VPC when VpcVirtualRouter is Stopped ... ===
TestName: test_05_network_services_VPC_StopDeletePF | Status : SUCCESS ===
ok
Test delete a PF rule in VPC when VpcVirtualRouter is Running ... ===
TestName: test_06_network_services_VPC_DeletePF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC when VpcVirtualRouter is Stopped ... ===

TestName: test_07_network_services_VPC_StopDeleteAllPF | Status : SUCCESS

ok
Test delete all PF rules in VPC when VpcVirtualRouter is Running ... ===
TestName: test_08_network_services_VPC_DeleteAllPF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC across multiple networks when
VpcVirtualRouter is Stopped ... === TestName:
test_09_network_services_VPC_StopDeleteAllMultiplePF | Status : SUCCESS ===
ok
Test delete all PF rules in VPC across multiple networks when
VpcVirtualRouter is Running ... === TestName:
test_10_network_services_VPC_DeleteAllMultiplePF | Status : SUCCESS ===
ok
FAIL: Test Create multiple VPC PF rules on acquired public ip in diff't
networks when VpcVirtualRouter is stopped

@isoutham https://github.com/isoutham

1 test failed on KVM with the following trace:

Traceback (most recent call last):
File
"/root/dev/cloudstack/test/integration/component/test_vpc_network_pfrules.py",
line 607, in test_03_network_services_VPC_StopCreateMultiplePF
self.check_ssh_into_vm(vm_2, public_ip_2, testnegative=False)
File
"/root/dev/cloudstack/test/integration/component/test_vpc_network_pfrules.py",
line 327, in check_ssh_into_vm
self.fail("Failed to SSH into VM - %s" % (public_ip.ipaddress.ipaddress))
AssertionError: Failed to SSH into VM - 192.168.23.6

Perhaps that was due to the slowness of the KVM machines.

Is that okay with you if I merge the PR?

Cheers,
Wilder

—
Reply to this email directly or view it on GitHub
#381 (comment).

@wilderrodrigues

Copy link
Copy Markdown
Contributor

Super!

Thanks! :)

@asfgit asfgit closed this in 7ba2f22 Jun 10, 2015
kishankavala pushed a commit to kishankavala/cloudstack that referenced this pull request Jun 25, 2015
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes apache#381
yadvr pushed a commit that referenced this pull request Jan 20, 2021
Fixes #381

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants