def external_ntp_ha(self):
        """Check external ntp in ha mode

        Scenario:
            1. Create cluster
            2. Shutdown ntpd
            3. Check ntp update

        """

        self.env.revert_snapshot("deploy_ha_dns_ntp")

        cluster_id = self.fuel_web.get_last_created_cluster()
        with self.env.d_env.get_admin_remote() as remote:
            _ip = self.fuel_web.get_nailgun_node_by_name('slave-01')['ip']
            vrouter_vip = self.fuel_web\
                .get_management_vrouter_vip(cluster_id)
            remote.execute("pkill -9 ntpd")
            checkers.external_ntp_check(_ip, vrouter_vip)
    def external_ntp_ha(self):
        """Check external ntp in ha mode

        Scenario:
            1. Create cluster
            2. Shutdown ntpd
            3. Check ntp update

        """

        self.env.revert_snapshot("deploy_ha_dns_ntp")

        cluster_id = self.fuel_web.get_last_created_cluster()
        with self.env.d_env.get_admin_remote() as remote:
            _ip = self.fuel_web.get_nailgun_node_by_name('slave-01')['ip']
            vrouter_vip = self.fuel_web\
                .get_management_vrouter_vip(cluster_id)
            remote.execute("pkill -9 ntpd")
            checkers.external_ntp_check(_ip, vrouter_vip)
    def tun_ceph_for_images_and_objects(self):
        """Deployment with 3 controllers, NeutronTUN,
           with Ceph for images and RadosGW

        Scenario:
            1. Create new environment
            2. Choose Neutron VxLAN
            3. Choose Ceph for images
            4. Choose Ceph RadosGW for objects
            5. Add 3 controller
            6. Add 2 compute
            7. Add 1 cinder
            8. Add 3 ceph nodes
            9. Change default dns server to any 2 public dns servers
               to the 'Host OS DNS Servers' on Settings tab
            10. Change default ntp servers to any 2 public ntp servers
                to the 'Host OS NTP Servers' on Settings tab
            11. Verify networks
            12. Deploy the environment
            13. Verify networks
            14. Run OSTF tests

        Duration XXXm
        Snapshot tun_ceph_images_rados_objects
        """
        self.env.revert_snapshot("ready_with_9_slaves")

        if len(settings.EXTERNAL_DNS) < 2:
            logging.warning("Less than 2 DNS servers was configured!")

        if len(settings.EXTERNAL_NTP) < 2:
            logging.warning("Less than 2 NTP servers was configured!")

        data = {
            'tenant': 'TunCephImagesObjects',
            'user': '******',
            'password': '******',
            'net_provider': settings.NEUTRON,
            'net_segment_type': settings.NEUTRON_SEGMENT['tun'],
            'dns_list': settings.EXTERNAL_DNS,
            'ntp_list': settings.EXTERNAL_NTP,
            'volumes_lvm': True,
            'volumes_ceph': False,
            'images_ceph': True,
            'objects_ceph': True
        }

        cluster_id = self.fuel_web.create_cluster(name=self.__class__.__name__,
                                                  settings=data)
        self.fuel_web.update_nodes(
            cluster_id, {
                'slave-01': ['controller'],
                'slave-02': ['controller'],
                'slave-03': ['controller'],
                'slave-04': ['compute'],
                'slave-05': ['compute'],
                'slave-06': ['cinder'],
                'slave-07': ['ceph-osd'],
                'slave-08': ['ceph-osd'],
                'slave-09': ['ceph-osd']
            })

        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.deploy_cluster_wait(cluster_id)

        self.fuel_web.check_ceph_status(cluster_id)
        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.run_ostf(cluster_id=cluster_id)

        ctrls = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
            cluster_id, roles=['controller'])
        vrouter_vip = self.fuel_web.get_management_vrouter_vip(cluster_id)
        for node in ctrls:
            checkers.external_dns_check(node['ip'])
            checkers.external_ntp_check(node['ip'], vrouter_vip)

        self.env.make_snapshot("tun_ceph_images_rados_objects")
