Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOUDSTACK-9289:Automation for feature deploy vm from vmsnapshot #1417

Closed

Conversation

nitt10prashant
Copy link
Contributor

Automation for deploy vm from snapshot .
1-Test to create VM from vm snapshots without data disk
2-Deploy vm from snapshot , ssh and verify data
3-Seed template and then deploy vm and check if timeis same for vm deployment
4-Create volume from vmshnapshot and verify usage
5-Create volume from vm snapshot and download
6-Create volume from snapshot and attach to vm

test result

create volume from vmshnapshot and verify usage ... === TestName: test_01_create_volume_from_vmsnapshot | Status : SUCCESS ===
ok
create volume from vm snapshot and download ... === TestName: test_02_create_volume_from_vmsnapshot | Status : SUCCESS ===
ok
create volume from snapshot and attach to vm ... === TestName: test_03_create_volume_from_vmsnapshot | Status : SUCCESS ===
ok
Test to create VM from vm snapshots without data disk ... === TestName: test_01_create_vm_from_vmsnapshots | Status : SUCCESS ===
ok
deploy vm from snaphsot , ssh and verify data ... === TestName: test_02_create_vm_from_vmsnapshots_and_verify_data | Status : SUCCESS ===
ok
Seed template and then deploy vm and check if time ... === TestName: test_03_seed_template_from_vmsnapshot | Status : SUCCESS ===
ok


Ran 6 tests in 1781.242s

OK

raise Exception("Warning: Exception during cleanup : %s" % e)
return

