GNU bug report logs -
#22619
postgresql-service error checking wtf
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22619 in the body.
You can then email your comments to 22619 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
help-debbugs <at> gnu.org
:
bug#22619
; Package
postgresql
.
(Wed, 10 Feb 2016 19:02:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Danny Milosavljevic <dannym <at> scratchpost.org>
:
New bug report received and forwarded. Copy sent to
help-debbugs <at> gnu.org
.
(Wed, 10 Feb 2016 19:02:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Package: postgresql
When I first configure operating-system with postgresql-service with default config file, then run
guix system reconfigure config.scm,
then configure operating-system with postgresql-service with custom config file, then run
guix system reconfigure config.scm,
I get:
---
initdb: directory "/var/lib/postgresql/data" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/var/lib/postgresql/data" or run initdb
with an argument other than "/var/lib/postgresql/data".
making '/gnu/store/byn534fg4agm0vv9szl5kkfl19n080b2-system' the current system...
Installation finished. No error reported.
----
Postgresql doesn't run and the error message still references the default config file.
bug reassigned from package 'postgresql' to 'guix'.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 10 Feb 2016 23:12:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#22619
; Package
guix
.
(Wed, 10 Feb 2016 23:13:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 22619 <at> debbugs.gnu.org (full text, mbox):
Danny Milosavljevic wrote:
> Package: postgresql
There's no postgresql package on debbugs.gnu.org, so your report
went to the help-debbugs mailing list.
From the rest of your report, I'm guessing this should have been
assigned to guix, so I did that.
> When I first configure operating-system with postgresql-service with
> default config file, then run
>
> guix system reconfigure config.scm,
>
> then configure operating-system with postgresql-service with custom
> config file, then run
>
> guix system reconfigure config.scm,
>
> I get:
>
> ---
> initdb: directory "/var/lib/postgresql/data" exists but is not empty
> If you want to create a new database system, either remove or empty
> the directory "/var/lib/postgresql/data" or run initdb
> with an argument other than "/var/lib/postgresql/data".
> making '/gnu/store/byn534fg4agm0vv9szl5kkfl19n080b2-system' the
> current system...
> Installation finished. No error reported.
> ----
>
> Postgresql doesn't run and the error message still references the
> default config file.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#22619
; Package
guix
.
(Fri, 12 Feb 2016 14:15:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 22619 <at> debbugs.gnu.org (full text, mbox):
Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
> initdb: directory "/var/lib/postgresql/data" exists but is not empty
> If you want to create a new database system, either remove or empty
> the directory "/var/lib/postgresql/data" or run initdb
> with an argument other than "/var/lib/postgresql/data".
> making '/gnu/store/byn534fg4agm0vv9szl5kkfl19n080b2-system' the current system...
> Installation finished. No error reported.
> ----
>
> Postgresql doesn't run
I’m not familiar with PostgreSQL, but perhaps you just need to do what
the message above says?
I’ve tested ‘postgresql-service’ in a pristine system with ‘guix system
vm’ and it starts without any such message. So I guess there’s stale
data in /var/lib/postgresql/data on your system?
> and the error message still references the default config file.
I don’t see any references to a config file in what you pasted.
HTH,
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#22619
; Package
guix
.
(Fri, 12 Feb 2016 14:16:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 22619 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris <rgm <at> gnu.org> skribis:
> There's no postgresql package on debbugs.gnu.org, so your report
> went to the help-debbugs mailing list.
>
>>From the rest of your report, I'm guessing this should have been
> assigned to guix, so I did that.
Indeed, thanks Glenn!
Ludo’.
Added tag(s) moreinfo.
Request was from
ludo <at> gnu.org (Ludovic Courtès)
to
control <at> debbugs.gnu.org
.
(Fri, 12 Feb 2016 14:16:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#22619
; Package
guix
.
(Fri, 12 Feb 2016 19:50:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 22619 <at> debbugs.gnu.org (full text, mbox):
Hi,
I've found out some more details. The message
> > initdb: directory "/var/lib/postgresql/data" exists but is not empty
> > If you want to create a new database system, either remove or empty
> > the directory "/var/lib/postgresql/data" or run initdb
> > with an argument other than "/var/lib/postgresql/data".
is not an error for the entire service. It's initdb refusing to clobber the existing database (which has been created by the postgresql-service instance with no #:config-file argument) and helpful in preventing data loss.
The actual problem only arises because guix reconfigure doesn't deem a change in service arguments as reason to restart (or reconfigure) a service.
I.e. before, my config was:
(postgresql-service )
Then I did guix reconfigure ...
Afterwards, I changed the config to:
(postgresql-service #:config-file ...)
Then I did giux reconfigure # this erroneously doesn't reload the postgres service!!
> > and the error message still references the default config file.
>
> I don’t see any references to a config file in what you pasted.
In the postgres-service definition in guix/gnu/services/databases.scm , there's a %default-postgres-config . That's what I meant.
At all times, the default config file was printed in the log - which was because the postgres service never actually was reconfigured.
>I’ve tested ‘postgresql-service’ in a pristine system with ‘guix system vm’ and it starts without any such message. So I guess there’s stale data in /var/lib/postgresql/data on your system?
It was left over from the first unsuccessful launch because bug# 22618 hadn't been fixed at the time.
Thanks,
Danny
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Sun, 21 Feb 2016 11:39:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Danny Milosavljevic <dannym <at> scratchpost.org>
:
bug acknowledged by developer.
(Sun, 21 Feb 2016 11:39:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 22619-done <at> debbugs.gnu.org (full text, mbox):
Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
> The actual problem only arises because guix reconfigure doesn't deem a change in service arguments as reason to restart (or reconfigure) a service.
>
> I.e. before, my config was:
>
> (postgresql-service )
>
> Then I did guix reconfigure ...
>
> Afterwards, I changed the config to:
>
> (postgresql-service #:config-file ...)
>
> Then I did giux reconfigure # this erroneously doesn't reload the postgres service!!
Yes, this is a known limitation: <http://bugs.gnu.org/22039>.
Currently, for services that are safe to be restarted, the solution is
to explicitly stop them beforehand, in which case the new service gets
started by ‘guix system reconfigure’:
# herd stop postgresql
# guix system reconfigure new-config.scm
I’m closing this bug. Let me know if anything else is amiss.
Thanks,
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 21 Mar 2016 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 94 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.