示例#4
0
    def tun_no_volumes_ceph_for_images_and_ephemeral(self):
        """Deployment with 3 controllers, NeutronVxLAN,
           with no storage for volumes and ceph for images and ephemeral

        Scenario:
            1. Create new environment
            2. Choose Neutron, VxLAN
            3. Uncheck cinder for volumes and choose ceph for images,
               ceph for ephemeral
            4. Change ceph replication factor to 2
            5. Add 3 controller
            6. Add 2 compute
            7. Add 2 ceph nodes
            8. Change default disks partitioning for ceph nodes for 'vdc'
            9. Change default dns server to any 2 public dns servers
               to the 'Host OS DNS Servers' on Settings tab
            10. Change default ntp servers to any 2 public ntp servers
                to the 'Host OS NTP Servers' on Settings tab
            11. Change default public net mask from /24 to /25
            12. Verify networks
            13. Deploy cluster
            14. Verify networks
            15. Run OSTF

        Duration 180m
        Snapshot tun_no_volumes_ceph_for_images_and_ephemeral
        """
        self.env.revert_snapshot("ready_with_9_slaves")

        if len(settings.EXTERNAL_DNS) < 2:
            logging.warning("Less than 2 DNS servers was configured!")

        if len(settings.EXTERNAL_NTP) < 2:
            logging.warning("Less than 2 NTP servers was configured!")

        data = {
            'tenant': 'TunNoVolumesCeph',
            'user': '******',
            'password': '******',

            'net_provider': settings.NEUTRON,
            'net_segment_type': settings.NEUTRON_SEGMENT['tun'],

            'dns_list': settings.EXTERNAL_DNS,
            'ntp_list': settings.EXTERNAL_NTP,

            'volumes_lvm': False,
            'volumes_ceph': False,
            'images_ceph': True,
            'objects_ceph': False,
            'ephemeral_ceph': True,
            'osd_pool_size': '2'
        }

        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            settings=data
        )
        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['controller'],
                'slave-03': ['controller'],
                'slave-04': ['compute'],
                'slave-05': ['compute'],
                'slave-06': ['ceph-osd'],
                'slave-07': ['ceph-osd'],
            }
        )

        ceph_nodes = self.fuel_web.\
            get_nailgun_cluster_nodes_by_roles(cluster_id, ['ceph-osd'],
                                               role_status='pending_roles')
        for ceph_node in ceph_nodes:
            ceph_image_size = self.fuel_web.\
                update_node_partitioning(ceph_node, node_role='ceph')

        self.fuel_web.update_network_cidr(cluster_id, 'public')

        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.deploy_cluster_wait(cluster_id)

        for ceph in ceph_nodes:
            checkers.check_ceph_image_size(ceph['ip'], ceph_image_size)

        ctrls = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
            cluster_id, roles=['controller'])
        vrouter_vip = self.fuel_web.get_management_vrouter_vip(cluster_id)
        for node in ctrls:
            checkers.external_dns_check(node['ip'])
            checkers.external_ntp_check(node['ip'], vrouter_vip)

        self.fuel_web.check_ceph_status(cluster_id)
        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.run_ostf(cluster_id=cluster_id)
        self.env.make_snapshot("tun_no_volumes_ceph_for_images_and_ephemeral")
示例#5
0
    def tun_ceph_for_images_and_objects(self):
        """Deployment with 3 controllers, NeutronTUN, with Ceph for images and
        Ceph RadosGW for objects

        Scenario:
            1. Create cluster using NeutronTUN provider and external dns and
               ntp servers, Ceph for Images and Ceph RadosGW for objects
            2. Add 3 nodes with controller role
            3. Add 2 nodes with compute role
            4. Add 1 node with cinder role
            5. Add 3 nodes with ceph OSD role
            6. Verify networks
            7. Deploy the cluster
            8. Verify networks
            9. Run OSTF

        Duration XXXm
        Snapshot tun_ceph_images_rados_objects
        """
        self.env.revert_snapshot("ready_with_9_slaves")

        if len(settings.EXTERNAL_DNS.split(',')) < 2:
            logging.warning("Less than 2 DNS servers was configured!")

        if len(settings.EXTERNAL_NTP.split(',')) < 2:
            logging.warning("Less than 2 NTP servers was configured!")

        data = {
            'tenant': 'TunCephImagesObjects',
            'user': '******',
            'password': '******',
            'net_provider': settings.NEUTRON,
            'net_segment_type': settings.NEUTRON_SEGMENT['tun'],
            'dns_list': settings.EXTERNAL_DNS,
            'ntp_list': settings.EXTERNAL_NTP,
            'volumes_lvm': True,
            'volumes_ceph': False,
            'images_ceph': True,
            'objects_ceph': True
        }

        cluster_id = self.fuel_web.create_cluster(name=self.__class__.__name__,
                                                  settings=data)
        self.fuel_web.update_nodes(
            cluster_id, {
                'slave-01': ['controller'],
                'slave-02': ['controller'],
                'slave-03': ['controller'],
                'slave-04': ['compute'],
                'slave-05': ['compute'],
                'slave-06': ['cinder'],
                'slave-07': ['ceph-osd'],
                'slave-08': ['ceph-osd'],
                'slave-09': ['ceph-osd']
            })

        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.deploy_cluster_wait(cluster_id)

        self.fuel_web.check_ceph_status(cluster_id)
        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.run_ostf(cluster_id=cluster_id)

        ctrls = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
            cluster_id, roles=['controller'])
        vrouter_vip = self.fuel_web.get_management_vrouter_vip(cluster_id)
        for node in ctrls:
            with self.fuel_web.get_ssh_for_nailgun_node(node) as remote:
                checkers.external_dns_check(remote)
                checkers.external_ntp_check(remote, vrouter_vip)

        self.env.make_snapshot("tun_ceph_images_rados_objects")
