コード例 #1
0
ファイル: test_ceph.py プロジェクト: rkhozinov/fuel-qa
    def test_ceph_rados_gw(self):
        """Deploy ceph HA with RadosGW for objects

        Scenario:
            1. Create cluster with Neutron
            2. Add 3 nodes with controller role
            3. Add 3 nodes with compute and ceph-osd role
            4. Deploy the cluster
            5. Network check
            6. Check HAProxy backends
            7. Check ceph status
            8. Run OSTF tests
            9. Check the radosgw daemon is started

        Duration 90m

        """

        self.manager.show_step(1)
        self.manager.show_step(2)
        self.manager.show_step(3)
        self.manager.show_step(4)
        self.manager.show_step(5)

        # HAProxy backend checking
        self.manager.show_step(6)
        fuel_web = self.manager.fuel_web
        controller_nodes = fuel_web.get_nailgun_cluster_nodes_by_roles(
            self._storage['cluster_id'], ['controller'])

        for node in controller_nodes:
            logger.info("Check all HAProxy backends on {}".format(
                node['meta']['system']['fqdn']))
            haproxy_status = checkers.check_haproxy_backend(node['ip'])
            msg = "HAProxy backends are DOWN. {0}".format(haproxy_status)
            assert haproxy_status['exit_code'] == 1, msg

        self.manager.show_step(7)
        fuel_web.check_ceph_status(self._storage['cluster_id'])

        self.manager.show_step(8)
        # Run ostf
        fuel_web.run_ostf(cluster_id=self._storage['cluster_id'],
                          test_sets=['ha', 'smoke', 'sanity'])

        self.manager.show_step(9)
        # Check the radosgw daemon is started
        for node in controller_nodes:
            logger.info("Check radosgw daemon is started on {}".format(
                node['meta']['system']['fqdn']))

            cmd = "pkill -0 radosgw"
            ip = node['ip']
            err_msg = "radosgw daemon not started on {}".format(
                node['meta']['system']['fqdn'])
            ssh_manager.execute_on_remote(ip=ip, cmd=cmd, err_msg=err_msg)
コード例 #2
0
ファイル: actions_base.py プロジェクト: andybondar/fuel-qa
    def check_haproxy(self):
        """HAProxy backend checking"""
        controller_nodes = self.fuel_web.get_nailgun_cluster_nodes_by_roles(self.cluster_id, ["controller"])

        for node in controller_nodes:
            remote = self.env.d_env.get_ssh_to_remote(node["ip"])
            logger.info("Check all HAProxy backends on {}".format(node["meta"]["system"]["fqdn"]))
            haproxy_status = checkers.check_haproxy_backend(remote)
            remote.clear()
            assert_equal(haproxy_status["exit_code"], 1, "HAProxy backends are DOWN. {0}".format(haproxy_status))
コード例 #3
0
ファイル: base.py プロジェクト: dwong-zh/fuel-qa
    def check_haproxy(self):
        """HAProxy backend checking"""
        controller_nodes = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
            self.cluster_id, ['controller'])

        for node in controller_nodes:
            logger.info("Check all HAProxy backends on {}".format(
                node['meta']['system']['fqdn']))
            haproxy_status = checkers.check_haproxy_backend(node['ip'])
            assert_equal(
                haproxy_status['exit_code'], 1,
                "HAProxy backends are DOWN. {0}".format(haproxy_status))
コード例 #4
0
ファイル: base.py プロジェクト: dtsapikov/fuel-qa
    def check_haproxy(self):
        """HAProxy backend checking"""
        controller_nodes = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
            self.cluster_id, ['controller'])

        for node in controller_nodes:
            logger.info("Check all HAProxy backends on {}".format(
                node['meta']['system']['fqdn']))
            haproxy_status = checkers.check_haproxy_backend(node['ip'])
            assert_equal(haproxy_status['exit_code'], 1,
                         "HAProxy backends are DOWN. {0}".format(
                             haproxy_status))
