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
nixos/nextcloud: fix postgresql/redis test #68441
Conversation
@GrahamcOfBorg test nextcloud.with-postgresql-and-redis |
|
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.
Can you remove the chown-redis-socket service, and instead broaden permissions on the file socket, or switch to link-local networking?
@@ -46,7 +46,7 @@ in { | |||
systemd.services.redis = { | |||
preStart = '' | |||
mkdir -p /var/run/redis | |||
chown ${config.services.redis.user}:${config.services.nginx.group} /var/run/redis | |||
chown redis:${config.services.nginx.group} /var/run/redis |
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.
If we want the test to keep using the file socket (and not link-local networking instead, we should instead set unixsocketperm
in the test to something more permissive.
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.
I'm honestly not sure what you mean, :)
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.
do you mind writing what you think would be appropriate?
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.
These lines seem to exist only to get php to be able to connect to redis.
Further down, configureRedis = pkgs.writeScript "configure-redis"
runs nextcloud-occ
and configures nextcloud to connect to redis at /var/run/redis/redis.sock
.
This preStart
tries to extend the existing redis
systemd service to obtain a less restrictive /run/redis
folder (which contains the unix socket file).
However, /run/redis
and its permissions are managed by systemd's RuntimeDirectory
nowadays (and /var/run/ is a symlink to
/run`), so this doesn't have the desired effect.
I'd suggest to drop the preStart
, services.redis.unixSocket
and services.redis.extraConfig
, and configure nextcloud to connect to localhost:6379
.
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.
makes more sense, i don't dabble much with systemd, it's next on my plate. Thanks!
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.
Do you feel confident to update the PR with this suggestions?
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.
I do, just slammed in my personal life with obligations (friends visiting from out of town)
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.
No worries :-)
hmm, I forgot about this... sorry @flokli |
10f7a32
to
6d330ce
Compare
still not entirely sure what I'm doing :) |
Current Failure :(
|
6d330ce
to
5e8ae58
Compare
@flokli I really have no idea what I'm doing at this point. I tried getting the services to communicate over localhost and just hit a wall with it "not being able to find the nextcloud user" |
There seems to be some breakage with connecting to postgresql during the installation:
This is broken already without redis. After the installation fails, we still seem to try to run the |
Can take a look at this later that day :) |
Just pushed a patch that fixes the test locally. @flokli @jonringer would you mind re-reviewing? :) |
can't believe i didn't see the port line... oops ;) |
Motivation for this change
While reviewing ##68435, I noticed one of the tests were failing on master.
redis.user
option was removed here #67845Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @flokli @eqyiel @infinisil