示例#6
0
    def tun_no_volumes_ceph_for_images_and_ephemeral(self):
        """Deployment with 3 controllers, NeutronVxLAN,
           with no storage for volumes and ceph for images and ephemeral

        Scenario:
            1. Create new environment
            2. Choose Neutron, VxLAN
            3. Uncheck cinder for volumes and choose ceph for images,
               ceph for ephemeral
            4. Change ceph replication factor to 2
            5. Add 3 controller
            6. Add 2 compute
            7. Add 2 ceph nodes
            8. Change default disks partitioning for ceph nodes for 'vdc'
            9. Change default dns server to any 2 public dns servers
               to the 'Host OS DNS Servers' on Settings tab
            10. Change default ntp servers to any 2 public ntp servers
                to the 'Host OS NTP Servers' on Settings tab
            11. Change default public net mask from /24 to /25
            12. Verify networks
            13. Deploy cluster
            14. Verify networks
            15. Run OSTF

        Duration 180m
        Snapshot tun_no_volumes_ceph_for_images_and_ephemeral
        """
        self.env.revert_snapshot("ready_with_9_slaves")

        if len(settings.EXTERNAL_DNS) < 2:
            logging.warning("Less than 2 DNS servers was configured!")

        if len(settings.EXTERNAL_NTP) < 2:
            logging.warning("Less than 2 NTP servers was configured!")

        data = {
            'tenant': 'TunNoVolumesCeph',
            'user': '******',
            'password': '******',
            'net_provider': settings.NEUTRON,
            'net_segment_type': settings.NEUTRON_SEGMENT['tun'],
            'dns_list': settings.EXTERNAL_DNS,
            'ntp_list': settings.EXTERNAL_NTP,
            'volumes_lvm': False,
            'volumes_ceph': False,
            'images_ceph': True,
            'objects_ceph': False,
            'ephemeral_ceph': True,
            'osd_pool_size': '2'
        }

        cluster_id = self.fuel_web.create_cluster(name=self.__class__.__name__,
                                                  settings=data)
        self.fuel_web.update_nodes(
            cluster_id, {
                'slave-01': ['controller'],
                'slave-02': ['controller'],
                'slave-03': ['controller'],
                'slave-04': ['compute'],
                'slave-05': ['compute'],
                'slave-06': ['ceph-osd'],
                'slave-07': ['ceph-osd'],
            })

        ceph_nodes = self.fuel_web.\
            get_nailgun_cluster_nodes_by_roles(cluster_id, ['ceph-osd'],
                                               role_status='pending_roles')
        for ceph_node in ceph_nodes:
            ceph_image_size = self.fuel_web.\
                update_node_partitioning(ceph_node, node_role='ceph')

        self.fuel_web.update_network_cidr(cluster_id, 'public')

        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.deploy_cluster_wait(cluster_id)

        for ceph in ceph_nodes:
            checkers.check_ceph_image_size(ceph['ip'], ceph_image_size)

        ctrls = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
            cluster_id, roles=['controller'])
        vrouter_vip = self.fuel_web.get_management_vrouter_vip(cluster_id)
        for node in ctrls:
            checkers.external_dns_check(node['ip'])
            checkers.external_ntp_check(node['ip'], vrouter_vip)

        self.fuel_web.check_ceph_status(cluster_id)
        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.run_ostf(cluster_id=cluster_id)
        self.env.make_snapshot("tun_no_volumes_ceph_for_images_and_ephemeral")
