Repository navigation
Smoketests are failing if run on Ubuntu 22.04 and python version (3.10.6) #7443
Copy link
Copy link
Closed
Milestone
Description
ISSUE TYPE
- Bug Report
COMPONENT NAME
Testing
CLOUDSTACK VERSION
N/A
CONFIGURATION
N/A
OS / ENVIRONMENT
Ubuntu 22.0.4
SUMMARY
Smoketests are failing if run on Ubuntu 22.04 and python version (3.10.6)
In the #6978 , Dockerfile was updated to use Ubuntu 22.0.4
In Ubuntu 22.04 the python version is
root@6c66e082ef0c:~# python --version
Python 3.10.6
In Ubuntu 20.0.4 the python version is
root@6c6890001b5b:~# python --version
Python 3.8.10
STEPS TO REPRODUCE
Deploy latest docker image for the cloudstack-simulator which based on Ubuntu 22.0.4
- docker run --name simulator -p 8080:5050 -d apache/cloudstack-simulator:4.19.0.0-SNAPSHOT-20230411-063947
Deploy a datacenter
- docker exec -it simulator python /root/tools/marvin/marvin/deployDataCenter.py -i /root/setup/dev/advanced.cfg
Run a sample smoke test
- docker exec -it simulator nosetests -v --with-marvin --marvin-config=setup/dev/advanced.cfg --with-xunit --xunit-file=xunit.xml -a tags=advanced,required_hardware=false --zone=Sandbox-simulator --hypervisor=simulator test/integration/smoke/test_vm_life_cycle.py
==== Marvin Init Started ====
=== Marvin Parse Config Successful ===
=== Marvin Setting TestData Successful===
==== Log Folder Path: /tmp/MarvinLogs/Apr_17_2023_06_56_34_IHX5TS All logs will be available here ====
=== Marvin Init Logging Successful===
==== Marvin Init Successful ====
Traceback (most recent call last):
File "/usr/local/bin/nosetests", line 8, in <module>
sys.exit(run_exit())
File "/usr/local/lib/python3.10/dist-packages/nose/core.py", line 118, in __init__
unittest.TestProgram.__init__(
File "/usr/lib/python3.10/unittest/main.py", line 100, in __init__
self.parseArgs(argv)
File "/usr/local/lib/python3.10/dist-packages/nose/core.py", line 179, in parseArgs
self.createTests()
File "/usr/local/lib/python3.10/dist-packages/nose/core.py", line 193, in createTests
self.test = self.testLoader.loadTestsFromNames(self.testNames)
File "/usr/local/lib/python3.10/dist-packages/nose/loader.py", line 481, in loadTestsFromNames
return unittest.TestLoader.loadTestsFromNames(self, names, module)
File "/usr/lib/python3.10/unittest/loader.py", line 220, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/lib/python3.10/unittest/loader.py", line 220, in <listcomp>
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/local/lib/python3.10/dist-packages/nose/loader.py", line 431, in loadTestsFromName
return self.loadTestsFromModule(
File "/usr/local/lib/python3.10/dist-packages/nose/loader.py", line 329, in loadTestsFromModule
elif isfunction(test) and self.selector.wantFunction(test):
File "/usr/local/lib/python3.10/dist-packages/nose/selector.py", line 149, in wantFunction
plug_wants = self.plugins.wantFunction(function)
File "/usr/local/lib/python3.10/dist-packages/nose/plugins/manager.py", line 99, in __call__
return self.call(*arg, **kw)
File "/usr/local/lib/python3.10/dist-packages/nose/plugins/manager.py", line 167, in simple
result = meth(*arg, **kw)
File "/usr/local/lib/python3.10/dist-packages/nose/plugins/attrib.py", line 278, in wantFunction
return self.validateAttrib(function)
File "/usr/local/lib/python3.10/dist-packages/nose/plugins/attrib.py", line 242, in validateAttrib
if isinstance(value, collections.Callable):
AttributeError: module 'collections' has no attribute 'Callable'
EXPECTED RESULTS
The smoke tests should pass suucessfully on Ubuntu 22.04 and python version 3.10.6
ACTUAL RESULTS
The smoke tests fail on Ubuntu 22.04 and python version 3.10.6
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
kiranchavala commentedon Apr 18, 2023
The dockerfile (/tools/docker/Dockerfile) should be updated with the python version 3.8.10
curl https://pyenv.run | bash
export PATH="$HOME/.pyenv/bin:$PATH" && eval "$(pyenv init --path)" && echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
pyenv install 3.8.10
pyenv global 3.8.10
python --version
exec $SHELL
yadvr commentedon Apr 19, 2023
It is known that python 3.8.x should be used; pyenv can be used to install speciifc version. However, we should fix marvin and tests to work with future versions of py3.x longer-term.
yadvr commentedon Apr 19, 2023
Closing this as it dupes #6962 @kiranchavala thanks for putting your notes in. I'll add link to this issue in #6962.