From 75898ee995b08892ab4b936094a58d4321fc24a6 Mon Sep 17 00:00:00 2001 From: kshithijiyer Date: Tue, 18 Feb 2020 13:21:05 +0530 Subject: [TestFix] Changing code used to create arbiter volumes As distributed-arbiter and arbiter weren't present before patch [1], arbiter and distributed-arbiter volumes were created by the hack show below where a distributed-replicated or replicated volume's configuration was modified to create an arbiter volume. ``` @runs_on([['replicated', 'distributed-replicated'], ['glusterfs', 'nfs']]) class TestSelfHeal(GlusterBaseClass): ................. @classmethod def setUpClass(cls): ............... # Overriding the volume type to specifically test the volume # type Change from distributed-replicated to arbiter if cls.volume_type == "distributed-replicated": cls.volume['voltype'] = { 'type': 'distributed-replicated', 'dist_count': 2, 'replica_count': 3, 'arbiter_count': 1, 'transport': 'tcp'} ``` Now this code is to be updated where we need to remove code which was used to override volume configuration and just add arbiter or distributed-arbiter in `@runs_on([],[])` as shown below: ``` @runs_on([['replicated', 'distributed-arbiter'], ['glusterfs', 'nfs']]) class TestSelfHeal(GlusterBaseClass): ``` Links: [1] https://github.com/gluster/glusto-tests/commit/08b727842bc66603e3b8d1160ee4b15051b0cd20 Change-Id: I4c44c2f3506bd0183fd991354fb723f8ec235a4b Signed-off-by: kshithijiyer --- .../arbiter/brick_cases/test_brickcases.py | 18 +--- .../test_impact_of_replace_brick_for_glustershd.py | 15 +-- .../brick_cases/test_replica3_to_arbiter.py | 15 +-- .../arbiter/brick_cases/test_rmvrf_files.py | 4 +- .../test_create_snapshot_and_verify_content.py | 14 +-- .../test_data_self_heal_algorithm_diff_default.py | 14 +-- ...t_data_self_heal_algorithm_diff_heal_command.py | 14 +-- .../test_data_self_heal_algorithm_full_default.py | 14 +-- .../arbiter/test_data_self_heal_daemon_off.py | 12 +-- .../arbiter/test_entry_self_heal_heal_command.py | 14 +-- ...dling_data_split_brain_of_files_heal_command.py | 4 +- .../functional/arbiter/test_metadata_self_heal.py | 12 +-- .../test_mount_point_while_deleting_files.py | 115 ++++++++++----------- ...t_no_data_loss_arbiter_vol_after_rename_file.py | 4 +- ...st_oom_on_client_heal_is_in_progress_arbiter.py | 4 +- ...test_remove_faulty_subvol_and_add_new_subvol.py | 17 +-- ...t_replacing_all_arbiter_bricks_in_the_volume.py | 17 +-- ...ng_meta_data_split_brain_extended_attributes.py | 15 +-- ...elf_heal_50k_files_heal_command_by_add_brick.py | 18 +--- .../test_self_heal_algorithm_full_daemon_off.py | 14 +-- .../test_self_heal_differing_in_file_type.py | 12 +-- .../arbiter/test_self_heal_symbolic_links.py | 12 +-- 22 files changed, 89 insertions(+), 289 deletions(-) diff --git a/tests/functional/arbiter/brick_cases/test_brickcases.py b/tests/functional/arbiter/brick_cases/test_brickcases.py index 46be47ca9..2b006cb92 100755 --- a/tests/functional/arbiter/brick_cases/test_brickcases.py +++ b/tests/functional/arbiter/brick_cases/test_brickcases.py @@ -33,7 +33,7 @@ from glustolibs.io.utils import (validate_io_procs, from glustolibs.misc.misc_libs import upload_scripts -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'cifs', 'nfs']]) class GlusterArbiterVolumeTypeChangeClass(GlusterBaseClass): """Class for testing Volume Type Change from replicated to @@ -44,22 +44,6 @@ class GlusterArbiterVolumeTypeChangeClass(GlusterBaseClass): # Calling GlusterBaseClass setUpClass cls.get_super_method(cls, 'setUpClass')() - # Overriding the volume type to specifically test the volume type - # change from replicated to arbiter - if cls.volume_type == "replicated": - cls.volume['voltype'] = { - 'type': 'replicated', - 'replica_count': 2, - 'dist_count': 1, - 'transport': 'tcp'} - - if cls.volume_type == "distributed-replicated": - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 2, - 'transport': 'tcp'} - # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on mounts", cls.clients) diff --git a/tests/functional/arbiter/brick_cases/test_impact_of_replace_brick_for_glustershd.py b/tests/functional/arbiter/brick_cases/test_impact_of_replace_brick_for_glustershd.py index 9e4cfee46..56d2edbd9 100644 --- a/tests/functional/arbiter/brick_cases/test_impact_of_replace_brick_for_glustershd.py +++ b/tests/functional/arbiter/brick_cases/test_impact_of_replace_brick_for_glustershd.py @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2017 Red Hat, Inc. +# Copyright (C) 2016-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,7 +30,7 @@ from glustolibs.gluster.heal_libs import (get_self_heal_daemon_pid, is_shd_daemonized) -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'nfs']]) class ImpactOfReplaceBrickForGlustershdTests(GlusterBaseClass): """ @@ -42,17 +42,6 @@ class ImpactOfReplaceBrickForGlustershdTests(GlusterBaseClass): def setUpClass(cls): # Calling GlusterBaseClass setUpClass cls.get_super_method(cls, 'setUpClass')() - - # Override Volumes - if cls.volume_type == "distributed-replicated": - # Define distributed-replicated volume - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - cls.glustershd = "/var/lib/glusterd/glustershd/glustershd-server.vol" def setUp(self): diff --git a/tests/functional/arbiter/brick_cases/test_replica3_to_arbiter.py b/tests/functional/arbiter/brick_cases/test_replica3_to_arbiter.py index 167098c06..947c6eef7 100755 --- a/tests/functional/arbiter/brick_cases/test_replica3_to_arbiter.py +++ b/tests/functional/arbiter/brick_cases/test_replica3_to_arbiter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2018 Red Hat, Inc. +# Copyright (C) 2015-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,19 +30,6 @@ class GlusterArbiterVolumeTypeClass(GlusterBaseClass): """Class for testing Volume Type Change from replicated to Arbitered volume """ - @classmethod - def setUpClass(cls): - # Calling GlusterBaseClass setUpClass - cls.get_super_method(cls, 'setUpClass')() - - # Overriding the volume type to specifically test the volume type - - if cls.volume_type == "replicated": - cls.volume['voltype'] = { - 'type': 'replicated', - 'replica_count': 3, - 'transport': 'tcp'} - def setUp(self): """ Setup Volume diff --git a/tests/functional/arbiter/brick_cases/test_rmvrf_files.py b/tests/functional/arbiter/brick_cases/test_rmvrf_files.py index 6ea71eaa2..80bd05b86 100755 --- a/tests/functional/arbiter/brick_cases/test_rmvrf_files.py +++ b/tests/functional/arbiter/brick_cases/test_rmvrf_files.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2018 Red Hat, Inc. +# Copyright (C) 2017-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ from glustolibs.io.utils import (validate_io_procs, from glustolibs.misc.misc_libs import upload_scripts -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'cifs', 'nfs']]) class TestRmrfMount(GlusterBaseClass): """ diff --git a/tests/functional/arbiter/test_create_snapshot_and_verify_content.py b/tests/functional/arbiter/test_create_snapshot_and_verify_content.py index ca8d761dd..c15d379dd 100755 --- a/tests/functional/arbiter/test_create_snapshot_and_verify_content.py +++ b/tests/functional/arbiter/test_create_snapshot_and_verify_content.py @@ -32,7 +32,7 @@ from glustolibs.io.utils import ( validate_io_procs) -@runs_on([['distributed-replicated', 'replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'nfs']]) class TestArbiterSelfHeal(GlusterBaseClass): """ @@ -59,18 +59,6 @@ class TestArbiterSelfHeal(GlusterBaseClass): # Calling GlusterBaseClass setUp self.get_super_method(self, 'setUp')() - # Setup Volumes - if self.volume_type == "distributed-replicated": - self.volume_configs = [] - - # Redefine distributed-replicated volume - self.volume['voltype'] = { - 'type': 'distributed-replicated', - 'replica_count': 3, - 'dist_count': 2, - 'arbiter_count': 1, - 'transport': 'tcp'} - # Setup Volume and Mount Volume g.log.info("Starting to Setup Volume and Mount Volume") ret = self.setup_volume_and_mount_volume(mounts=self.mounts) diff --git a/tests/functional/arbiter/test_data_self_heal_algorithm_diff_default.py b/tests/functional/arbiter/test_data_self_heal_algorithm_diff_default.py index 13d4a6c81..def1f7cd2 100644 --- a/tests/functional/arbiter/test_data_self_heal_algorithm_diff_default.py +++ b/tests/functional/arbiter/test_data_self_heal_algorithm_diff_default.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2018 Red Hat, Inc. +# Copyright (C) 2015-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,7 +37,7 @@ from glustolibs.misc.misc_libs import upload_scripts from glustolibs.io.utils import (collect_mounts_arequal, validate_io_procs) -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'cifs', 'nfs']]) class TestSelfHeal(GlusterBaseClass): """ @@ -51,16 +51,6 @@ class TestSelfHeal(GlusterBaseClass): # Calling GlusterBaseClass setUpClass cls.get_super_method(cls, 'setUpClass')() - # Overriding the volume type to specifically test the volume type - # Change from distributed-replicated to arbiter - if cls.volume_type == "distributed-replicated": - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on mounts", cls.clients) diff --git a/tests/functional/arbiter/test_data_self_heal_algorithm_diff_heal_command.py b/tests/functional/arbiter/test_data_self_heal_algorithm_diff_heal_command.py index 3c34383a9..4f4065d8e 100755 --- a/tests/functional/arbiter/test_data_self_heal_algorithm_diff_heal_command.py +++ b/tests/functional/arbiter/test_data_self_heal_algorithm_diff_heal_command.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2018 Red Hat, Inc. +# Copyright (C) 2015-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -38,7 +38,7 @@ from glustolibs.misc.misc_libs import upload_scripts from glustolibs.io.utils import (collect_mounts_arequal, validate_io_procs) -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'cifs', 'nfs']]) class TestSelfHeal(GlusterBaseClass): """ @@ -52,16 +52,6 @@ class TestSelfHeal(GlusterBaseClass): # Calling GlusterBaseClass setUpClass cls.get_super_method(cls, 'setUpClass')() - # Overriding the volume type to specifically test the volume type - # Change from distributed-replicated to arbiter - if cls.volume_type == "distributed-replicated": - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on mounts", cls.clients) diff --git a/tests/functional/arbiter/test_data_self_heal_algorithm_full_default.py b/tests/functional/arbiter/test_data_self_heal_algorithm_full_default.py index a0cfc4b28..4ab220351 100755 --- a/tests/functional/arbiter/test_data_self_heal_algorithm_full_default.py +++ b/tests/functional/arbiter/test_data_self_heal_algorithm_full_default.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2016 Red Hat, Inc. +# Copyright (C) 2015-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ from glustolibs.misc.misc_libs import upload_scripts from glustolibs.io.utils import (collect_mounts_arequal, validate_io_procs) -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'cifs', 'nfs']]) class TestSelfHeal(GlusterBaseClass): """ @@ -50,16 +50,6 @@ class TestSelfHeal(GlusterBaseClass): # Calling GlusterBaseClass setUpClass cls.get_super_method(cls, 'setUpClass')() - # Overriding the volume type to specifically test the volume type - # Change from distributed-replicated to arbiter - if cls.volume_type == "distributed-replicated": - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on mounts", cls.clients) diff --git a/tests/functional/arbiter/test_data_self_heal_daemon_off.py b/tests/functional/arbiter/test_data_self_heal_daemon_off.py index 96cfbd005..7f23c7c07 100644 --- a/tests/functional/arbiter/test_data_self_heal_daemon_off.py +++ b/tests/functional/arbiter/test_data_self_heal_daemon_off.py @@ -40,7 +40,7 @@ from glustolibs.misc.misc_libs import upload_scripts from glustolibs.io.utils import (collect_mounts_arequal, validate_io_procs) -@runs_on([['replicated', 'distributed-replicated'], ['glusterfs', 'nfs']]) +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'nfs']]) class TestSelfHeal(GlusterBaseClass): """ Description: @@ -53,16 +53,6 @@ class TestSelfHeal(GlusterBaseClass): # Calling GlusterBaseClass setUpClass cls.get_super_method(cls, 'setUpClass')() - # Overriding the volume type to specifically test the volume type - # Change from distributed-replicated to arbiter - if cls.volume_type == "distributed-replicated": - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on mounts", cls.clients) diff --git a/tests/functional/arbiter/test_entry_self_heal_heal_command.py b/tests/functional/arbiter/test_entry_self_heal_heal_command.py index d8067abd9..a268fb6eb 100644 --- a/tests/functional/arbiter/test_entry_self_heal_heal_command.py +++ b/tests/functional/arbiter/test_entry_self_heal_heal_command.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2018 Red Hat, Inc. +# Copyright (C) 2015-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ from glustolibs.io.utils import (collect_mounts_arequal, list_all_files_and_dirs_mounts) -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'cifs', 'nfs']]) class TestSelfHeal(GlusterBaseClass): """ @@ -53,16 +53,6 @@ class TestSelfHeal(GlusterBaseClass): # Calling GlusterBaseClass setUpClass cls.get_super_method(cls, 'setUpClass')() - # Overriding the volume type to specifically test the volume type - # Change from distributed-replicated to arbiter - if cls.volume_type == "distributed-replicated": - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on mounts", cls.clients) diff --git a/tests/functional/arbiter/test_handling_data_split_brain_of_files_heal_command.py b/tests/functional/arbiter/test_handling_data_split_brain_of_files_heal_command.py index 99dc90a59..23bd40598 100755 --- a/tests/functional/arbiter/test_handling_data_split_brain_of_files_heal_command.py +++ b/tests/functional/arbiter/test_handling_data_split_brain_of_files_heal_command.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2018 Red Hat, Inc. +# Copyright (C) 2015-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -34,7 +34,7 @@ from glustolibs.io.utils import (collect_mounts_arequal, validate_io_procs, from glustolibs.misc.misc_libs import upload_scripts -@runs_on([['replicated'], +@runs_on([['arbiter'], ['glusterfs', 'nfs', 'cifs']]) class TestArbiterSelfHeal(GlusterBaseClass): """ diff --git a/tests/functional/arbiter/test_metadata_self_heal.py b/tests/functional/arbiter/test_metadata_self_heal.py index 56afaf95e..81a098fff 100755 --- a/tests/functional/arbiter/test_metadata_self_heal.py +++ b/tests/functional/arbiter/test_metadata_self_heal.py @@ -36,7 +36,7 @@ from glustolibs.io.utils import (collect_mounts_arequal, wait_for_io_to_complete) -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'nfs']]) class TestMetadataSelfHeal(GlusterBaseClass): """ @@ -78,16 +78,6 @@ class TestMetadataSelfHeal(GlusterBaseClass): # Calling GlusterBaseClass setUpClass cls.get_super_method(cls, 'setUpClass')() - # Overriding the volume type to specifically test the volume type - # Change from distributed-replicated to arbiter - if cls.volume_type == "distributed-replicated": - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on mounts", cls.clients) diff --git a/tests/functional/arbiter/test_mount_point_while_deleting_files.py b/tests/functional/arbiter/test_mount_point_while_deleting_files.py index 88c83346c..520cb7e61 100755 --- a/tests/functional/arbiter/test_mount_point_while_deleting_files.py +++ b/tests/functional/arbiter/test_mount_point_while_deleting_files.py @@ -35,7 +35,7 @@ from glustolibs.gluster.mount_ops import (mount_volume, from glustolibs.misc.misc_libs import upload_scripts -@runs_on([['replicated'], +@runs_on([['arbiter'], ['glusterfs']]) class VolumeSetDataSelfHealTests(GlusterBaseClass): @classmethod @@ -56,68 +56,63 @@ class VolumeSetDataSelfHealTests(GlusterBaseClass): cls.clients) # Setup Volumes - if cls.volume_type == "replicated": - cls.volume_configs = [] - cls.mounts_dict_list = [] - # Define two replicated volumes - for i in range(1, 3): - cls.volume['voltype'] = { - 'type': 'replicated', - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - - volume_config = {'name': 'testvol_%s_%d' - % (cls.volume['voltype']['type'], i), - 'servers': cls.servers, - 'voltype': cls.volume['voltype']} - cls.volume_configs.append(volume_config) - - # redefine mounts - for client in cls.all_clients_info.keys(): - mount = { - 'protocol': cls.mount_type, - 'server': cls.mnode, - 'volname': volume_config['name'], - 'client': cls.all_clients_info[client], - 'mountpoint': (os.path.join( - "/mnt", '_'.join([volume_config['name'], - cls.mount_type]))), - 'options': '' - } - cls.mounts_dict_list.append(mount) + cls.volume_configs = [] + cls.mounts_dict_list = [] + + # Define two replicated volumes + for i in range(1, 3): + volume_config = { + 'name': 'testvol_%s_%d' % (cls.volume['voltype']['type'], i), + 'servers': cls.servers, + 'voltype': cls.volume['voltype']} + cls.volume_configs.append(volume_config) + + # Redefine mounts + for client in cls.all_clients_info.keys(): + mount = { + 'protocol': cls.mount_type, + 'server': cls.mnode, + 'volname': volume_config['name'], + 'client': cls.all_clients_info[client], + 'mountpoint': (os.path.join( + "/mnt", '_'.join([volume_config['name'], + cls.mount_type]))), + 'options': '' + } + cls.mounts_dict_list.append(mount) cls.mounts = create_mount_objs(cls.mounts_dict_list) - # Create and mount volumes - cls.mount_points = [] - for volume_config in cls.volume_configs: - # Setup volume - ret = setup_volume(mnode=cls.mnode, - all_servers_info=cls.all_servers_info, - volume_config=volume_config, - force=False) - if not ret: - raise ExecutionError("Failed to setup Volume %s" - % volume_config['name']) - g.log.info("Successful in setting volume %s", - volume_config['name']) - for mount_obj in cls.mounts: - # Mount volume - mount_point = (os.path.join("/mnt", '_'.join( - [volume_config['name'], cls.mount_type]))) - cls.mount_points.append(mount_point) - ret, _, _ = mount_volume(volume_config['name'], - cls.mount_type, - mount_point, - cls.mnode, - mount_obj.client_system) - if ret: - raise ExecutionError( - "Failed to do gluster mount on volume %s " - % cls.volname) - g.log.info("Successfully mounted %s on client %s", - cls.volname, mount_obj.client_system) + # Create and mount volumes + cls.mount_points = [] + cls.client = cls.clients[0] + for volume_config in cls.volume_configs: + + # Setup volume + ret = setup_volume(mnode=cls.mnode, + all_servers_info=cls.all_servers_info, + volume_config=volume_config, + force=False) + if not ret: + raise ExecutionError("Failed to setup Volume %s" + % volume_config['name']) + g.log.info("Successful in setting volume %s", + volume_config['name']) + + # Mount volume + mount_point = (os.path.join("/mnt", '_'.join( + [volume_config['name'], cls.mount_type]))) + cls.mount_points.append(mount_point) + ret, _, _ = mount_volume(volume_config['name'], + cls.mount_type, + mount_point, + cls.mnode, cls.client) + if ret: + raise ExecutionError( + "Failed to do gluster mount on volume %s " + % cls.volname) + g.log.info("Successfully mounted %s on client %s", + cls.volname, cls.client) def setUp(self): """ diff --git a/tests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py b/tests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py index 111edc737..981e9cde3 100755 --- a/tests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py +++ b/tests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2018 Red Hat, Inc. +# Copyright (C) 2016-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,7 +32,7 @@ from glustolibs.gluster.heal_libs import (monitor_heal_completion, from glustolibs.misc.misc_libs import upload_scripts -@runs_on([['replicated'], +@runs_on([['arbiter'], ['glusterfs']]) class ArbiterSelfHealTests(GlusterBaseClass): """ diff --git a/tests/functional/arbiter/test_oom_on_client_heal_is_in_progress_arbiter.py b/tests/functional/arbiter/test_oom_on_client_heal_is_in_progress_arbiter.py index 15deea34b..55458690e 100755 --- a/tests/functional/arbiter/test_oom_on_client_heal_is_in_progress_arbiter.py +++ b/tests/functional/arbiter/test_oom_on_client_heal_is_in_progress_arbiter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2018 Red Hat, Inc. +# Copyright (C) 2016-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -31,7 +31,7 @@ from glustolibs.gluster.lib_utils import list_files from glustolibs.misc.misc_libs import upload_scripts -@runs_on([['replicated'], +@runs_on([['arbiter'], ['glusterfs', 'nfs', 'cifs']]) class ArbiterSelfHealTests(GlusterBaseClass): """ diff --git a/tests/functional/arbiter/test_remove_faulty_subvol_and_add_new_subvol.py b/tests/functional/arbiter/test_remove_faulty_subvol_and_add_new_subvol.py index d6593ac82..2c0490b9f 100644 --- a/tests/functional/arbiter/test_remove_faulty_subvol_and_add_new_subvol.py +++ b/tests/functional/arbiter/test_remove_faulty_subvol_and_add_new_subvol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2018 Red Hat, Inc. +# Copyright (C) 2015-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,7 +32,7 @@ from glustolibs.io.utils import (collect_mounts_arequal, wait_for_io_to_complete) -@runs_on([['distributed-replicated'], +@runs_on([['distributed-arbiter'], ['glusterfs', 'nfs', 'cifs']]) class TestArbiterSelfHeal(GlusterBaseClass): """ @@ -61,19 +61,6 @@ class TestArbiterSelfHeal(GlusterBaseClass): def setUp(self): # Calling GlusterBaseClass setUp self.get_super_method(self, 'setUp')() - - # Setup Volumes - if self.volume_type == "distributed-replicated": - self.volume_configs = [] - - # Redefine distributed-replicated volume - self.volume['voltype'] = { - 'type': 'distributed-replicated', - 'replica_count': 3, - 'dist_count': 2, - 'arbiter_count': 1, - 'transport': 'tcp'} - self.all_mounts_procs = [] self.io_validation_complete = False diff --git a/tests/functional/arbiter/test_replacing_all_arbiter_bricks_in_the_volume.py b/tests/functional/arbiter/test_replacing_all_arbiter_bricks_in_the_volume.py index 03e704491..b95a977a0 100755 --- a/tests/functional/arbiter/test_replacing_all_arbiter_bricks_in_the_volume.py +++ b/tests/functional/arbiter/test_replacing_all_arbiter_bricks_in_the_volume.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2018 Red Hat, Inc. +# Copyright (C) 2015-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ from glustolibs.io.utils import (validate_io_procs, wait_for_io_to_complete) -@runs_on([['distributed-replicated'], +@runs_on([['distributed-arbiter'], ['glusterfs']]) class TestArbiterSelfHeal(GlusterBaseClass): """ @@ -64,19 +64,6 @@ class TestArbiterSelfHeal(GlusterBaseClass): def setUp(self): # Calling GlusterBaseClass setUp self.get_super_method(self, 'setUp')() - - # Setup Volumes - if self.volume_type == "distributed-replicated": - self.volume_configs = [] - - # Redefine distributed-replicated volume - self.volume['voltype'] = { - 'type': 'distributed-replicated', - 'replica_count': 3, - 'dist_count': 4, - 'arbiter_count': 1, - 'transport': 'tcp'} - self.all_mounts_procs = [] self.io_validation_complete = False self.bricks_to_clean = [] diff --git a/tests/functional/arbiter/test_resolving_meta_data_split_brain_extended_attributes.py b/tests/functional/arbiter/test_resolving_meta_data_split_brain_extended_attributes.py index 02444c80a..954098677 100644 --- a/tests/functional/arbiter/test_resolving_meta_data_split_brain_extended_attributes.py +++ b/tests/functional/arbiter/test_resolving_meta_data_split_brain_extended_attributes.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2018 Red Hat, Inc. +# Copyright (C) 2015-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,7 +30,7 @@ from glustolibs.io.utils import (validate_io_procs, wait_for_io_to_complete) -@runs_on([['distributed-replicated'], +@runs_on([['distributed-arbiter'], ['glusterfs', 'nfs', 'cifs']]) class TestArbiterSelfHeal(GlusterBaseClass): """ @@ -42,17 +42,6 @@ class TestArbiterSelfHeal(GlusterBaseClass): def setUp(self): # Calling GlusterBaseClass setUp self.get_super_method(self, 'setUp')() - - # Setup Volumes - if self.volume_type == "distributed-replicated": - # Redefine distributed-replicated volume - self.volume['voltype'] = { - 'type': 'distributed-replicated', - 'replica_count': 3, - 'dist_count': 2, - 'arbiter_count': 1, - 'transport': 'tcp'} - self.all_mounts_procs = [] self.io_validation_complete = False diff --git a/tests/functional/arbiter/test_self_heal_50k_files_heal_command_by_add_brick.py b/tests/functional/arbiter/test_self_heal_50k_files_heal_command_by_add_brick.py index 01da1b144..06f1f42c0 100644 --- a/tests/functional/arbiter/test_self_heal_50k_files_heal_command_by_add_brick.py +++ b/tests/functional/arbiter/test_self_heal_50k_files_heal_command_by_add_brick.py @@ -36,7 +36,7 @@ from glustolibs.gluster.heal_ops import trigger_heal from glustolibs.io.utils import (collect_mounts_arequal, validate_io_procs) -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'nfs']]) class TestSelfHeal(GlusterBaseClass): """ @@ -44,22 +44,6 @@ class TestSelfHeal(GlusterBaseClass): Arbiter Test cases related to healing in default configuration of the volume """ - - @classmethod - def setUpClass(cls): - # Calling GlusterBaseClass setUpClass - cls.get_super_method(cls, 'setUpClass')() - - # Overriding the volume type to specifically test the volume type - # Change from distributed-replicated to arbiter - if cls.volume_type == "distributed-replicated": - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - def setUp(self): # Calling GlusterBaseClass setUp self.get_super_method(self, 'setUp')() diff --git a/tests/functional/arbiter/test_self_heal_algorithm_full_daemon_off.py b/tests/functional/arbiter/test_self_heal_algorithm_full_daemon_off.py index c3c5c5ada..99c0f400c 100644 --- a/tests/functional/arbiter/test_self_heal_algorithm_full_daemon_off.py +++ b/tests/functional/arbiter/test_self_heal_algorithm_full_daemon_off.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2018 Red Hat, Inc. +# Copyright (C) 2015-2020 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,7 +32,7 @@ from glustolibs.misc.misc_libs import upload_scripts from glustolibs.io.utils import (collect_mounts_arequal, validate_io_procs) -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'cifs', 'nfs']]) class TestSelfHeal(GlusterBaseClass): """ @@ -46,16 +46,6 @@ class TestSelfHeal(GlusterBaseClass): # Calling GlusterBaseClass setUpClass cls.get_super_method(cls, 'setUpClass')() - # Overriding the volume type to specifically test the volume type - # Change from distributed-replicated to arbiter - if cls.volume_type == "distributed-replicated": - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on mounts", cls.clients) diff --git a/tests/functional/arbiter/test_self_heal_differing_in_file_type.py b/tests/functional/arbiter/test_self_heal_differing_in_file_type.py index 201846fe4..d8d93a9ee 100755 --- a/tests/functional/arbiter/test_self_heal_differing_in_file_type.py +++ b/tests/functional/arbiter/test_self_heal_differing_in_file_type.py @@ -34,7 +34,7 @@ from glustolibs.io.utils import ( wait_for_io_to_complete) -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'cifs', 'nfs']]) class TestSelfHeal(GlusterBaseClass): """ @@ -48,16 +48,6 @@ class TestSelfHeal(GlusterBaseClass): # Calling GlusterBaseClass setUpClass cls.get_super_method(cls, 'setUpClass')() - # Overriding the volume type to specifically test the volume type - # Change from distributed-replicated to arbiter - if cls.volume_type == "distributed-replicated": - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on mounts", cls.clients) diff --git a/tests/functional/arbiter/test_self_heal_symbolic_links.py b/tests/functional/arbiter/test_self_heal_symbolic_links.py index f0475a8d2..6907f8805 100644 --- a/tests/functional/arbiter/test_self_heal_symbolic_links.py +++ b/tests/functional/arbiter/test_self_heal_symbolic_links.py @@ -35,7 +35,7 @@ from glustolibs.io.utils import (collect_mounts_arequal, wait_for_io_to_complete) -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'nfs']]) class TestSelfHeal(GlusterBaseClass): """ @@ -49,16 +49,6 @@ class TestSelfHeal(GlusterBaseClass): # Calling GlusterBaseClass setUpClass cls.get_super_method(cls, 'setUpClass')() - # Overriding the volume type to specifically test the volume type - # Change from distributed-replicated to arbiter - if cls.volume_type == "distributed-replicated": - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on mounts", cls.clients) -- cgit