示例#7
0
    def tun_no_volumes_ceph_for_images_and_ephemeral(self):
        """Deployment with 3 controllers, NeutronVxLAN, with no storage for
        volumes and Ceph for images and ephemeral

        Scenario:
            1. Create cluster using NeutronTUN provider, external dns and ntp
               servers, no storage for volumes, Ceph for Images and ephemeral,
               Ceph replica factor 2
            2. Add 3 nodes with controller role
            3. Add 2 nodes with compute role
            4. Add 2 nodes with ceph OSD role
            5. Change default partitioning for vdc of Ceph node
            6. Change public network from /24 to /25
            7. Verify networks
            8. Deploy the cluster
            9. Validate partition on Ceph node
            10. Verify networks
            11. Run OSTF

        Duration 180m
        Snapshot tun_no_volumes_ceph_for_images_and_ephemeral
        """
        self.env.revert_snapshot("ready_with_9_slaves")

        if len(settings.EXTERNAL_DNS.split(',')) < 2:
            logging.warning("Less than 2 DNS servers was configured!")

        if len(settings.EXTERNAL_NTP.split(',')) < 2:
            logging.warning("Less than 2 NTP servers was configured!")

        data = {
            'tenant': 'TunNoVolumesCeph',
            'user': '******',
            'password': '******',
            'net_provider': settings.NEUTRON,
            'net_segment_type': settings.NEUTRON_SEGMENT['tun'],
            'dns_list': settings.EXTERNAL_DNS,
            'ntp_list': settings.EXTERNAL_NTP,
            'volumes_lvm': False,
            'volumes_ceph': False,
            'images_ceph': True,
            'objects_ceph': False,
            'ephemeral_ceph': True,
            'osd_pool_size': '2'
        }

        cluster_id = self.fuel_web.create_cluster(name=self.__class__.__name__,
                                                  settings=data)
        self.fuel_web.update_nodes(
            cluster_id, {
                'slave-01': ['controller'],
                'slave-02': ['controller'],
                'slave-03': ['controller'],
                'slave-04': ['compute'],
                'slave-05': ['compute'],
                'slave-06': ['ceph-osd'],
                'slave-07': ['ceph-osd'],
            })

        ceph_nodes = self.fuel_web.\
            get_nailgun_cluster_nodes_by_roles(cluster_id, ['ceph-osd'],
                                               role_status='pending_roles')
        d_ceph = self.fuel_web.get_devops_nodes_by_nailgun_nodes(ceph_nodes)
        for ceph_node in ceph_nodes:
            ceph_image_size = self.fuel_web.\
                update_node_partitioning(ceph_node, node_role='ceph')

        self.fuel_web.update_network_cidr(cluster_id, 'public')

        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.deploy_cluster_wait(cluster_id)

        for devops_ceph in d_ceph:
            with self.fuel_web.get_ssh_for_node(devops_ceph.name) as remote:
                checkers.check_ceph_image_size(remote, ceph_image_size)

        ctrls = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
            cluster_id, roles=['controller'])
        vrouter_vip = self.fuel_web.get_management_vrouter_vip(cluster_id)
        for node in ctrls:
            with self.fuel_web.get_ssh_for_nailgun_node(node) as remote:
                checkers.external_dns_check(remote)
                checkers.external_ntp_check(remote, vrouter_vip)

        self.fuel_web.check_ceph_status(cluster_id)
        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.run_ostf(cluster_id=cluster_id)
        self.env.make_snapshot("tun_no_volumes_ceph_for_images_and_ephemeral")
示例#8
0
    def tun_ceph_for_images_and_objects(self):
        """Deployment with 3 controllers, NeutronTUN, with Ceph for images and
        Ceph RadosGW for objects

        Scenario:
            1. Create cluster using NeutronTUN provider and external dns and
               ntp servers, Ceph for Images and Ceph RadosGW for objects
            2. Add 3 nodes with controller role
            3. Add 2 nodes with compute role
            4. Add 1 node with cinder role
            5. Add 3 nodes with ceph OSD role
            6. Verify networks
            7. Deploy the cluster
            8. Verify networks
            9. Run OSTF

        Duration XXXm
        Snapshot tun_ceph_images_rados_objects
        """
        self.env.revert_snapshot("ready_with_9_slaves")

        if len(settings.EXTERNAL_DNS.split(',')) < 2:
            logging.warning("Less than 2 DNS servers was configured!")

        if len(settings.EXTERNAL_NTP.split(',')) < 2:
            logging.warning("Less than 2 NTP servers was configured!")

        data = {
            'tenant': 'TunCephImagesObjects',
            'user': '******',
            'password': '******',

            'net_provider': settings.NEUTRON,
            'net_segment_type': settings.NEUTRON_SEGMENT['tun'],

            'dns_list': settings.EXTERNAL_DNS,
            'ntp_list': settings.EXTERNAL_NTP,

            'volumes_lvm': True,
            'volumes_ceph': False,
            'images_ceph': True,
            'objects_ceph': True
        }

        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            settings=data
        )
        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['controller'],
                'slave-03': ['controller'],
                'slave-04': ['compute'],
                'slave-05': ['compute'],
                'slave-06': ['cinder'],
                'slave-07': ['ceph-osd'],
                'slave-08': ['ceph-osd'],
                'slave-09': ['ceph-osd']
            }
        )

        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.deploy_cluster_wait(cluster_id)

        self.fuel_web.check_ceph_status(cluster_id)
        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.run_ostf(cluster_id=cluster_id)

        ctrls = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
            cluster_id, roles=['controller'])
        vrouter_vip = self.fuel_web.get_management_vrouter_vip(cluster_id)
        for node in ctrls:
            with self.fuel_web.get_ssh_for_nailgun_node(node) as remote:
                checkers.external_dns_check(remote)
                checkers.external_ntp_check(remote, vrouter_vip)

        self.env.make_snapshot("tun_ceph_images_rados_objects")
