Bug#473879: postgresql-8.2: init.d stop action fails when service is not running

2008-04-22 Thread Martin Pitt
reassign 473879 postgresql-common
reassign 473880 postgresql-common
forcemerge 473879 473880
severity normal
tags moreinfo
thanks

Hi Pierre,

sorry for the long delay, I was at a conference, and it took some time
to catch up with everything.

Pierre THIERRY [2008-04-02  6:31 +0200]:
 ++ pg_ctlcluster --force 8.2 main stop
 + ERRMSG='pg_ctl : n'\''a pas pu envoyer le signal d'\''arrêt (PID : 3474) : 
 Aucun processus de ce type
 (does not shutdown gracefully, now stopping immediately)pg_ctl : n'\''a pas 
 pu envoyer le signal d'\''arrêt (PID : 3474) : Aucun processus de ce type

This does not happen on a clean installation, thus downgrading the
severity. Apparenlty your server is running, but pg_ctl fails to stop
it with that French error message which I cannot decipher (it does not
come from PostgreSQL, I checked PostgreSQL's translations).

Can you please give me the output of 

 $ pg_lsclusters
 $ ps aux|grep postgres
 $ ls -la /var/run/postgresql
 # cat /var/run/postgresql/*.pid

(Last command as root, please; the others work as normal user)

? Thank you!

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


signature.asc
Description: Digital signature


Bug#473879: postgresql-8.2: init.d stop action fails when service is not running

2008-04-22 Thread Pierre THIERRY
Scribit Martin Pitt dies 22/04/2008 hora 17:04:
 This does not happen on a clean installation, thus downgrading the
 severity. Apparenlty your server is running

I see I wasn't that clear in the bug report: the situation is that the
server IS NOT running. According to policy, asking the init.d to stop
the server while it is already stopped should report a success, and it's
not the case right now.

It has the very annoying side effect that the packages are not removable
because their prerm script attempts to stop the server and sees a
failure.

 Can you please give me the output of 
 
  $ pg_lsclusters
  $ ps aux|grep postgres
  $ ls -la /var/run/postgresql
  # cat /var/run/postgresql/*.pid

[EMAIL PROTECTED]:~$ pg_lsclusters
Version Cluster   Port Status OwnerData directory Log 
file
8.2 main  5432 down   postgres /var/lib/postgresql/8.2/main   
/var/log/postgresql/postgresql-8.2-main.log
8.3 main  5433 down   postgres /var/lib/postgresql/8.3/main   
/var/log/postgresql/postgresql-8.3-main.log
[EMAIL PROTECTED]:~$ ps aux|grep postgres
pierre3211  0.0  0.0   1644   280 pts/18   R+   18:25   0:00 grep postgres
[EMAIL PROTECTED]:~$ ls -la /var/run/postgresql
total 8,0K
drwxrwsr-x  2 postgres postgres6 avr 13 03:44 .
drwxr-xr-x 52 root root 4,0K avr 22 07:46 ..

Quickly,
Pierre
-- 
[EMAIL PROTECTED]
OpenPGP 0xD9D50D8A


signature.asc
Description: Digital signature


Bug#473879: postgresql-8.2: init.d stop action fails when service is not running

2008-04-22 Thread Martin Pitt
Hi Pierre,

Pierre THIERRY [2008-04-22 18:31 +0200]:
 I see I wasn't that clear in the bug report: the situation is that the
 server IS NOT running. According to policy, asking the init.d to stop
 the server while it is already stopped should report a success, and it's
 not the case right now.

Thanks for the additional information, I can reproduce the bug now,
and it's quite easy to fix. I'll upload a new version soon.

For your interest, you have stale pid files in
/var/lib/postgresql/8.3/postmaster.pid (same with 8.2), and the
scripts fail to handle this situation properly. If you remove those,
your system should be fine again.

The Debian integration scripts are actually supposed to do that
automatically, but there is a bug which prevents that from happening
(that's the one I'll fix soon).

Have a good day!

Martin

-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


signature.asc
Description: Digital signature


Bug#473879: postgresql-8.2: init.d stop action fails when service is not running

2008-04-01 Thread Pierre THIERRY
Package: postgresql-8.2
Version: 8.2.6-2
Severity: serious
Justification: Policy 9.3.2

# sh -x /etc/init.d/postgresql-8.2 stop
+ '[' -r /usr/share/postgresql-common/init.d-functions ']'
+ . /usr/share/postgresql-common/init.d-functions
++ . /lib/lsb/init-functions
+++ FANCYTTY=
+++ '[' -e /etc/lsb-base-logging.sh ']'
+++ true
+ VERSION=8.2
+ case $1 in
+ stop 8.2
+ do_ctl_all stop 8.2 'Stopping PostgreSQL 8.2 database server'
+ '[' stop ']'
+ '[' 8.2 ']'
+ '[' -d /etc/postgresql/8.2 ']'
++ ls /etc/postgresql/8.2
+ '[' main ']'
+ '[' -x /usr/lib/postgresql/8.2/bin/postmaster ']'
+ status=0
+ log_daemon_msg 'Stopping PostgreSQL 8.2 database server'
+ '[' -z 'Stopping PostgreSQL 8.2 database server' ']'
+ '[' -z '' ']'
+ echo -n 'Stopping PostgreSQL 8.2 database server:'
Stopping PostgreSQL 8.2 database server:+ return
+ for c in '/etc/postgresql/$2/*'
+ '[' -e /etc/postgresql/8.2/main/postgresql.conf ']'
++ basename /etc/postgresql/8.2/main
+ name=main
+ '[' -e /etc/postgresql/8.2/main/start.conf ']'
++ sed 's/#.*$//; /^[[:space:]]*$/d; s/^\s*//; s/\s*$//' 
/etc/postgresql/8.2/main/start.conf
+ start=auto
+ '[' auto = auto ']'
+ log_progress_msg main
+ '[' -z main ']'
+ echo -n ' main'
 main+ set +e
+ '[' stop = stop ']'
++ pg_ctlcluster --force 8.2 main stop
+ ERRMSG='pg_ctl : n'\''a pas pu envoyer le signal d'\''arrêt (PID : 3474) : 
Aucun processus de ce type
(does not shutdown gracefully, now stopping immediately)pg_ctl : n'\''a pas pu 
envoyer le signal d'\''arrêt (PID : 3474) : Aucun processus de ce type
Insecure dependency in kill while running with -T switch at 
/usr/bin/pg_ctlcluster line 381.
(does not shutdown, killing the process)'
+ res=9
+ set -e
+ '[' 9 -eq 0 ']'
+ '[' 9 -eq 2 ']'
+ status=1
+ '[' 1 -ne 0 -a -n 'pg_ctl : n'\''a pas pu envoyer le signal d'\''arrêt (PID : 
3474) : Aucun processus de ce type
(does not shutdown gracefully, now stopping immediately)pg_ctl : n'\''a pas pu 
envoyer le signal d'\''arrêt (PID : 3474) : Aucun processus de ce type
Insecure dependency in kill while running with -T switch at 
/usr/bin/pg_ctlcluster line 381.
(does not shutdown, killing the process)' ']'
+ log_failure_msg 'pg_ctl : n'\''a pas pu envoyer le signal d'\''arrêt (PID : 
3474) : Aucun processus de ce type
(does not shutdown gracefully, now stopping immediately)pg_ctl : n'\''a pas pu 
envoyer le signal d'\''arrêt (PID : 3474) : Aucun processus de ce type
Insecure dependency in kill while running with -T switch at 
/usr/bin/pg_ctlcluster line 381.
(does not shutdown, killing the process)'
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ '[' xscreen '!=' xdumb ']'
+ '[' -x /usr/bin/tput ']'
+ '[' -x /usr/bin/expr ']'
+ /usr/bin/tput hpa 60
+ FANCYTTY=0
+ case $FANCYTTY in
+ false
+ echo 'pg_ctl : n'\''a pas pu envoyer le signal d'\''arrêt (PID : 3474) : 
Aucun processus de ce type
(does not shutdown gracefully, now stopping immediately)pg_ctl : n'\''a pas pu 
envoyer le signal d'\''arrêt (PID : 3474) : Aucun processus de ce type
Insecure dependency in kill while running with -T switch at 
/usr/bin/pg_ctlcluster line 381.
(does not shutdown, killing the process)'
pg_ctl : n'a pas pu envoyer le signal d'arrêt (PID : 3474) : Aucun processus de 
ce type
(does not shutdown gracefully, now stopping immediately)pg_ctl : n'a pas pu 
envoyer le signal d'arrêt (PID : 3474) : Aucun processus de ce type
Insecure dependency in kill while running with -T switch at 
/usr/bin/pg_ctlcluster line 381.
(does not shutdown, killing the process)
+ log_end_msg 1
+ '[' -z 1 ']'
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ '[' xscreen '!=' xdumb ']'
+ '[' -x /usr/bin/tput ']'
+ '[' -x /usr/bin/expr ']'
+ /usr/bin/tput hpa 60
+ FANCYTTY=0
+ case $FANCYTTY in
+ false
+ '[' 1 -eq 0 ']'
+ echo ' failed!'
 failed!
+ return 1


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (502, 'stable'), (501, 'unstable'), (500, 
'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-2-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages postgresql-8.2 depends on:
ii  libc6 2.7-6  GNU C Library: Shared libraries
ii  libcomerr21.40.8-2   common error description library
ii  libkrb53  1.6.dfsg.3~beta1-4 MIT Kerberos runtime libraries
ii  libpam0g  0.99.7.1-6 Pluggable Authentication Modules l
ii  libpq58.3.1-1PostgreSQL C client library
ii  libssl0.9.8   0.9.8g-8   SSL shared libraries
ii  postgresql-client-8.2 8.2.7-1front-end programs for PostgreSQL 
ii  postgresql-common 86 PostgreSQL database-cluster manage
ii  tzdata2008a-1time zone and daylight-saving time

postgresql-8.2 recommends no packages.

-- no debconf information

--