-
Notifications
You must be signed in to change notification settings - Fork 144
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
Only first user can run provision -h local. Other lack lock file permissions. #2877
Comments
Summary from the discussion: We could make the pidfile writeable by anyone. Looks like a first good issue. Let's see! |
@psss I've been thinking about two possible solutions
|
I'm afraid that would break tmt/tmt/steps/execute/scripts/tmt-reboot Lines 3 to 9 in 6d08a7b
Hm, could it be caused by the sticky bit of
This seems to be working. Not sure how safe this approach would be though. @happz, any thoughts on this? |
The only hard rule is probably the location, pid file must be possible to find from multiple tmt invocations so one can reboot the machine while the other is still running. So any directory on which they can agree should be fine. This most likely rules out |
"Change the default test pidfile directory to /var/tmp": 7552550 |
@psss @happz I'll try to be more specific, likely I am missing something obvious Including the following code at internal.py creates once the desired path and gives it full permissions: pid_directory = '/var/tmp/pid'
Path(pid_directory).mkdir(parents=True, exist_ok=True)
os.chmod(pid_directory, 0o777)
TEST_PIDFILE_ROOT = Path(pid_directory) # noqa: S108 insecure usage of temporary dir After
But if It try with a different user
For sure, I can access the directory, so that's why I thought about the owner issue |
Can you run it with |
@happz thanks ! Indeed, if only the chmod is done when the user matches to the file owner the issue is solved, I will send a PR for this issue :) |
Moved to 1.43 as the underlying PRs still need more work, and they were already moved. |
As a root create two users and execute tmt run for each of them in sequence:
Debug output shows
The text was updated successfully, but these errors were encountered: