You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by pritisarap12 <gi...@git.apache.org> on 2015/12/09 10:38:36 UTC

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

GitHub user pritisarap12 opened a pull request:

    https://github.com/apache/cloudstack/pull/1199

    CLOUDSTACK-9128: Testcase to verify physical_size attribute of snapshot_store_ref table 

    Verify if physical_size attribute of snapshot_store_ref table stores actual physical size of the snapshot 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/pritisarap12/cloudstack CLOUDSTACK-9128-Testcase-to-verify-if-snapshot_store_ref-table-stores-actual-size-of-back-snapshot-in-secondary-storage

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1199.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1199
    
----
commit be88dacf1e5890a176abaed09bcc325fb3684a51
Author: Priti Sarap <pr...@clogeny.com>
Date:   2015-12-09T09:34:50Z

    CLOUDSTACK-9128: Testcase to verify if snapshot_store_ref table stores actual size of back snapshot in secondary storage

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by remibergsma <gi...@git.apache.org>.
Github user remibergsma commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1199#discussion_r47431243
  
    --- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
    @@ -358,3 +362,129 @@ def test_01_storage_snapshots_limits(self):
             )
     
             return
    +
    +    @attr(tags=["advanced", "basic"], required_hardware="true")
    +    def test_02_snapshot_size_check(self):
    +        """ Check Snapshots size in database
    +            1. Create file on ROOT disk of deployed VM.
    +            2. Create Snapshot of ROOT disk.
    +            3. Check if physiacal_size parameter of snapshot_store_ref table
    +               has physical size of snapshot
    +        """
    +        if self.hypervisor.lower() not in ["xenserver", "vmware"]:
    +            self.skipTest("Test not to be run on %s" % self.hypervisor)
    +
    +        root_volumes_list = list_volumes(
    +            self.apiclient,
    +            virtualmachineid=self.vm.id,
    +            type=ROOT,
    +            listall=True
    +        )
    +
    +        status = validateList(root_volumes_list)
    +        self.assertEqual(
    +            status[0],
    +            PASS,
    +            "Check listVolumes response for ROOT Disk")
    +
    +        root_volume = root_volumes_list[0]
    +
    +        # Get Secondary Storage Value from Database
    +        qryresult_before_snapshot = self.dbclient.execute(
    +            " select id, account_name, secondaryStorageTotal\
    +                    from account_view where account_name = '%s';" %
    +            self.account.name)
    +
    +        self.assertNotEqual(
    +            len(qryresult_before_snapshot),
    +            0,
    +            "Check sql query to return SecondaryStorageTotal of account")
    +
    +        storage_qry_result_old = qryresult_before_snapshot[0]
    +        secondary_storage_old = storage_qry_result_old[2]
    +
    +        createChecksum(
    +            self.testdata,
    +            self.vm,
    +            root_volume,
    +            "rootdiskdevice")
    +
    +        time.sleep(30)
    --- End diff --
    
    Can you please explain why we wait 30s here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by pritisarap12 <gi...@git.apache.org>.
Github user pritisarap12 commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1199#discussion_r47465693
  
    --- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
    @@ -358,3 +362,129 @@ def test_01_storage_snapshots_limits(self):
             )
     
             return
    +
    +    @attr(tags=["advanced", "basic"], required_hardware="true")
    +    def test_02_snapshot_size_check(self):
    +        """ Check Snapshots size in database
    +            1. Create file on ROOT disk of deployed VM.
    +            2. Create Snapshot of ROOT disk.
    +            3. Check if physiacal_size parameter of snapshot_store_ref table
    +               has physical size of snapshot
    +        """
    +        if self.hypervisor.lower() not in ["xenserver", "vmware"]:
    +            self.skipTest("Test not to be run on %s" % self.hypervisor)
    --- End diff --
    
    Here we are running the test for Xenserver and VMWare  i.e. skip the test if the hypervisor is not XS or VMWare .
    So the test run on Xenserver.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by cristofolini <gi...@git.apache.org>.
Github user cristofolini commented on the pull request:

    https://github.com/apache/cloudstack/pull/1199#issuecomment-181041357
  
    @pritisarap12 Could you please rebase this against the current master?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by pvr9711 <gi...@git.apache.org>.
Github user pvr9711 commented on the pull request:

    https://github.com/apache/cloudstack/pull/1199#issuecomment-166878523
  
    @remibergsma can you merge these changes?  thanks, Raja


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by nitt10prashant <gi...@git.apache.org>.
Github user nitt10prashant commented on the pull request:

    https://github.com/apache/cloudstack/pull/1199#issuecomment-172463466
  
    LGTM
    based on code review 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by sanju1010 <gi...@git.apache.org>.
Github user sanju1010 commented on the pull request:

    https://github.com/apache/cloudstack/pull/1199#issuecomment-168940359
  
    LGTM !!
    
    Test Results:
    ===========
    Check Snapshots size in database ... === TestName: test_02_snapshot_size_check | Status : SUCCESS === 
    ok  
    ---------------------------------------------------------------------- 
    Ran 1 tests in 385.302s  
    OK 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by pritisarap12 <gi...@git.apache.org>.
Github user pritisarap12 commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1199#discussion_r47465783
  
    --- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
    @@ -358,3 +362,129 @@ def test_01_storage_snapshots_limits(self):
             )
     
             return
    +
    +    @attr(tags=["advanced", "basic"], required_hardware="true")
    +    def test_02_snapshot_size_check(self):
    +        """ Check Snapshots size in database
    +            1. Create file on ROOT disk of deployed VM.
    +            2. Create Snapshot of ROOT disk.
    +            3. Check if physiacal_size parameter of snapshot_store_ref table
    +               has physical size of snapshot
    +        """
    +        if self.hypervisor.lower() not in ["xenserver", "vmware"]:
    +            self.skipTest("Test not to be run on %s" % self.hypervisor)
    +
    +        root_volumes_list = list_volumes(
    +            self.apiclient,
    +            virtualmachineid=self.vm.id,
    +            type=ROOT,
    +            listall=True
    +        )
    +
    +        status = validateList(root_volumes_list)
    +        self.assertEqual(
    +            status[0],
    +            PASS,
    +            "Check listVolumes response for ROOT Disk")
    +
    +        root_volume = root_volumes_list[0]
    +
    +        # Get Secondary Storage Value from Database
    +        qryresult_before_snapshot = self.dbclient.execute(
    +            " select id, account_name, secondaryStorageTotal\
    +                    from account_view where account_name = '%s';" %
    +            self.account.name)
    +
    +        self.assertNotEqual(
    +            len(qryresult_before_snapshot),
    +            0,
    +            "Check sql query to return SecondaryStorageTotal of account")
    +
    +        storage_qry_result_old = qryresult_before_snapshot[0]
    +        secondary_storage_old = storage_qry_result_old[2]
    +
    +        createChecksum(
    +            self.testdata,
    +            self.vm,
    +            root_volume,
    +            "rootdiskdevice")
    +
    +        time.sleep(30)
    --- End diff --
    
    createChecksum function logins the VM and performs some operation on VM disk which takes some time, so wait for 30s is added there.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by pritisarap12 <gi...@git.apache.org>.
Github user pritisarap12 commented on the pull request:

    https://github.com/apache/cloudstack/pull/1199#issuecomment-182284142
  
    Rebased with current master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cloudstack/pull/1199


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by remibergsma <gi...@git.apache.org>.
Github user remibergsma commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1199#discussion_r47431233
  
    --- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
    @@ -358,3 +362,129 @@ def test_01_storage_snapshots_limits(self):
             )
     
             return
    +
    +    @attr(tags=["advanced", "basic"], required_hardware="true")
    +    def test_02_snapshot_size_check(self):
    +        """ Check Snapshots size in database
    +            1. Create file on ROOT disk of deployed VM.
    +            2. Create Snapshot of ROOT disk.
    +            3. Check if physiacal_size parameter of snapshot_store_ref table
    +               has physical size of snapshot
    +        """
    +        if self.hypervisor.lower() not in ["xenserver", "vmware"]:
    +            self.skipTest("Test not to be run on %s" % self.hypervisor)
    --- End diff --
    
    Why can't this run on xenserver?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by remibergsma <gi...@git.apache.org>.
Github user remibergsma commented on the pull request:

    https://github.com/apache/cloudstack/pull/1199#issuecomment-172248830
  
    @pvr9711 I guess you know what we need before merge, don't you? ;-)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by shwetaag <gi...@git.apache.org>.
Github user shwetaag commented on the pull request:

    https://github.com/apache/cloudstack/pull/1199#issuecomment-179035607
  
    Did code review. Code looks  good to me


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9128: Testcase to verify physi...

Posted by pritisarap12 <gi...@git.apache.org>.
Github user pritisarap12 commented on the pull request:

    https://github.com/apache/cloudstack/pull/1199#issuecomment-163163707
  
    Testcase result:
    
    Check Snapshots size in database ... === TestName: test_02_snapshot_size_check | Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 1 test in 337.826s
    
    OK


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---