You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by nitt10prashant <gi...@git.apache.org> on 2015/08/25 14:42:20 UTC

[GitHub] cloudstack pull request: [Automation]Volume migration between pool...

GitHub user nitt10prashant opened a pull request:

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

    [Automation]Volume migration between pools times out in ACS, but  but the migration completes on Xenserve

    
    Ticket :CLOUDSTACK-8771
    
    description:
    Volume migration between pools times out in ACS, but the migration completes on Xenserver
    
    steps:
    ---------
    
    test results
    ========
    put storage in maintenance mode and start ha vm and check usage ... === TestName: test_migrate_volume_timeout | Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 1 test in 250.958s
    
    OK


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

    $ git pull https://github.com/nitt10prashant/cloudstack migrate_volume

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

    https://github.com/apache/cloudstack/pull/742.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 #742
    
----
commit d7f1f4b0c0b95f127be8353854e8d3d1cb609fb6
Author: nitt10prashant <ni...@gmail.com>
Date:   2015-08-25T12:25:11Z

    CLOUDSTACK-8771:[Automation]Volume migration between pools times out in ACS, but the migration completes on Xenserver
    
    Adding descriptions

----


---
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: [Automation]Volume migration between pool...

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

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


---
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: [Automation]Volume migration between pool...

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

    https://github.com/apache/cloudstack/pull/742#issuecomment-139789289
  
    @nitt10prashant Any update on this?


---
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: [Automation]Volume migration between pool...

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

    https://github.com/apache/cloudstack/pull/742#discussion_r37950166
  
    --- Diff: test/integration/component/maint/test_migrate_volume_timeout.py ---
    @@ -0,0 +1,286 @@
    +#!/usr/bin/env python
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements.  See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership.  The ASF licenses this file
    +# to you under the Apache License, Version 2.0 (the
    +# "License"); you may not use this file except in compliance
    +# with the License.  You may obtain a copy of the License at
    +#
    +#   http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing,
    +# software distributed under the License is distributed on an
    +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +# KIND, either express or implied.  See the License for the
    +# specific language governing permissions and limitations
    +# under the License.
    +
    +from nose.plugins.attrib import attr
    +from marvin.cloudstackTestCase import cloudstackTestCase
    +from marvin.lib.utils import (cleanup_resources,
    +                              validateList)
    +from marvin.lib.base import (Account,
    +                             VirtualMachine,
    +                             ServiceOffering,
    +                             Cluster,
    +                             StoragePool,
    +                             Volume,
    +                             DiskOffering,
    +                             Configurations,
    +                             Zone)
    +from marvin.lib.common import (get_zone,
    +                               get_domain,
    +                               get_template,
    +                               list_hosts,
    +                               find_storage_pool_type
    +                               )
    +from marvin.codes import PASS
    +from marvin.sshClient import SshClient
    +from requests.exceptions import ConnectionError
    +import time
    +
    +
    +def restart_ms(self):
    +    """Restart MS
    +    #1-ssh into m/c running MS
    +    #2-restart ms
    +    #3-verify the response
    +    #4-loop until you get list_zone api answer """
    +    sshClient = SshClient(
    +        self.mgtSvrDetails["mgtSvrIp"],
    +        22,
    +        self.mgtSvrDetails["user"],
    +        self.mgtSvrDetails["passwd"]
    +    )
    +    command = "service cloudstack-management restart"
    +    ms_restart_response = sshClient.execute(command)
    +    self.assertEqual(
    +        validateList(ms_restart_response)[0],
    +        PASS,
    +        "Check the MS restart response")
    +    self.assertEqual(
    +        ms_restart_response[0],
    +        'Stopping cloudstack-management:[  OK  ]',
    +        "MS i not stopped"
    +    )
    +    self.assertEqual(
    +        ms_restart_response[1],
    +        'Starting cloudstack-management: [  OK  ]',
    +        "MS not started"
    +    )
    +    timeout = self.services["timeout"]
    +    while True:
    +        time.sleep(self.services["sleep"])
    +        try:
    +            list_response = Zone.list(
    +                self.api_client
    +            )
    +            if validateList(list_response)[0] == PASS:
    +                break
    +        except ConnectionError as e:
    +            self.debug("list zone response is not available due to  %s" % e)
    +
    +        if timeout == 0:
    +            raise Exception("Ms is not comming up !")
    +        timeout = timeout - 1
    +
    +
    +class testMigrateVolumeTimeout(cloudstackTestCase):
    +
    +    @classmethod
    +    def setUpClass(cls):
    +        try:
    +            cls._cleanup = []
    +            cls.testClient = super(
    +                testMigrateVolumeTimeout,
    +                cls).getClsTestClient()
    +            cls.api_client = cls.testClient.getApiClient()
    +            cls.services = cls.testClient.getParsedTestDataConfig()
    +            # Get Domain, Zone, Template
    +            cls.domain = get_domain(cls.api_client)
    +            cls.zone = get_zone(
    +                cls.api_client,
    +                cls.testClient.getZoneForTests())
    +            cls.template = get_template(
    +                cls.api_client,
    +                cls.zone.id,
    +                cls.services["ostype"]
    +            )
    +            cls.hypervisor = cls.testClient.getHypervisorInfo()
    +            cls.services['mode'] = cls.zone.networktype
    +            cls.mgtSvrDetails = cls.config.__dict__["mgtSvr"][0].__dict__
    +            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
    +            cls.services["virtual_machine"]["template"] = cls.template.id
    +            cls.find_storage_pool = True
    +            cls.clusterWithSufficientPool = None
    +            if cls.hypervisor.lower() == 'lxc':
    +                if not find_storage_pool_type(
    +                        cls.api_client, storagetype='rbd'):
    +                    cls.find_storage_pool = False
    +                    return
    +            clusters = Cluster.list(cls.api_client, zoneid=cls.zone.id)
    +
    +            if not validateList(clusters)[0]:
    +
    +                cls.debug(
    +                    "check list cluster response for zone id %s" %
    +                    cls.zone.id)
    +
    +            for cluster in clusters:
    +                cls.pool = StoragePool.list(cls.api_client,
    +                                            clusterid=cluster.id,
    +                                            keyword="NetworkFilesystem"
    +                                            )
    +
    +                if not validateList(cls.pool)[0]:
    +
    +                    cls.debug(
    +                        "check list cluster response for zone id %s" %
    +                        cls.zone.id)
    +
    --- End diff --
    
    Same comment 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: [Automation]Volume migration between pool...

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

    https://github.com/apache/cloudstack/pull/742#issuecomment-134910967
  
    I lack the infra to test this, but LGTM; but maybe fix that functional issue @sanju1010 has commented


