Skip to content

Conversation

@koushik-das
Copy link
Contributor

…emplates doesn't get cleaned up after the SSVM handling it is destroyed

Fixed template sync code to include templates in 'NotUploaded' and 'UploadInProgress' states along with 'Active'.

…emplates doesn't get cleaned up after the SSVM handling it is destroyed

Fixed template sync code to include templates in 'NotUploaded' and 'UploadInProgress' states along with 'Active'.
@koushik-das
Copy link
Contributor Author

Test browser based incomplete template upload, followed by SSVM destroy. Template should go to UploadAbandoned state and get cleaned up. ... === TestName: test_browser_upload_template_incomplete | Status : SUCCESS ===
ok


Ran 1 test in 111.128s

OK

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an assert for UploadAbandoned state of the template? Right now we are just asserting that the template is not active

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will not be possible to test for UploadAbandoned/Error as storage GC thread will run and move the templates to Inactive state. It is difficult to control at what point the storage GC thread runs and the assert needs happen before that.

Thats why I am only asserting that the template is cleaned up at the end of the test. The destroy_ssvm() ensures that storage GC runs at least once after the template sync is done.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@karuturi
Copy link
Member

looks good 👍

@koushik-das
Copy link
Contributor Author

Need one more LGTM. Anyone?

@DaanHoogland
Copy link
Contributor

still running simulator, code lgtm

@wido
Copy link
Contributor

wido commented Jul 27, 2015

I think this one can be merged after simulator is done, right?

@koushik-das
Copy link
Contributor Author

@DaanHoogland Are you running some private simulator test? If so is it done?

@asfbot
Copy link

asfbot commented Jul 27, 2015

Daan Hoogland on [email protected] replies:
can't find a config that runs. I can do with some help. last state was:

\sbpltc2kag3qr\dhoogland:~/cloudstack/cloudstack/test/integration
(CLOUDSTACK-8651)> nosetests --with-marvin
--marvin-config=../../tools/devcloud/devcloud.cfg -s -a
tags=advanced,required_hardware=false
component/test_browse_templates.py

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /tmp//MarvinLogs//Jul_27_2015_13_59_07_QHRK18.
All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
=== TestName: None | Status : EXCEPTION ===

===final results are now copied to: /tmp//MarvinLogs/test_suite_IGW70H===
\sbpltc2kag3qr\dhoogland:~/cloudstack/cloudstack/test/integration
(CLOUDSTACK-8651)> cat /tmp//MarvinLogs/test_suite_IGW70H/results.txt
=== TestName: None | Status : EXCEPTION ===
ERROR

ERROR: test suite for <class

