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

Make the pidfile accessible by everyone #3252

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

mcasquer
Copy link
Collaborator

@mcasquer mcasquer commented Oct 1, 2024

Creates the pidfile at an accessible location
for every user, this way the manage pidfile
warning is avoided.

Pull Request Checklist

  • implement the feature
  • write the documentation
  • extend the test coverage
  • update the specification
  • mention the version
  • include a release note

@mcasquer mcasquer marked this pull request as ready for review October 1, 2024 11:27
@mcasquer
Copy link
Collaborator Author

mcasquer commented Oct 1, 2024

To discuss here which of the added # noqa could be avoided

tmt/steps/execute/internal.py Outdated Show resolved Hide resolved
@mcasquer mcasquer force-pushed the 2877_pidfile_creation branch 3 times, most recently from 22ff571 to f5768f3 Compare October 11, 2024 10:23
@psss psss added this to the 1.38 milestone Oct 17, 2024
@mcasquer mcasquer force-pushed the 2877_pidfile_creation branch 2 times, most recently from 83819a0 to d2dafc9 Compare October 22, 2024 09:17
@happz happz added the ci | full test Pull request is ready for the full test execution label Oct 22, 2024
@mcasquer mcasquer force-pushed the 2877_pidfile_creation branch from d2dafc9 to acb4820 Compare October 22, 2024 09:50
@mcasquer mcasquer force-pushed the 2877_pidfile_creation branch 2 times, most recently from d45af53 to 0dc6e94 Compare October 24, 2024 12:15
@thrix thrix modified the milestones: 1.38, 1.39 Oct 25, 2024
@psss psss changed the title Makes the pidfile accessible by everyone Make the pidfile accessible by everyone Oct 31, 2024
tmt/steps/execute/internal.py Outdated Show resolved Hide resolved
@mcasquer
Copy link
Collaborator Author

@happz one question, in the related issue with the patch it's used tmt -a provision -h local which IIUC it's the local host already executing tmt, in this case the code raises again permissions issues when doing the chmod

@happz
Copy link
Collaborator

happz commented Oct 31, 2024

@happz one question, in the related issue with the patch it's used tmt -a provision -h local which IIUC it's the local host already executing tmt, in this case the code raises again permissions issues when doing the chmod

Is your change here causing a regression? Or is your change here just making no difference WRT #2877?

@thrix
Copy link
Collaborator

thrix commented Jan 21, 2025

@carlosrodfern howdy, I am the 1.42 release lead, can you please re-review if ok with you?

@thrix thrix force-pushed the 2877_pidfile_creation branch from 29becf5 to cd4374c Compare January 21, 2025 09:23
@thrix thrix added the command | run tmt run commanda label Jan 21, 2025
@mcasquer
Copy link
Collaborator Author

mcasquer commented Jan 21, 2025

You could test getting the setfacl out of the if not self.workdir_root.is_dir(), or perhaps remove the condition all together:

Sorry @carlosrodfern for not replying, I removed the condition but it seems tests are still failing

@carlosrodfern
Copy link
Contributor

carlosrodfern commented Jan 21, 2025 via email

@mcasquer mcasquer force-pushed the 2877_pidfile_creation branch from cd4374c to e529b4c Compare January 22, 2025 06:42
@carlosrodfern
Copy link
Contributor

carlosrodfern commented Jan 26, 2025

@mcasquer, I created a pull request with a fix. I tested it on your changes and they pass: #3483

You can pull the commit locally and test it to verify, and then, after my PR is reviewed and merged, you can update your branch with main, and that should make this PR pass all the become container tests.

@thrix thrix added the status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. label Jan 27, 2025
@thrix thrix modified the milestones: 1.42, 1.43 Jan 28, 2025
@thrix thrix removed the status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. label Jan 28, 2025
@mcasquer mcasquer force-pushed the 2877_pidfile_creation branch from e529b4c to 605c935 Compare January 29, 2025 08:14
Creates the pidfile at an accessible location
for every user, this way the manage pidfile
warning is avoided.

Signed-off-by: mcasquer <[email protected]>
when it doesn't exist.

Signed-off-by: mcasquer <[email protected]>
Also formats the pid directory creation command.

Signed-off-by: mcasquer <[email protected]>
This way we avoid TestingFarm to set the old values.

Signed-off-by: mcasquer <[email protected]>
in the pidfile creation. Also includes the super().setup() call to
the setup GuestSsh function.

Signed-off-by: mcasquer <[email protected]>
every time the user has no privileges

Signed-off-by: mcasquer <[email protected]>
After properly setting the permissions and the
access control list evrything should be world-writable.

Signed-off-by: mcasquer <[email protected]>
Since it keeps the directory is directly mounted in the
containers, removing the check should always execute the chmod and
setfacl in the workdir directory.

Signed-off-by: mcasquer <[email protected]>
@mcasquer mcasquer force-pushed the 2877_pidfile_creation branch from 605c935 to 685584e Compare February 3, 2025 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci | full test Pull request is ready for the full test execution command | run tmt run commanda
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only first user can run provision -h local. Other lack lock file permissions.
7 participants