erp5testnode: clean up old instance root folder
This is backward compatibility code for previous commit.
Showing
... | @@ -26,6 +26,7 @@ | ... | @@ -26,6 +26,7 @@ |
############################################################################## | ############################################################################## | ||
import os | import os | ||
import pkg_resources | import pkg_resources | ||
import shutil | |||
import slapos.slap | import slapos.slap | ||
import subprocess | import subprocess | ||
import time | import time | ||
... | @@ -53,6 +54,7 @@ class SlapOSControler(object): | ... | @@ -53,6 +54,7 @@ class SlapOSControler(object): |
createFolder(shared) | createFolder(shared) | ||
self.shared_part_list = self.shared_part_list + [shared] | self.shared_part_list = self.shared_part_list + [shared] | ||
self.old_instance_root = os.path.join(working_directory, 'inst') | |||
self.instance_root = os.path.join(working_directory, 'i') | self.instance_root = os.path.join(working_directory, 'i') | ||
self.slapos_config = os.path.join(working_directory, 'slapos.cfg') | self.slapos_config = os.path.join(working_directory, 'slapos.cfg') | ||
self.proxy_database = os.path.join(working_directory, 'proxy.db') | self.proxy_database = os.path.join(working_directory, 'proxy.db') | ||
... | @@ -277,6 +279,7 @@ class SlapOSControler(object): | ... | @@ -277,6 +279,7 @@ class SlapOSControler(object): |
self._resetSoftware() | self._resetSoftware() | ||
else: | else: | ||
createFolder(self.software_root) | createFolder(self.software_root) | ||
shutil.rmtree(self.old_instance_root, True) # BBB | |||
|
|||
instance_root = self.instance_root | instance_root = self.instance_root | ||
# Delete any existing partition in order to not get its data (ex. | # Delete any existing partition in order to not get its data (ex. | ||
# MySQL DB content) from previous runs. To support changes of partition | # MySQL DB content) from previous runs. To support changes of partition | ||
... | ... |
-
mentioned in merge request slapos!992 (merged)