---
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: [Automation]Volume migration between pool...

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

    https://github.com/apache/cloudstack/pull/742#discussion_r37950149
  
    --- Diff: test/integration/component/maint/test_migrate_volume_timeout.py ---
    @@ -0,0 +1,286 @@
    +#!/usr/bin/env python
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements.  See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership.  The ASF licenses this file
    +# to you under the Apache License, Version 2.0 (the
    +# "License"); you may not use this file except in compliance
    +# with the License.  You may obtain a copy of the License at
    +#
    +#   http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing,
    +# software distributed under the License is distributed on an
    +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +# KIND, either express or implied.  See the License for the
    +# specific language governing permissions and limitations
    +# under the License.
    +
    +from nose.plugins.attrib import attr
    +from marvin.cloudstackTestCase import cloudstackTestCase
    +from marvin.lib.utils import (cleanup_resources,
    +                              validateList)
    +from marvin.lib.base import (Account,
    +                             VirtualMachine,
    +                             ServiceOffering,
    +                             Cluster,
    +                             StoragePool,
    +                             Volume,
    +                             DiskOffering,
    +                             Configurations,
    +                             Zone)
    +from marvin.lib.common import (get_zone,
    +                               get_domain,
    +                               get_template,
    +                               list_hosts,
    +                               find_storage_pool_type
    +                               )
    +from marvin.codes import PASS
    +from marvin.sshClient import SshClient
    +from requests.exceptions import ConnectionError
    +import time
    +
    +
    +def restart_ms(self):
    +    """Restart MS
    +    #1-ssh into m/c running MS
    +    #2-restart ms
    +    #3-verify the response
    +    #4-loop until you get list_zone api answer """
    +    sshClient = SshClient(
    +        self.mgtSvrDetails["mgtSvrIp"],
    +        22,
    +        self.mgtSvrDetails["user"],
    +        self.mgtSvrDetails["passwd"]
    +    )
    +    command = "service cloudstack-management restart"
    +    ms_restart_response = sshClient.execute(command)
    +    self.assertEqual(
    +        validateList(ms_restart_response)[0],
    +        PASS,
    +        "Check the MS restart response")
    +    self.assertEqual(
    +        ms_restart_response[0],
    +        'Stopping cloudstack-management:[  OK  ]',
    +        "MS i not stopped"
    +    )
    +    self.assertEqual(
    +        ms_restart_response[1],
    +        'Starting cloudstack-management: [  OK  ]',
    +        "MS not started"
    +    )
    +    timeout = self.services["timeout"]
    +    while True:
    +        time.sleep(self.services["sleep"])
    +        try:
    +            list_response = Zone.list(
    +                self.api_client
    +            )
    +            if validateList(list_response)[0] == PASS:
    +                break
    +        except ConnectionError as e:
    +            self.debug("list zone response is not available due to  %s" % e)
    +
    +        if timeout == 0:
    +            raise Exception("Ms is not comming up !")
    +        timeout = timeout - 1
    +
    +
    +class testMigrateVolumeTimeout(cloudstackTestCase):
    +
    +    @classmethod
    +    def setUpClass(cls):
    +        try:
    +            cls._cleanup = []
    +            cls.testClient = super(
    +                testMigrateVolumeTimeout,
    +                cls).getClsTestClient()
    +            cls.api_client = cls.testClient.getApiClient()
    +            cls.services = cls.testClient.getParsedTestDataConfig()
    +            # Get Domain, Zone, Template
    +            cls.domain = get_domain(cls.api_client)
    +            cls.zone = get_zone(
    +                cls.api_client,
    +                cls.testClient.getZoneForTests())
    +            cls.template = get_template(
    +                cls.api_client,
    +                cls.zone.id,
    +                cls.services["ostype"]
    +            )
    +            cls.hypervisor = cls.testClient.getHypervisorInfo()
    +            cls.services['mode'] = cls.zone.networktype
    +            cls.mgtSvrDetails = cls.config.__dict__["mgtSvr"][0].__dict__
    +            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
    +            cls.services["virtual_machine"]["template"] = cls.template.id
    +            cls.find_storage_pool = True
    +            cls.clusterWithSufficientPool = None
    +            if cls.hypervisor.lower() == 'lxc':
    +                if not find_storage_pool_type(
    +                        cls.api_client, storagetype='rbd'):
    +                    cls.find_storage_pool = False
    +                    return
    +            clusters = Cluster.list(cls.api_client, zoneid=cls.zone.id)
    +
    +            if not validateList(clusters)[0]:
    +
    +                cls.debug(
    +                    "check list cluster response for zone id %s" %
    +                    cls.zone.id)
    +
    --- End diff --
    
    Why are we not failing the test if the list cluster response is not valid?


---
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.
---