ivandasch commented on a change in pull request #8267:
URL: https://github.com/apache/ignite/pull/8267#discussion_r494169002



##########
File path: modules/ducktests/tests/ignitetest/utils/ignite_test.py
##########
@@ -40,3 +44,45 @@ def monotonic():
             so that only the difference between the results of consecutive 
calls is valid.
         """
         return monotonic()
+
+    def copy_ignite_root_dir(self):
+        """
+        Copying root directory from service nodes to the results directory.
+        """
+        for service in self.test_context.services:
+            if not isinstance(service, IgniteService):
+                self.logger.debug("Won't collect service workdir from %s." % 
service.service_id)
+                continue
+
+            if service.config.data_storage and 
service.config.data_storage.default.persistent:
+                # Try to copy the root directory
+                self.logger.debug("Copying persistence dir...")
+                try:
+                    for node in service.nodes:
+                        dest = os.path.join(
+                            TestContext.results_dir(self.test_context, 
self.test_context.test_index),
+                            service.service_id, node.account.hostname)
+                        self.logger.debug("Dest dir " + dest)
+                        if not os.path.isdir(dest):
+                            mkdir_p(dest)
+
+                        tgz_root = '%s.tgz' % PersistenceAware.PERSISTENT_ROOT
+
+                        
node.account.ssh(compress_cmd(PersistenceAware.PERSISTENT_ROOT, tgz_root))
+                        node.account.copy_from(tgz_root, dest)
+                except Exception as ex:

Review comment:
       Please, inline warning W0703 and remove it from class comment.
   
   




----------------------------------------------------------------
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]


Reply via email to