コード例 #5
0
ファイル: test_ceph.py プロジェクト: dtsapikov/fuel-qa
    def ceph_rados_gw(self):
        """Deploy ceph HA with RadosGW for objects

        Scenario:
            1. Create cluster with Neutron
            2. Add 3 nodes with controller role
            3. Add 3 nodes with compute and ceph-osd role
            4. Deploy the cluster
            5. Check ceph status
            6. Run OSTF tests
            7. Check the radosgw daemon is started

        Duration 90m
        Snapshot ceph_rados_gw

        """
        def radosgw_started(remote):
            return remote.check_call('pkill -0 radosgw')['exit_code'] == 0

        self.env.revert_snapshot("ready")
        self.env.bootstrap_nodes(
            self.env.d_env.nodes().slaves[:6])

        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            mode=settings.DEPLOYMENT_MODE,
            settings={
                'volumes_lvm': False,
                'volumes_ceph': True,
                'images_ceph': True,
                'objects_ceph': True,
                'tenant': 'rados',
                'user': '******',
                'password': '******'
            }
        )
        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['controller'],
                'slave-03': ['controller'],
                'slave-04': ['compute', 'ceph-osd'],
                'slave-05': ['compute', 'ceph-osd'],
                'slave-06': ['compute', 'ceph-osd']
            }
        )
        self.fuel_web.verify_network(cluster_id)
        # Deploy cluster
        self.fuel_web.deploy_cluster_wait(cluster_id)

        # Network verification
        self.fuel_web.verify_network(cluster_id)

        # HAProxy backend checking
        controller_nodes = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
            cluster_id, ['controller'])

        for node in controller_nodes:
            logger.info("Check all HAProxy backends on {}".format(
                node['meta']['system']['fqdn']))
            haproxy_status = checkers.check_haproxy_backend(node['ip'])
            assert_equal(haproxy_status['exit_code'], 1,
                         "HAProxy backends are DOWN. {0}".format(
                             haproxy_status))

        self.fuel_web.check_ceph_status(cluster_id)

        # Run ostf
        self.fuel_web.run_ostf(cluster_id=cluster_id,
                               test_sets=['ha', 'smoke', 'sanity'])

        # Check the radosgw daemon is started
        with self.fuel_web.get_ssh_for_node('slave-01') as remote:
            assert_true(radosgw_started(remote), 'radosgw daemon started')

        self.env.make_snapshot("ceph_rados_gw")
コード例 #6
0
ファイル: test_ha.py プロジェクト: aglarendil/fuel-qa
    def deploy_ha_vlan(self):
        """Deploy cluster in HA mode with VLAN Manager

        Scenario:
            1. Create cluster
            2. Add 3 nodes with controller roles
            3. Add 2 nodes with compute roles
            4. Set up cluster to use Network VLAN manager with 8 networks
            5. Deploy the cluster
            6. Validate cluster was set up correctly, there are no dead
            services, there are no errors in logs
            7. Run network verification
            8. Run OSTF
            9. Create snapshot

        Duration 70m
        Snapshot deploy_ha_vlan

        """
        self.env.revert_snapshot("ready_with_5_slaves")

        data = {
            'tenant': 'novaHAVlan',
            'user': '******',
            'password': '******'
        }

        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            mode=DEPLOYMENT_MODE_HA,
            settings=data
        )
        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['controller'],
                'slave-03': ['controller'],
                'slave-04': ['compute'],
                'slave-05': ['compute']
            }
        )
        self.fuel_web.update_vlan_network_fixed(
            cluster_id, amount=8, network_size=32
        )
        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.deploy_cluster_wait(cluster_id)

        # Network verification
        self.fuel_web.verify_network(cluster_id)

        # HAProxy backend checking
        controller_nodes = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
            cluster_id, ['controller'])

        for node in controller_nodes:
            remote = self.env.d_env.get_ssh_to_remote(node['ip'])
            logger.info("Check all HAProxy backends on {}".format(
                node['meta']['system']['fqdn']))
            haproxy_status = checkers.check_haproxy_backend(
                remote, ignore_services=['nova-metadata-api'])
            assert_equal(haproxy_status['exit_code'], 1,
                         "HAProxy backends are DOWN. {0}".format(
                             haproxy_status))
            remote.clear()

        os_conn = os_actions.OpenStackActions(
            self.fuel_web.get_public_vip(cluster_id),
            data['user'], data['password'], data['tenant'])

        self.fuel_web.assert_cluster_ready(
            os_conn, smiles_count=16, networks_count=8, timeout=300)

        _ip = self.fuel_web.get_nailgun_node_by_name('slave-01')['ip']
        self.fuel_web.check_fixed_nova_splited_cidr(
            os_conn, self.fuel_web.get_nailgun_cidr_nova(cluster_id),
            self.env.d_env.get_ssh_to_remote(_ip))

        devops_node = self.fuel_web.get_nailgun_primary_node(
            self.env.d_env.nodes().slaves[0])
        logger.debug("devops node name is {0}".format(devops_node.name))

        _ip = self.fuel_web.get_nailgun_node_by_name(devops_node.name)['ip']
        remote = self.env.d_env.get_ssh_to_remote(_ip)
        for i in range(5):
            try:
                checkers.check_swift_ring(remote)
                break
            except AssertionError:
                result = remote.execute(
                    "/usr/local/bin/swift-rings-rebalance.sh")
                logger.debug("command execution result is {0}".format(result))
        else:
            checkers.check_swift_ring(remote)

        self.fuel_web.run_ostf(
            cluster_id=cluster_id,
            test_sets=['ha', 'smoke', 'sanity'])

        self.env.make_snapshot("deploy_ha_vlan")
