-
Notifications
You must be signed in to change notification settings - Fork 60
fix(pebble): /var/lib/pebble/default has mode 0777 #473
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
fix(pebble): /var/lib/pebble/default has mode 0777 #473
Conversation
ce7fd4e to
c21431e
Compare
This commit ensures that the PEBBLE default directory /var/lib/pebble/default always has the mode 0777. Previously, the mode of the PEBBLE dir was only set to 0777 if there were services or checks specified in the rockcraft.yaml. Otherwise, it used to be 0755 with user=root group=root. This meant that if pebble was being run as some user other than root, using the `run-user` directive or some other way, the pebble run would fail. It would fail because pebble could not create the necessary files (socket) inside that directory. This bug is reported in issue canonical#461. Issue canonical#461: canonical#461
4f8c384 to
2d08290
Compare
This commit adds a spread test for non-root user without any services or checks in the rockcraft.yaml. It contains a very minimal rockcraft.yaml with only `run-user` specified.
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.
Nice thanks.
I just have a comment about the new spread test - couldn't we just re-use the existing run-user test? The task.yaml is pretty much the same, with the exception of timeout 15 docker run --rm --name run-user-test-container run-user-test --args test 10, which TBH, isn't too relevant for the run-user test. I don't think adding more tests would slow down Spread, in theory. But I have the impression the Spread tests have been getting slower and slower, so I'm just being cautions. @tigarmo what's your perception on the scalability of the spread tests?
The rockcraft.yaml in that test contains |
y true, and I'm wondering if the existing |
|
I'm fine with either option; generally a new spread test doesn't take too much extra time. This one took about a minute: |
Talked with @sergiusens a while ago and the slowness might be related to the number of tests vs the amount of available resources for the spread tests. I think we can tackle this later in a different PR, as maybe the solution is to simply vertically or horizontally scale the spread backend |
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.
Thanks!
This commit ensures that the PEBBLE default directory /var/lib/pebble/default always has the mode 0777. Previously, the mode of the PEBBLE dir was only set to 0777 if there were services or checks specified in the rockcraft.yaml. Otherwise, it used to be 0755 with user=root group=root. This meant that if pebble was being run as some user other than root, using the `run-user` directive or some other way, the pebble run would fail. It would fail because pebble could not create the necessary files (socket) inside that directory. This bug is reported in issue canonical#461. Fixes canonical#461
Fixes #461.
This PR ensures that the
PEBBLEdefault directory/var/lib/pebble/defaultalways has the mode 0777.Previously, the mode of the
PEBBLEdir was only set to 0777 if there were services or checks specified in therockcraft.yamlfile. Otherwise, it used to be 0755 with user=rootgroup=root. This meant that if Pebble was being run as some user other than root, using therun-userdirective or some other way, the Pebble run would fail. It would fail because Pebble could not create the necessary files (socket) inside that directory. This bug is reported in issue #461.