'integration.component.test_browse_templates.TestBrowseUploadVolume'>

Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/nose/suite.py", line 209, in run
self.setUp()
File "/usr/local/lib/python2.7/site-packages/nose/suite.py", line
292, in setUp
self.setupContext(ancestor)
File "/usr/local/lib/python2.7/site-packages/nose/suite.py", line
315, in setupContext
try_run(context, names)
File "/usr/local/lib/python2.7/site-packages/nose/util.py", line
471, in try_run
return func()
File "/Users/dhoogland/cloudstack/cloudstack/test/integration/component/test_browse_templates.py",
line 84, in setUpClass
cls.uploadurl=cls.testdata["configurableData"]["browser_upload_template"][cls.uploadtemplateformat]["url"]
KeyError: 'browser_upload_template'
-------------------- >> begin captured logging << --------------------
CSLog: DEBUG: Payload: {'apiKey':
u'isVbffFSr5b7cheL713XiijhtId9I_2HLhlzHaH5psSyWNjlm2SBZB_ubyR4lhS_U8yioUdL58gav-5mP5yA',
'command': 'listHosts', 'signature': 'Tm5IjuItrAMIg9ElRcLFQIb885Q=',
'type': 'Routing', 'response': 'json'}
CSLog: DEBUG: ========Sending GET Cmd : listHosts=======
requests.packages.urllib3.connectionpool: INFO: Starting new HTTP
connection (1): 127.0.0.1
requests.packages.urllib3.connectionpool: DEBUG: "GET
/client/api?type=Routing&apiKey=isVbffFSr5b7cheL713XiijhtId9I_2HLhlzHaH5psSyWNjlm2SBZB_ubyR4lhS_U8yioUdL58gav-5mP5yA&command=listHosts&response=json&signature=Tm5IjuItrAMIg9ElRcLFQIb885Q%3D
HTTP/1.1" 200 3083
CSLog: DEBUG: Response : [{cpuwithoverprovisioning : u'32000.0',
version : u'4.6.0-SNAPSHOT', memorytotal : 8589934592, zoneid :
u'7171e8fc-ca86-47d3-9ba4-58fdd9001196', cpunumber : 4,
managementserverid : 4278190080, cpuallocated : u'0%', memoryused : 0,
id : u'204677ca-dc48-4d38-abc5-b2be753758cf', cpuused : u'0%',
clusterid : u'8d2759a2-cbc2-4288-b6cb-aeafe3b3dc64', capabilities :
u'hvm', state : u'Up', memoryallocated : 0, networkkbswrite : 16384,
cpuspeed : 8000, type : u'Routing', events : u'ManagementServerDown;
AgentDisconnected; HostDown; Remove; Ping; AgentConnected;
StartAgentRebalance; PingTimeout; ShutdownRequested', zonename :
u'Sandbox-simulator', podid : u'1576694a-d70b-494a-b6fa-76b919892a39',
clustertype : u'CloudManaged', hahost : False, lastpinged :
u'1970-01-17T07:04:53+0100', ipaddress : u'172.16.15.15', name :
u'SimulatedAgent.3228f38e-541b-4a9a-87d6-1e0c46f9385c', networkkbsread
: 32768, created : u'2015-07-27T13:28:18+0200', clustername : u'C1',
hypervisor : u'Simulator', islocalstorageactive : False, resourcestate
: u'Enabled', podname : u'POD0'}, {cpuwithoverprovisioning :
u'32000.0', version : u'4.6.0-SNAPSHOT', memorytotal : 8589934592,
zoneid : u'7171e8fc-ca86-47d3-9ba4-58fdd9001196', cpunumber : 4,
managementserverid : 4278190080, cpuallocated : u'3.12%', memoryused :
0, id : u'78e50eaa-8ff8-4fd8-b050-18357c16711a', cpuused : u'0%',
clusterid : u'0689d8ed-7d46-4f0b-a4fc-c5931aab969a', capabilities :
u'hvm', state : u'Up', memoryallocated : 1610612736, networkkbswrite :
16384, cpuspeed : 8000, type : u'Routing', events :
u'ManagementServerDown; AgentDisconnected; HostDown; Remove; Ping;
AgentConnected; StartAgentRebalance; PingTimeout; ShutdownRequested',
zonename : u'Sandbox-simulator', podid :
u'1576694a-d70b-494a-b6fa-76b919892a39', clustertype :
u'CloudManaged', hahost : False, lastpinged :
u'1970-01-17T07:04:53+0100', ipaddress : u'172.16.15.14', name :
u'SimulatedAgent.8d99aff4-f3e5-4d15-9c5e-2321d0d9b0eb', networkkbsread
: 32768, created : u'2015-07-27T13:27:18+0200', clustername : u'C0',
hypervisor : u'Simulator', islocalstorageactive : False, resourcestate
: u'Enabled', podname : u'POD0'}, {cpuwithoverprovisioning :
u'32000.0', version : u'4.6.0-SNAPSHOT', memorytotal : 8589934592,
zoneid : u'7171e8fc-ca86-47d3-9ba4-58fdd9001196', cpunumber : 4,
managementserverid : 4278190080, cpuallocated : u'0%', memoryused : 0,
id : u'6f53ae39-0d83-4222-a88c-56432ef80e0a', cpuused : u'0%',
clusterid : u'0689d8ed-7d46-4f0b-a4fc-c5931aab969a', capabilities :
u'hvm', state : u'Up', memoryallocated : 0, networkkbswrite : 16384,
cpuspeed : 8000, type : u'Routing', events : u'ManagementServerDown;
AgentDisconnected; HostDown; Remove; Ping; AgentConnected;
StartAgentRebalance; PingTimeout; ShutdownRequested', zonename :
u'Sandbox-simulator', podid : u'1576694a-d70b-494a-b6fa-76b919892a39',
clustertype : u'CloudManaged', hahost : False, lastpinged :
u'1970-01-17T07:04:53+0100', ipaddress : u'172.16.15.8', name :
u'SimulatedAgent.3f4e47b0-3082-4b39-8257-37f4c00fa188', networkkbsread
: 32768, created : u'2015-07-27T13:27:17+0200', clustername : u'C0',
hypervisor : u'Simulator', islocalstorageactive : False, resourcestate
: u'Enabled', podname : u'POD0'}]
CSLog: CRITICAL: EXCEPTION: None: ['Traceback (most recent call
last):\n', ' File
"/usr/local/lib/python2.7/site-packages/nose/suite.py", line 209, in
run\n self.setUp()\n', ' File
"/usr/local/lib/python2.7/site-packages/nose/suite.py", line 292, in
setUp\n self.setupContext(ancestor)\n', ' File
"/usr/local/lib/python2.7/site-packages/nose/suite.py", line 315, in
setupContext\n try_run(context, names)\n', ' File
"/usr/local/lib/python2.7/site-packages/nose/util.py", line 471, in
try_run\n return func()\n', ' File
"/Users/dhoogland/cloudstack/cloudstack/test/integration/component/test_browse_templates.py",
line 84, in setUpClass\n
cls.uploadurl=cls.testdata["configurableData"]["browser_upload_template"][cls.uploadtemplateformat]["url"]\n',
"KeyError: 'browser_upload_template'\n"]
--------------------- >> end captured logging << ---------------------