コード例 #7
0
ファイル: test_ceph.py プロジェクト: simudream/fuel-qa
    def ceph_rados_gw(self):
        """Deploy ceph HA with RadosGW for objects

        Scenario:
            1. Create cluster with Neutron
            2. Add 3 nodes with controller role
            3. Add 3 nodes with compute and ceph-osd role
            4. Deploy the cluster
            5. Check ceph status
            6. Run OSTF tests
            7. Check the radosqw daemon is started

        Duration 90m
        Snapshot ceph_rados_gw

        """
        self.env.revert_snapshot("ready")
        self.env.bootstrap_nodes(self.env.d_env.nodes().slaves[:6])

        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            mode=settings.DEPLOYMENT_MODE,
            settings={
                "volumes_lvm": False,
                "volumes_ceph": True,
                "images_ceph": True,
                "objects_ceph": True,
                "net_provider": "neutron",
                "net_segment_type": NEUTRON_SEGMENT_TYPE,
                "tenant": "rados",
                "user": "******",
                "password": "******",
            },
        )
        self.fuel_web.update_nodes(
            cluster_id,
            {
                "slave-01": ["controller"],
                "slave-02": ["controller"],
                "slave-03": ["controller"],
                "slave-04": ["compute", "ceph-osd"],
                "slave-05": ["compute", "ceph-osd"],
                "slave-06": ["compute", "ceph-osd"],
            },
        )
        self.fuel_web.verify_network(cluster_id)
        # Deploy cluster
        self.fuel_web.deploy_cluster_wait(cluster_id)

        # Network verification
        self.fuel_web.verify_network(cluster_id)

        # HAProxy backend checking
        controller_nodes = self.fuel_web.get_nailgun_cluster_nodes_by_roles(cluster_id, ["controller"])

        for node in controller_nodes:
            remote = self.env.d_env.get_ssh_to_remote(node["ip"])
            logger.info("Check all HAProxy backends on {}".format(node["meta"]["system"]["fqdn"]))
            haproxy_status = checkers.check_haproxy_backend(remote)
            remote.clear()
            assert_equal(haproxy_status["exit_code"], 1, "HAProxy backends are DOWN. {0}".format(haproxy_status))

        self.fuel_web.check_ceph_status(cluster_id)

        # Run ostf
        self.fuel_web.run_ostf(cluster_id=cluster_id, test_sets=["ha", "smoke", "sanity"])

        # Check the radosqw daemon is started
        with self.fuel_web.get_ssh_for_node("slave-01") as remote:
            radosgw_started = (
                lambda: len(
                    remote.check_call('ps aux | grep "/usr/bin/radosgw -n ' 'client.radosgw.gateway"')["stdout"]
                )
                == 3
            )
            assert_true(radosgw_started(), "radosgw daemon started")

        self.env.make_snapshot("ceph_rados_gw")