Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra temp hash empty dir appears in SSHContext remote #177

Closed
LavendaRaphael opened this issue Apr 12, 2022 · 3 comments · Fixed by #261 or #346
Closed

Extra temp hash empty dir appears in SSHContext remote #177

LavendaRaphael opened this issue Apr 12, 2022 · 3 comments · Fixed by #261 or #346
Labels
bug Something isn't working

Comments

@LavendaRaphael
Copy link
Contributor

I found that when I use SSHContext, after running dpdispatcher, 2 hash directories appear in the remote directory:

  • One is empty.
  • The other is the working directory,

I found out that the problem is

@njzjz njzjz added the bug Something isn't working label Apr 13, 2022
njzjz added a commit to njzjz/dpdispatcher that referenced this issue Sep 18, 2022
njzjz added a commit that referenced this issue Sep 18, 2022
@njzjz
Copy link
Member

njzjz commented Sep 18, 2022

Fixed by #261.

@LavendaRaphael
Copy link
Contributor Author

Fixed by #261.

The modification resolves the issue in case of a run without interruption.
But for the old submission case, the empty directory appeared again.

def try_recover_from_json(self):
submission_file_name = "{submission_hash}.json".format(submission_hash=self.submission_hash)
if_recover = self.machine.context.check_file_exists(submission_file_name)
submission = None
submission_dict = {}
if if_recover :
submission_dict_str = self.machine.context.read_file(fname=submission_file_name)
submission_dict = json.loads(submission_dict_str)
submission = Submission.deserialize(submission_dict=submission_dict)
submission.bind_machine(machine=self.machine)
if self == submission:
self.belonging_jobs = submission.belonging_jobs
self.bind_machine(machine=self.machine)
dlog.info(f"Find old submission; recover submission from json file;"
f"submission.submission_hash:{submission.submission_hash}; "
f"machine.context.remote_root:{self.machine.context.remote_root}; "
f"submission.work_base:{submission.work_base};")
# self = submission.bind_machine(machine=self.machine)

@njzjz njzjz reopened this Sep 19, 2022
njzjz added a commit that referenced this issue Jun 27, 2023
Fix #177.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
@njzjz
Copy link
Member

njzjz commented Jun 27, 2023

Fixed in #346.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants