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

Allow Popeye to be used by more than one user on a host (/tmp/popeye.log permission problem) #301

Closed
jim-barber-he opened this issue Mar 27, 2024 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@jim-barber-he
Copy link




Is your feature request related to a problem? Please describe.

I manage multiple clusters, and on my system I sudo to different user IDs to manage them.
If I run popeye as one user, it creates a /tmp/popeye.log owned by the user.
If I then try to run popeye as another user it errors like so:

$ popeye version     
Unable to create Popeye log file open /tmp/popeye.log: permission denied. Exiting...

It would be good to be able to have popeye work around this limitation.

Describe the solution you'd like

To be able to run popeye as one user, then be able to run it as another user without the original user (or root) having to remove the /tmp/popeye.log file first.

Describe alternatives you've considered

As for implementation there are so many valid ways you can tackle this, that it would be up you.
E.g.

  • Create a /tmp/popeye-$UID.log file instead.
  • Create a /tmp/popeye-$PID.log file instead.
  • Keep creating /tmp/popeye.log and if it can't be written to fall back on one of the options above.
  • Keep creating /tmp/popeye.log and if it can't be written to proceed with a warning (configurable to be turned off) and don't produce a log file at all.
  • Provide an option to not create a popeye.log file at all (configurable via an environment variable would be nice)
  • Create a /tmp/$UID/popeye.log instead.
    And so on.

Additional context
Add any other context or screenshots about the feature request here.

Hopefully the above captures my request.

tmojzes pushed a commit to tmojzes/popeye that referenced this issue Sep 13, 2024
desc: Fixes log file creation if Popeye was run with root user on linux.
      The file creation was failing with permission denied error.
      It was mentioned here: derailed#301

tmojzi96@gmail.com
@derailed
Copy link
Owner

@jim-barber-he Thank you for the heads up!
In the next drop, I have added a cli arg to disable logs aka --logs none.
This won't automatically create a log file and use stdout instead.
Another thing you will be able to do is use --logs /tmp/$USER/popeye.log so you can track logs per users.
Would this help?

@derailed derailed added enhancement New feature or request question Further information is requested labels Dec 30, 2024
derailed added a commit that referenced this issue Dec 30, 2024
@derailed derailed mentioned this issue Dec 30, 2024
derailed added a commit that referenced this issue Dec 30, 2024
@derailed
Copy link
Owner

Fixed v0.21.6

@jim-barber-he
Copy link
Author

@jim-barber-he Thank you for the heads up! In the next drop, I have added a cli arg to disable logs aka --logs none. This won't automatically create a log file and use stdout instead. Another thing you will be able to do is use --logs /tmp/$USER/popeye.log so you can track logs per users. Would this help?

Sounds perfect. Thanks.

tmeijn pushed a commit to tmeijn/dotfiles that referenced this issue Jan 3, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [derailed/popeye](https://github.com/derailed/popeye) | patch | `v0.21.5` -> `v0.21.6` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>derailed/popeye (derailed/popeye)</summary>

### [`v0.21.6`](https://github.com/derailed/popeye/releases/tag/v0.21.6)

[Compare Source](derailed/popeye@v0.21.5...v0.21.6)

<img src="https://raw.githubusercontent.com/derailed/popeye/master/assets/popeye_logo.png" align="right" width="200" height="auto"/>

### Release v0.21.6
#### Notes

Thank you to all that contributed with flushing out issues and enhancements for Popeye! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make Popeye better is as ever very much noticed and appreciated!

This project offers a GitHub Sponsor button (over here 👆). As you well know this is not pimped out by big corps with deep pockets. If you feel `Popeye` is saving you cycles diagnosing potential cluster issues please consider sponsoring this project!! It does go a long way in keeping our servers lights on and beers in our fridge.

Also if you dig this tool, please make some noise on social! [@&#8203;kitesurfer](https://twitter.com/kitesurfer)

***

#### Maintenance Release

***

#### Resolved Issues

-   [#&#8203;370](derailed/popeye#370) default service account check
-   [#&#8203;356](derailed/popeye#356) Allow foreground execution, with output to STDOUT/STDERR and disabling output to popeye.log file
-   [#&#8203;341](derailed/popeye#341) Linter Node : no linters matched query
-   [#&#8203;337](derailed/popeye#337) Output logs in stdout instead of file
-   [#&#8203;301](derailed/popeye#301) Allow Popeye to be used by more than one user on a host (/tmp/popeye.log permission problem)
-   [#&#8203;267](derailed/popeye#267) Allow container exclusions based on regex
-   [#&#8203;200](derailed/popeye#200) Can't filter containers in spinach.yaml for deployments
-   [#&#8203;168](derailed/popeye#168) Skip checks at container level

***

<img src="https://raw.githubusercontent.com/derailed/popeye/master/assets/imhotep_logo.png" width="32" height="auto"/>  © 2024 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44Ni4wIiwidXBkYXRlZEluVmVyIjoiMzkuODYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants