Problem: Pulp 3 can't sync when installed along side Pulp 2 #102
Conversation
3923bf4
to
aae9591
Compare
|
I just filed https://pulp.plan.io/issues/5154 related to this also. That is going to require a code change in Pulp. |
|
@pulp/release-engineering Can I get a review? |
|
@dkliban sorry for the slow review! Does this change ensure that these permissions are also present on upgraded (2.x to 2.20) installs? Btw, we also manage a few files/folders under |
|
A brief test with a different RPM proves otherwise, the permissions are updated. |
|
@ekohl any objections? |
|
@evgeni, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My biggest worry about this is newly created files. Usually they're not created with the correct ownership and permissions. It's a much bigger task, but should we instead focus on running the actual application as pulp:pulp? mod_wsgi can do that but we just don't configure it.
|
@ekohl We are addressing that concern as part of this ticket: https://pulp.plan.io/issues/5154 |
|
No objection, but I can't say I have enough insight to properly know what could go wrong and if it's sufficient. Have you done scratch builds to verify this anything? |
|
One thing that I just realized, this will make all files executable. See http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-FLIST-DEFATTR-DIRECTIVE Do you maybe need |
Good catch. I want all the directories to be 775. So I will update the PR to |
aae9591
to
3d3acf1
Compare
|
I installed pulp-server RPM with these changes. Then I synced and published a repository. I see the following permissions set: And the following And the following: We are also going to introduce a change to pulp workers that will make them create new files with user apache and group pulp. That change is part of https://pulp.plan.io/issues/5154. Because of 5154, I still need to add a change to the spec file that will run chmod on |
|
Thanks @dkliban for testing the RPM. I gather from your output that the change produces the result you wanted and everything else will be handled in Pulp itself in 5154? I do agree with @ekohl that enforcing Also, because you mention pulp-packaging/packages/pulp/pulp.spec Lines 512 to 514 in f6f127c
This will take quite some time if So ACK on this particular change, but "let's talk" on the overall topic :) |
|
@evgeni The files that are created in /var/lib/pulp/content are created by celery workers. The solution to 5154 is to adjust the systemd unit files for workers to start with these same permissions. I am also concerned about the amount of time it will take users to upgrade. Let's hold off on merging this PR. I may even want to revert the other change to the spec file that relabels the filesystem. |
|
OK, holding until you yell again :) |
3d3acf1
to
04fe8e7
Compare
|
@dkliban This looks right to me, but I think security wise this needs to come w/ a release note. What if it's a shared environment? Making the data world readable needs to be understood by the admin. |
|
@bmbouter good point, but isn't the default |
|
It always was world readable |
|
@dkliban oh so this reverts to what it was before we made any changes? |
|
@bmbouter - that's right. but it also adds a new group called pulp and makes /var/lib/pulp/ writable by group pulp. I will break these two things up into separate commits. That way the revert can be part of 2.20.1 and the new group can be part of 2.21.0. |
|
@dkliban cool |
Solution: stop calling chown during upgrade fixes: #5220 https://pulp.plan.io/issues/5220
Solution: make /var/lib/pulp writable by group 'pulp' fixes: #5152 https://pulp.plan.io/issues/5152
04fe8e7
to
7cd3c38
Compare
|
@pulp/release-engineering This is ready for final review and merge. I've split this up over 2 commits. |
|
Thanks @dkliban! |
Solution: make /var/lib/pulp writable by group 'pulp'
This patch also removes the recursive chown for /var/lib/pulp.
fixes: #5152
https://pulp.plan.io/issues/5152