def corrupt_sstables(self):
     logger.debug('Corrupt sstables')
     src = get_data_dir_path('corrupt_sstables.sh')
     dst = '/tmp/corrupt_sstables.sh'
     node = self.db_cluster.nodes[0]
     node.remoter.send_files(src, dst)
     node.remoter.run('chmod +x {}'.format(dst))
     node.remoter.run('sudo {}'.format(dst))
 def downgrade_node(self, node):
     self.log.info('Downgrading a Node')
     scylla_repo = get_data_dir_path('scylla.repo.downgrade')
     node.remoter.send_files(scylla_repo, '/tmp/scylla.repo', verbose=True)
     node.remoter.run('sudo cp /tmp/scylla.repo /etc/yum.repos.d/scylla.repo')
     node.remoter.run('sudo chown root.root /etc/yum.repos.d/scylla.repo')
     node.remoter.run('sudo chmod 644 /etc/yum.repos.d/scylla.repo')
     node.remoter.run('sudo yum clean all')
     node.remoter.run('sudo yum downgrade scylla scylla-conf scylla-server scylla-jmx scylla-tools -y')
     node.remoter.run('sudo systemctl restart scylla-server.service')
     node.wait_db_up(verbose=True)
 def get_stress_cmd_profile(self):
     cs_custom_config = get_data_dir_path('cassandra-stress-custom-mixed-narrow-wide-row.yaml')
     with open(cs_custom_config, 'r') as cs_custom_config_file:
         self.log.info('Using custom cassandra-stress config:')
         self.log.info(cs_custom_config_file.read())
     for node in self.loaders.nodes:
         node.remoter.send_files(cs_custom_config,
                                 '/tmp/cassandra-stress-custom-mixed-narrow-wide-row.yaml',
                                 verbose=True)
     ip = self.db_cluster.get_node_private_ips()[0]
     return ('cassandra-stress user '
             'profile=/tmp/cassandra-stress-custom-mixed-narrow-wide-row.yaml '
             'ops\(insert=1\) -node %s' % ip)
 def downgrade_node(self, node):
     self.log.info('Downgrading a Node')
     scylla_repo = get_data_dir_path('scylla.repo.downgrade')
     node.remoter.send_files(scylla_repo, '/tmp/scylla.repo', verbose=True)
     node.remoter.run(
         'sudo cp /tmp/scylla.repo /etc/yum.repos.d/scylla.repo')
     node.remoter.run('sudo chown root.root /etc/yum.repos.d/scylla.repo')
     node.remoter.run('sudo chmod 644 /etc/yum.repos.d/scylla.repo')
     node.remoter.run('sudo yum clean all')
     node.remoter.run(
         'sudo yum downgrade scylla scylla-conf scylla-server scylla-jmx scylla-tools -y'
     )
     node.remoter.run('sudo systemctl restart scylla-server.service')
     node.wait_db_up(verbose=True)
Example #5
0
 def get_stress_cmd_profile(self):
     cs_custom_config = get_data_dir_path(
         'cassandra-stress-custom-mixed-narrow-wide-row.yaml')
     with open(cs_custom_config, 'r') as cs_custom_config_file:
         self.log.info('Using custom cassandra-stress config:')
         self.log.info(cs_custom_config_file.read())
     for node in self.loaders.nodes:
         node.remoter.send_files(
             cs_custom_config,
             '/tmp/cassandra-stress-custom-mixed-narrow-wide-row.yaml',
             verbose=True)
     ip = self.db_cluster.get_node_private_ips()[0]
     return (
         'cassandra-stress user '
         'profile=/tmp/cassandra-stress-custom-mixed-narrow-wide-row.yaml '
         'ops\(insert=1\) -node %s' % ip)
 def test_write_mode(self):
     """
     Run cassandra-stress with params defined in data_dir/scylla.yaml
     """
     cs_custom_config = get_data_dir_path('cassandra-stress-custom.yaml')
     with open(cs_custom_config, 'r') as cs_custom_config_file:
         self.log.info('Using custom cassandra-stress config:')
         self.log.info(cs_custom_config_file.read())
     for node in self.loaders.nodes:
         node.remoter.send_files(cs_custom_config,
                                 '/tmp/cassandra-stress-custom.yaml',
                                 verbose=True)
     ip = self.db_cluster.get_node_private_ips()[0]
     cs_command = ('cassandra-stress user '
                   'profile=/tmp/cassandra-stress-custom.yaml '
                   'ops\(insert=1\) -node %s' % ip)
     self.run_stress(stress_cmd=cs_command)
Example #7
0
 def test_write_mode(self):
     """
     Run cassandra-stress with params defined in data_dir/scylla.yaml
     """
     cs_custom_config = get_data_dir_path('cassandra-stress-custom.yaml')
     with open(cs_custom_config, 'r') as cs_custom_config_file:
         self.log.info('Using custom cassandra-stress config:')
         self.log.info(cs_custom_config_file.read())
     for node in self.loaders.nodes:
         node.remoter.send_files(cs_custom_config,
                                 '/tmp/cassandra-stress-custom.yaml',
                                 verbose=True)
     ip = self.db_cluster.get_node_private_ips()[0]
     cs_command = ('cassandra-stress user '
                   'profile=/tmp/cassandra-stress-custom.yaml '
                   'ops\(insert=1\) -node %s' % ip)
     self.run_stress(stress_cmd=cs_command)