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

PMM-12529 run pmm-agent as non-root #2585

Closed
wants to merge 7 commits into from

Conversation

ademidoff
Copy link
Member

@ademidoff ademidoff commented Oct 31, 2023

PMM-12529

Link to the Feature Build: SUBMODULES-3431

Note: this change works well in PMM v2, let's see if we can merge it there. Maybe there is no reason to wait for v3.

@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #2585 (fe01d68) into main (1cca6f9) will increase coverage by 0.76%.
Report is 2 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2585      +/-   ##
==========================================
+ Coverage   41.99%   42.75%   +0.76%     
==========================================
  Files         391      391              
  Lines       49099    49099              
==========================================
+ Hits        20619    20994     +375     
+ Misses      26540    26131     -409     
- Partials     1940     1974      +34     
Flag Coverage Δ
admin 10.41% <ø> (-0.05%) ⬇️
agent 53.60% <ø> (+3.48%) ⬆️
managed 43.48% <ø> (+<0.01%) ⬆️
vmproxy 68.57% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
managed/services/supervisord/pmm_config.go 7.69% <ø> (ø)

... and 11 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ademidoff ademidoff marked this pull request as ready for review October 31, 2023 15:58
@ademidoff ademidoff requested a review from a team as a code owner October 31, 2023 15:58
@ademidoff ademidoff requested review from idoqo and artemgavrilov and removed request for a team October 31, 2023 15:58
@@ -100,10 +100,10 @@
non_unique: true
loop:
- { name: pmm, gid: 1000 }
- { name: pmm-agent, gid: 1001 }
Copy link
Member Author

@ademidoff ademidoff Oct 31, 2023

Choose a reason for hiding this comment

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

This was a dirty hack a year ago, which resulted in non-unique group and user ids.
In particular, pmm-agent overlaps with ssh_keys in RHEL9:

[root@pmm-server pmm] # ls -la /usr/local/percona/pmm2
total 48
drwxr-xr-x 1 pmm-agent ssh_keys 4096 Oct 31 08:40 .
drwxr-xr-x 1 pmm-agent ssh_keys 4096 Oct 31 08:37 ..
drwxr-xr-x 2 pmm-agent ssh_keys 4096 Oct 31 08:37 bin
drwxr-xr-x 1 pmm-agent ssh_keys 4096 Oct 31 08:38 cache
drwxr-xr-x 4 pmm-agent ssh_keys 4096 Oct 31 08:37 collectors
drwxr-xr-x 1 pmm-agent ssh_keys 4096 Oct 31 09:39 config
drwxr-xr-x 2 pmm-agent ssh_keys 4096 Oct 31 08:37 exporters
drwx------ 1 pmm-agent ssh-keys 4096 Oct 31 09:43 tmp
drwxr-xr-x 2 pmm-agent ssh_keys 4096 Oct 31 08:37 tools

I believe we'd better change it so it doesn't come in conflict with the existing groups.

@ademidoff ademidoff closed this Nov 3, 2023
@ademidoff ademidoff deleted the PMM-12529-run-pmm-agent-as-non-root branch November 3, 2023 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants