Services breakage from the PostgreSQL socket-directory configuration change

DoneSubmitted by Christopher Baines.
Details
3 participants
  • Leo Famulari
  • Christopher Baines
  • Mathieu Othacehe
Owner
unassigned
Severity
normal
C
C
Christopher Baines wrote on 24 Feb 2021 01:44
(address . bug-guix@gnu.org)
87lfbel2fa.fsf@cbaines.net
Hey,

When reconfiguring recently, I ran in to issues with the Guix Data
Service and probably the Patchwork service too.

Looking at the change, I think it's clear there's a problem, because
some system tests were changed, and I'm guessing they were changed so
that they passed [1].


Passing tests are good, but working around real issues in tests is not,
because that means that the situation outside of the tests can break and
if it does, the test result is misleading.

Patchwork, the Guix Data Service and maybe other things currently depend
on the default behaviour of PostgreSQL to find the socket. Given that
the service now uses a different (non-default) value, they don't
work.

One workaround, the one employed in the tests is to revert to the old
behaviour for the PostgreSQL service by setting socket-directory to #f.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmA1oXlfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xf5eRAAtPXnoC+rw0R5CBPJKJ2T2ycBli77OnL3
jz2l/DtJLi7lFJpO6JrCp41V96wv4G8JELj0DyOnEUAbui4oNzuGcSFH6NPqtNrA
trYYkdzjCIE2aH4N8jGEVGM5/LcISKIojMKMgAknI0s79dWzVubepIzCN2NU9Ery
L1M4hoo6UOee7Rsw6q7AQZP0h+Ci5SwxXeTbGAvsrqMxmnJXz4NmetJxEyp02Rdx
WEVQxhwAG7BqBf5dFX3JWuhEjlI+nll60fCTw+MWRmQytdgwsYM+mGtT9swI6EMg
6mlpodPTROws8tGEASPL/93/f32F5UyNW1Z0dtWCeeD6VMOypwzUWXL7x4NpS8XC
YdmM9mcaZwC1azXB0d0J5y/Mj0vqGRJf1Khz20dHeCoTBRXOI6HuTXbXSY/8QENr
ztU7dV/6TI/vlMTaf/CDPfgPVGn1Nxs7+Iz5tI1PNhnZjGLLt4l2QMV63GU1mhIq
vO4dAZFgjRrS4MxSrve4sbr2h9EHAdYAL3bXRpdNvfRam5As5Xm7NGvKflimzI2I
FGnFv7Sf1XIgLX/3x9ed1NamOI8pHCCMRysnq2xgql9nX0pvOHc4XM86MiSA1ZIu
rXlrT7E+t/CvaV6yktMHT9Llbc1lKEuSrnSqBoSeZ2iUwm3rTny9htobpD4/h1Ah
LqEE5l1R7fI=
=r2YF
-----END PGP SIGNATURE-----

M
M
Mathieu Othacehe wrote on 25 Feb 2021 14:39
(name . Christopher Baines)(address . mail@cbaines.net)(address . 46737@debbugs.gnu.org)
87a6rsmfky.fsf@gnu.org
Hello Chris,

Toggle quote (3 lines)
> One workaround, the one employed in the tests is to revert to the old
> behaviour for the PostgreSQL service by setting socket-directory to #f.

You're right, sorry about the breakage. As you noticed we are in an
in-between situation where the patch updating Postgresql package to use
"/var/run/postgresql" by default is only on core-updates, but the
service is already using it as a default on master.

This means that "createdb", "dropdb" and other Postgresql user tools
need to have an explicit "-h /var/run/postgresql" argument for now.

Until the package patch gets merged in the master branch, we could set
the "socket-directory" field of <postgresql-config-file> record to #f to
restore an acceptable default behaviour.

WDYT?

Sorry again for breaking things,

Mathieu
C
C
Christopher Baines wrote on 25 Feb 2021 19:35
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 46737@debbugs.gnu.org)
87pn0oj8ql.fsf@cbaines.net
Mathieu Othacehe <othacehe@gnu.org> writes:

Toggle quote (17 lines)
>> One workaround, the one employed in the tests is to revert to the old
>> behaviour for the PostgreSQL service by setting socket-directory to #f.
>
> You're right, sorry about the breakage. As you noticed we are in an
> in-between situation where the patch updating Postgresql package to use
> "/var/run/postgresql" by default is only on core-updates, but the
> service is already using it as a default on master.
>
> This means that "createdb", "dropdb" and other Postgresql user tools
> need to have an explicit "-h /var/run/postgresql" argument for now.
>
> Until the package patch gets merged in the master branch, we could set
> the "socket-directory" field of <postgresql-config-file> record to #f to
> restore an acceptable default behaviour.
>
> WDYT?

I think that would be good. It's unfortunate that the package change is
stuck on core-updates for now, but configuring the service on master to
keep the old behaviour until core-updates is merged sounds sensible.

Thanks,

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmA37gJfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XfYWQ//a8BpwEoDWDikKF59cLc8KkBXDIsN2CwP
WFpQpis44BKmFyEjLdnRdfNEYqiZpUZQtc0NsHzf8XUrM/bRX/6QPAD3lnfw5BZy
XXYU1RhqfBEqhT/kyiTW5ik1qCrFlzL6yjXk9o5BJr/dZbaVB0JhDqDy8odU87pZ
lBRgkAcbtRRenmc/pIXbiUebszAhZGSs3rQsQgP2qGkrLJhicxoFFAZxCrIBhuiI
RpCGglND85FA/5DHc1+HI10FlQxayYaiRbj1e3MO4gXg9GCHkMjabHMaKUp0xpY5
W9Wg/9JHLYwN75WtmCIvuxoNfcL+aUOz7ctzIR7LY7BTlIwq7XU4enMAGI/P4i4e
Hig2LHlM72zqcuZ8LVz6j5ryeZRRW+f12InojSrQ3hjn4T6MtarWcWbTo9extkbA
LkvuPmLsHWr6A+3gyjtSRYYv3MD46QOQorFPdkO2H0MSv8LGVWOxoPvnMmiHZINb
IkwyKYCWyiQL+lUGj5b2kfpbJDQpgsDX+B1UusgT238G+3t9ziUwAzn3NT6lQOgt
RWauZ7T/5r3Smk5gVMFBEym3KU5zDauQtY7cGbBOFdS9vVMQXRrzWz8CSuGEh1Tt
e8mNPsw7E5hlTLBEUsvF1LRDRCMaAYtKfDb2Hab12d27TmMzPkEuzvwHPsGZWOuh
6uCaFBjjPUQ=
=4xtb
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 12 Apr 2021 22:47
(address . 46737@debbugs.gnu.org)
87k0p7z0um.fsf@cbaines.net
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (23 lines)
> Mathieu Othacehe <othacehe@gnu.org> writes:
>
>>> One workaround, the one employed in the tests is to revert to the old
>>> behaviour for the PostgreSQL service by setting socket-directory to #f.
>>
>> You're right, sorry about the breakage. As you noticed we are in an
>> in-between situation where the patch updating Postgresql package to use
>> "/var/run/postgresql" by default is only on core-updates, but the
>> service is already using it as a default on master.
>>
>> This means that "createdb", "dropdb" and other Postgresql user tools
>> need to have an explicit "-h /var/run/postgresql" argument for now.
>>
>> Until the package patch gets merged in the master branch, we could set
>> the "socket-directory" field of <postgresql-config-file> record to #f to
>> restore an acceptable default behaviour.
>>
>> WDYT?
>
> I think that would be good. It's unfortunate that the package change is
> stuck on core-updates for now, but configuring the service on master to
> keep the old behaviour until core-updates is merged sounds sensible.

I don't know if the expectation was that I was going to fix this, but
since it seems there's a release coming up, I went ahead and prepared a
patch [1].

-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmB0sfFfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XdaJw//Up9MB6mcPr3sM9BHCGVZ0nvwVM9vOkYV
3vE9Oj+q4U3mSZxfT99qxUJSxHmWqzcNKM/wWm8qq2H3zMmu5rgr4pgumKKUCNoN
791w0VC8+o6uW2/+C4faYrg52LxzCVGvywi2Wj3TkNkT2uQzwwfc/PEBVCagh2dR
YxYgWAscGkBQtjVyoah//s42TEoKCkQEACw0Mng81vCsMB5NnALIObF1wcyzY70T
Cu+tTOkDWN0hHfqlH9qLwaLDwnLIBKRHTO/xjVbyJLYS3V7Btvzk9LfnVL1TONqD
+xwsG64raWZLo7TQzqlVvu1kOUGkYeD0HG3vsnumqiIbdNzmXCyWIGzbAinMQ2hx
H9noz7ysKsv3lnRiPEuO4AnYJuOBu1S6lz486NGUQw6MhIbI1CEemtaZm3mjaD4X
SPs0aZm0G2uQYuPHwuDLxqyfv1s/7BKPbA3u74afMGW8Ou8pHrnNy+pny+GUW1S5
PdDxx0ycszEgvNpLz+pWAMzBIS4o8KgOM8zsGZKQY3+Ahn846Hp3vIk8eG/lKU7n
TBAmMz2k9f13cBh/eG/o7+kCqNPw1wnEGhmbTKg/J8/cR5yfXdE7BxbWe/YYyBXH
g+xQ77g1Hmxyeo18yA990+Xezj2NWizxRr7EgNRffKNF91zGYXg4trgXmJcT2AK2
zqbBjH/+e7U=
=MOUs
-----END PGP SIGNATURE-----