示例#9
0
    def tun_no_volumes_ceph_for_images_and_ephemeral(self):
        """Deployment with 3 controllers, NeutronVxLAN, with no storage for
        volumes and Ceph for images and ephemeral

        Scenario:
            1. Create cluster using NeutronTUN provider, external dns and ntp
               servers, no storage for volumes, Ceph for Images and ephemeral,
               Ceph replica factor 2
            2. Add 3 nodes with controller role
            3. Add 2 nodes with compute role
            4. Add 2 nodes with ceph OSD role
            5. Change default partitioning for vdc of Ceph node
            6. Change public network from /24 to /25
            7. Verify networks
            8. Deploy the cluster
            9. Validate partition on Ceph node
            10. Verify networks
            11. Run OSTF

        Duration 180m
        Snapshot tun_no_volumes_ceph_for_images_and_ephemeral
        """
        self.env.revert_snapshot("ready_with_9_slaves")

        if len(settings.EXTERNAL_DNS.split(',')) < 2:
            logging.warning("Less than 2 DNS servers was configured!")

        if len(settings.EXTERNAL_NTP.split(',')) < 2:
            logging.warning("Less than 2 NTP servers was configured!")

        data = {
            'tenant': 'TunNoVolumesCeph',
            'user': '******',
            'password': '******',

            'net_provider': settings.NEUTRON,
            'net_segment_type': settings.NEUTRON_SEGMENT['tun'],

            'dns_list': settings.EXTERNAL_DNS,
            'ntp_list': settings.EXTERNAL_NTP,

            'volumes_lvm': False,
            'volumes_ceph': False,
            'images_ceph': True,
            'objects_ceph': False,
            'ephemeral_ceph': True,
            'osd_pool_size': '2'
        }

        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            settings=data
        )
        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['controller'],
                'slave-03': ['controller'],
                'slave-04': ['compute'],
                'slave-05': ['compute'],
                'slave-06': ['ceph-osd'],
                'slave-07': ['ceph-osd'],
            }
        )

        ceph_nodes = self.fuel_web.\
            get_nailgun_cluster_nodes_by_roles(cluster_id, ['ceph-osd'],
                                               role_status='pending_roles')
        d_ceph = self.fuel_web.get_devops_nodes_by_nailgun_nodes(ceph_nodes)
        for ceph_node in ceph_nodes:
            ceph_image_size = self.fuel_web.\
                update_node_partitioning(ceph_node, node_role='ceph')

        self.fuel_web.update_network_cidr(cluster_id, 'public')

        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.deploy_cluster_wait(cluster_id)

        for devops_ceph in d_ceph:
            with self.fuel_web.get_ssh_for_node(devops_ceph.name) as remote:
                checkers.check_ceph_image_size(remote, ceph_image_size)

        ctrls = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
            cluster_id, roles=['controller'])
        vrouter_vip = self.fuel_web.get_management_vrouter_vip(cluster_id)
        for node in ctrls:
            with self.fuel_web.get_ssh_for_nailgun_node(node) as remote:
                checkers.external_dns_check(remote)
                checkers.external_ntp_check(remote, vrouter_vip)

        self.fuel_web.check_ceph_status(cluster_id)
        self.fuel_web.verify_network(cluster_id)
        self.fuel_web.run_ostf(cluster_id=cluster_id)
        self.env.make_snapshot("tun_no_volumes_ceph_for_images_and_ephemeral")