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

Inject nohup to make sure that bkill executes after ert dies #8936

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ert/scheduler/lsf_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ async def kill(self, iens: int) -> None:
return_on_msgs=(JOB_ALREADY_FINISHED_BKILL_MSG),
)
await asyncio.create_subprocess_shell(
f"sleep {self._sleep_time_between_bkills}; {self._bkill_cmd} -s SIGKILL {job_id}",
f"nohup sh -c 'sleep {self._sleep_time_between_bkills}; {self._bkill_cmd} -s SIGKILL {job_id}' &",
Copy link
Contributor

@jonathan-eq jonathan-eq Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this would work as we already have start_new_session=True. Can we remove that flag with nohup?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as start_new_session works (I think it does until proven otherwise), start_new_session is the approach to go for.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't got to test it yet. If it works I'll close the PR.

start_new_session=True,
stdout=asyncio.subprocess.DEVNULL,
stderr=asyncio.subprocess.DEVNULL,
Expand Down
Loading