@DaanHoogland
Copy link
Contributor

never mind that last bot-comment, i found a working config its running. will get results in a minute. if impatient and a hero, go with your own result ;)

@sailajamada
Copy link

Hi ,

I have fixed the test data file to move the browser volume/template specific data from "configurableData” section.

But automation script is still pointing the data to "configurableData” section :

Ex:

84 cls.uploadurl=cls.testdata["configurableData"]["browser_upload_template"][cls.uploadtemplateformat]["url"]
85 cls.templatename=cls.testdata["configurableData"]["browser_upload_template"][cls.uploadtemplateformat]["templatename"]
86 cls.md5sum=cls.testdata["configurableData"]["browser_upload_template"][cls.uploadtemplateformat]["checksum"]
87 cls.templatedisplaytext=cls.testdata["configurableData"]["browser_upload_template"][cls.uploadtemplateformat]["displaytext"]
88 cls.templatehypervisor=cls.testdata["configurableData"]["browser_upload_template"][cls.uploadtemplateformat]["hypervisor"]
89 cls.templateostypeid=cls.testdata["configurableData"]["browser_upload_template"][cls.uploadtemplateformat]["ostypeid"]

This needs to be fixed. I am yet to work on it.

Thanks,
Sailaja.M

@DaanHoogland
Copy link
Contributor

I would like to see the test run pass but don't think it is fair that this should be blocked by an older error in test code. @koushik-das please comment on how you executed the test and you have my lgtm

@koushik-das
Copy link
Contributor Author

@DaanHoogland I will create a separate test file with new the test case for now. Once the issues in test_browse_templates.py are fixed, will merge it back later on.

@koushik-das
Copy link
Contributor Author

Moved the test to a new file test_browse_templates2.py. This is the command to run it

nosetests-2.7 --with-marvin --marvin-config=setup/dev/advanced.cfg --with-xunit --xunit-file=test_output.xml test/integration/component/test_browse_templates2.py -a required_hardware=false --zone=Sandbox-simulator --hypervisor=simulator

@asfbot
Copy link

asfbot commented Jul 29, 2015

cloudstack-pull-rats #140 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Jul 29, 2015

cloudstack-pull-requests #838 UNSTABLE
Looks like there's a problem with this pull request

@asfbot
Copy link

asfbot commented Jul 29, 2015

cloudstack-pull-analysis #73 SUCCESS
This pull request looks good

@DaanHoogland
Copy link
Contributor

thanks @koushik-das , as the test issue is being addressed now please don't let it block this PR

for the record, the extra test runs as the innocent bystander might expect.

@asfgit asfgit closed this in 5adfc1c Jul 29, 2015
@koushik-das koushik-das deleted the CLOUDSTACK-8651 branch July 29, 2015 08:13
maneesha-p pushed a commit to maneesha-p/cloudstack that referenced this pull request Jul 31, 2015
rohityadavcloud pushed a commit that referenced this pull request Jan 20, 2021
CloudStack PR: #4175

Signed-off-by: Rohit Yadav <[email protected]>
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.

6 participants