Sega76 commented on a change in pull request #8267:
URL: https://github.com/apache/ignite/pull/8267#discussion_r494163539
##########
File path: modules/ducktests/tests/ignitetest/services/ignite.py
##########
@@ -136,6 +158,35 @@ def clean_node(self, node):
node.account.kill_java_processes(self.APP_SERVICE_CLASS,
clean_shutdown=False, allow_fail=True)
node.account.ssh("sudo rm -rf -- %s" % self.PERSISTENT_ROOT,
allow_fail=False)
+ def rename_db(self, new_db_name: str):
+ """
+ Rename db.
+ """
+ for node in self.nodes:
+ self._rename_db(node, new_db_name)
+
+ def _rename_db(self, node, new_db_name: str):
+ """
+ Rename db.
+ """
+ node.account.kill_java_processes(self.APP_SERVICE_CLASS,
clean_shutdown=False, allow_fail=True)
+ node.account.ssh(f"sudo mv {self.WORK_DIR}/db
{self.WORK_DIR}/{new_db_name}", allow_fail=False)
+
+ def copy_snap_to_db(self, snapshot_name: str):
+ """
+ Copy from snapshot to db.
+ """
+ for node in self.nodes:
+ self._copy_snap_to_db(node, snapshot_name)
+
+ def _copy_snap_to_db(self, node, snapshot_name: str):
+ """
+ Copy from snapshot to db.
+ """
+ node.account.kill_java_processes(self.APP_SERVICE_CLASS,
clean_shutdown=False, allow_fail=True)
+ node.account.ssh(f"sudo cp -r {self.SNAPSHOT}/{snapshot_name}/db
{self.WORK_DIR}", allow_fail=False)
+ node.account.ssh(f"sudo chown -R ducker:ducker
{self.PERSISTENT_ROOT}", allow_fail=False)
Review comment:
fixed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]