L
L
Leo Famulari wrote on 13 Apr 2021 01:15
(name . Christopher Baines)(address . mail@cbaines.net)(address . 46737-done@debbugs.gnu.org)
YHTUpGDguIKJA2cQ@jasmine.lan
On Mon, Apr 12, 2021 at 09:47:45PM +0100, Christopher Baines wrote:
Toggle quote (32 lines)
>
> Christopher Baines <mail@cbaines.net> writes:
>
> > Mathieu Othacehe <othacehe@gnu.org> writes:
> >
> >>> One workaround, the one employed in the tests is to revert to the old
> >>> behaviour for the PostgreSQL service by setting socket-directory to #f.
> >>
> >> You're right, sorry about the breakage. As you noticed we are in an
> >> in-between situation where the patch updating Postgresql package to use
> >> "/var/run/postgresql" by default is only on core-updates, but the
> >> service is already using it as a default on master.
> >>
> >> This means that "createdb", "dropdb" and other Postgresql user tools
> >> need to have an explicit "-h /var/run/postgresql" argument for now.
> >>
> >> Until the package patch gets merged in the master branch, we could set
> >> the "socket-directory" field of <postgresql-config-file> record to #f to
> >> restore an acceptable default behaviour.
> >>
> >> WDYT?
> >
> > I think that would be good. It's unfortunate that the package change is
> > stuck on core-updates for now, but configuring the service on master to
> > keep the old behaviour until core-updates is merged sounds sensible.
>
> I don't know if the expectation was that I was going to fix this, but
> since it seems there's a release coming up, I went ahead and prepared a
> patch [1].
>
> 1: https://issues.guix.gnu.org/47736

I pushed your patch as c311147bd16aa0e5746d9cbf31502f5fd61e470c
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAmB01KQACgkQJkb6MLrK
fwgoEQ//UCsZkbriK0hmRC/W+MqB9THtHfeeyH48RU3PAEl94jymU9lH/RXcogfZ
26U7BhBNzHnMBTw5zWtBvKRyF1hfrznFYw1VYUDOLZ+6xV802Q4Lb1W5ZJXeasb2
VSADA5cA7Uo1lNiCpMBdMc0Vs9Bj878bMxaAp+F9p01STE8rF+zfyq2btbpgROKn
BiRW5TboE76bk8bwJXooJFfAOzjbJ+OeuAUa2Jel1xEFzY/lfRZfERGLFrCSPqsn
50UWLxsyhawF9ycHIqNQcxZpDMVPKYylWgWxMkm6/gUG4k5gbXr7/6U79/RNb/sG
RzkjQeg+qV/OLjL6rBpANPBoFXu6tVVzJzcl0CaDJegQmrL9orSePOqyOTEhXX86
pA9CgLvpcS1W56310cG+z44FN1Zb6RcgtGEzDNWvW5Siyq1hAg2FiEsgsTsvTsUE
Ot1/DmPl+drVBKkTMDloPA9FxE9ENRFg0MuD21T+4BLVX0fIcW1rajTg9z2/fhgT
CN7WqXzf0UUgwFbSj98kybVD3CRId2rKiLFKfaBqSG9egnRoT45RAsEBR/FxVWwA
kaoaRV5EX2IpgteI0UQOa/kDrm1z0jc4QxVej6uT6I//YINeDT+ze7mu4TbOYMeA
xa4TLSQvXTt5jfhC8hi22kpwdJgu21/wJ2aci28C2KjuoDzLfoY=
=g0vS
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 46737@debbugs.gnu.org