@attr(tags=["basic", "advanced", "advancedns", "smoke"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Since these tests are valid only for vmware, please remove tags basic and advancedns from the tags list.

@nitt10prashant
Copy link
Contributor Author

nitt10prashant commented Mar 18, 2016

Done_bvt

@sanju1010
Copy link
Contributor

LGTM based on the code review !!

Please squash the commits into single commit.

@nitt10prashant
Copy link
Contributor Author

@cloudsadhu @pavanb018 @GabrielBrascher @sanju1010 can you please test this PR

@swill
Copy link
Contributor

swill commented Apr 22, 2016

I need one more LGTM code review on this one. I will try to test this in my lab today. Can you do a force push of this PR again to kick off jenkins so we can get this PR all green. Thanks...

changing script location from smoke to component

formatting to pep8

CLOUDSTACK-9289:removing redundant code
@nitt10prashant
Copy link
Contributor Author

@swill thanks for comment , i just did a force push

@GabrielBrascher
Copy link
Member

Based on the code review, LGTM.

@swill
Copy link
Contributor

swill commented Apr 25, 2016

CI RESULTS

Tests Run: 0
  Skipped: 0
   Failed: 0
   Errors: 1
ERROR: Failure: ImportError (cannot import name seedTemplateFromVmSnapshot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg/nose/case.py", line 132, in run
    self.beforeTest(result)
  File "/usr/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg/nose/case.py", line 74, in beforeTest
    beforeTest(self.test)
  File "/usr/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg/nose/proxy.py", line 117, in beforeTest
    self.plugins.beforeTest(self.test)
  File "/usr/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg/nose/plugins/manager.py", line 99, in __call__
    return self.call(*arg, **kw)
  File "/usr/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg/nose/plugins/manager.py", line 167, in simple
    result = meth(*arg, **kw)
  File "/usr/lib/python2.7/site-packages/marvin/marvinPlugin.py", line 174, in beforeTest
    join([self.__identifier, self.__testName])
TypeError: sequence item 0: expected string, NoneType found

Associated Uploads

/tmp/MarvinLogs/DeployDataCenter__Apr_25_2016_21_28_18_JKPEMO:

/tmp/MarvinLogs/Z09DRB:

Uploads will be available until 2016-06-25 02:00:00 +0200 CEST

Comment created by upr comment.

@nitt10prashant
Copy link
Contributor Author

nitt10prashant commented Apr 26, 2016

@swill seedTemplateFromVmSnapshot is new API got introduced with this feature , if marvin installation is up to date it should have this API @bvbharat can you please confirm if we have latest marvin installation

@swill
Copy link
Contributor

swill commented Apr 26, 2016

My CI runs the following command after it builds ACS, so it should be using an upgraded Marvin, but I did see some messages about --allow-external being deprecated, so I will review this in my setup. Thanks...

pip install --upgrade tools/marvin/dist/Marvin-*.tar.gz --allow-external mysql-connector-python

@swill
Copy link
Contributor

swill commented Apr 27, 2016

@nitt10prashant I have to admit, I am confused on this one. I have the latest Marvin installed that is generated when building this PR.

Installing Marvin
DEPRECATION: --allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.
Processing ./tools/marvin/dist/Marvin-4.9.0-SNAPSHOT.tar.gz
Requirement already up-to-date: mysql-connector-python>=1.1.6 in /usr/lib/python2.7/site-packages (from Marvin===4.9.0-SNAPSHOT)
Collecting requests>=2.2.1 (from Marvin===4.9.0-SNAPSHOT)
  Downloading requests-2.9.1-py2.py3-none-any.whl (501kB)
    100% |████████████████████████████████| 501kB 1.4MB/s 
Collecting paramiko>=1.13.0 (from Marvin===4.9.0-SNAPSHOT)
  Downloading paramiko-1.16.0-py2.py3-none-any.whl (169kB)
    100% |████████████████████████████████| 174kB 3.1MB/s 
Requirement already up-to-date: nose>=1.3.3 in /usr/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg (from Marvin===4.9.0-SNAPSHOT)
Collecting ddt>=0.4.0 (from Marvin===4.9.0-SNAPSHOT)
  Downloading ddt-1.0.1-py2.py3-none-any.whl
Collecting pyvmomi>=5.5.0 (from Marvin===4.9.0-SNAPSHOT)
  Downloading pyvmomi-6.0.0.2016.4.tar.gz (216kB)
    100% |████████████████████████████████| 225kB 2.7MB/s 
Collecting netaddr>=0.7.14 (from Marvin===4.9.0-SNAPSHOT)
  Downloading netaddr-0.7.18-py2.py3-none-any.whl (1.5MB)
    100% |████████████████████████████████| 1.5MB 614kB/s 
Collecting ecdsa>=0.11 (from paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
  Downloading ecdsa-0.13-py2.py3-none-any.whl (86kB)
    100% |████████████████████████████████| 92kB 2.5MB/s 
Requirement already up-to-date: pycrypto!=2.4,>=2.1 in /usr/lib64/python2.7/site-packages (from paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
Collecting six>=1.7.3 (from pyvmomi>=5.5.0->Marvin===4.9.0-SNAPSHOT)
  Downloading six-1.10.0-py2.py3-none-any.whl
Building wheels for collected packages: Marvin, pyvmomi
  Running setup.py bdist_wheel for Marvin ... done
  Stored in directory: /root/.cache/pip/wheels/7f/5a/37/7f723796f0a05b8f4a5eb63ebe90f381663e638e7556f46916
  Running setup.py bdist_wheel for pyvmomi ... done
  Stored in directory: /root/.cache/pip/wheels/b8/4a/84/b57aa91d338fdb54c766ef9d3c4b8d7c7a9f6b0da53e7b112d
Successfully built Marvin pyvmomi
Installing collected packages: requests, ecdsa, paramiko, ddt, six, pyvmomi, netaddr, Marvin
  Found existing installation: requests 2.6.0
    DEPRECATION: Uninstalling a distutils installed project (requests) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling requests-2.6.0:
      Successfully uninstalled requests-2.6.0
  Found existing installation: ecdsa 0.11
    DEPRECATION: Uninstalling a distutils installed project (ecdsa) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling ecdsa-0.11:
      Successfully uninstalled ecdsa-0.11
  Found existing installation: paramiko 1.12.4
    Uninstalling paramiko-1.12.4:
      Successfully uninstalled paramiko-1.12.4
  Found existing installation: six 1.9.0
    Uninstalling six-1.9.0:
      Successfully uninstalled six-1.9.0
Successfully installed Marvin-4.9.0-SNAPSHOT ddt-1.0.1 ecdsa-0.13 netaddr-0.7.18 paramiko-1.16.0 pyvmomi-6.0.0.2016.4 requests-2.9.1 six-1.10.0

I get the same result I got before, so I tried to install it manually to make sure everything was setup.

# pip install --upgrade /data/git/cs1/cloudstack/tools/marvin/dist/Marvin-*.tar.gz
Processing /data/git/cs1/cloudstack/tools/marvin/dist/Marvin-4.9.0-SNAPSHOT.tar.gz
Requirement already up-to-date: mysql-connector-python>=1.1.6 in /usr/lib/python2.7/site-packages (from Marvin===4.9.0-SNAPSHOT)
Requirement already up-to-date: requests>=2.2.1 in /usr/lib/python2.7/site-packages (from Marvin===4.9.0-SNAPSHOT)
Requirement already up-to-date: paramiko>=1.13.0 in /usr/lib/python2.7/site-packages (from Marvin===4.9.0-SNAPSHOT)
Requirement already up-to-date: nose>=1.3.3 in /usr/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg (from Marvin===4.9.0-SNAPSHOT)
Requirement already up-to-date: ddt>=0.4.0 in /usr/lib/python2.7/site-packages (from Marvin===4.9.0-SNAPSHOT)
Requirement already up-to-date: pyvmomi>=5.5.0 in /usr/lib/python2.7/site-packages (from Marvin===4.9.0-SNAPSHOT)
Requirement already up-to-date: netaddr>=0.7.14 in /usr/lib/python2.7/site-packages (from Marvin===4.9.0-SNAPSHOT)
Requirement already up-to-date: ecdsa>=0.11 in /usr/lib/python2.7/site-packages (from paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
Requirement already up-to-date: pycrypto!=2.4,>=2.1 in /usr/lib64/python2.7/site-packages (from paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
Requirement already up-to-date: six>=1.7.3 in /usr/lib/python2.7/site-packages (from pyvmomi>=5.5.0->Marvin===4.9.0-SNAPSHOT)
Building wheels for collected packages: Marvin
  Running setup.py bdist_wheel for Marvin ... done
  Stored in directory: /root/.cache/pip/wheels/7f/5a/37/7f723796f0a05b8f4a5eb63ebe90f381663e638e7556f46916
Successfully built Marvin
Installing collected packages: Marvin
  Found existing installation: Marvin 4.9.0-SNAPSHOT
    Uninstalling Marvin-4.9.0-SNAPSHOT:
      Successfully uninstalled Marvin-4.9.0-SNAPSHOT
Successfully installed Marvin-4.9.0-SNAPSHOT

I ran it again with the same result.

For the record, I don't see this command being added in this PR, just the tests to test it. Were there other files that were supposed to be added in this PR that didn't get in?

@nitt10prashant
Copy link
Contributor Author

@swill thanks for your comment and time , it seems the code is not in the master for which i have written the test script , it will take another 2 weeks to get it in , more details can be found here https://issues.apache.org/jira/browse/CLOUDSTACK-8676.

@swill
Copy link
Contributor

swill commented May 3, 2016

@nitt10prashant no problem. Thanks for the work. I just want to remind you that the 4.9 release will be frozen on May 16th, so if you want to get it into that release we need to get the code in and test it before the code freeze. Cheers...

@swill
Copy link
Contributor

swill commented May 20, 2016

@nitt10prashant any update on this one? I am very close to freezing, so I figured I would check in. Cheers...

@nitt10prashant
Copy link
Contributor Author

@swill i do not see any comment on parent ticket CLOUDSTACK-8676 , i have asked Sateesh to update the ticket , will update the PR as soon as i hear from him.

@swill
Copy link
Contributor

swill commented May 20, 2016

Ok, thanks @nitt10prashant. 👍

@sateesh-chodapuneedi
Copy link
Member

Hi @nitt10prashant / @swill
Raised PR #1664 for parent ticket CLOUDSTACK-8676

@nitt10prashant
Copy link
Contributor Author

@sateesh-chodapuneedi i will close it thanks

lucas-a-martins pushed a commit to scclouds/cloudstack that referenced this pull request Jan 29, 2024
Permitir exclusão de _templates_ de _system_ VMs

Closes apache#1417

See merge request scclouds/scclouds!711
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.

None yet

5 participants