Bug#876459: needrestart: Non-interactive mode not being detected properly

2018-03-06 Thread Patrick Matthäi

Am 22.02.2018 um 13:44 schrieb Dominik George:
> Hi Patrick,
>
>> I regularly see this bug cause important PostgreSQL databases to be
>> restarted on Debian stable.
>>
>> Can you please make sure to provide an update for the next Debian point
>> release? If you need help doing so, feel free to say that.
> Any news/opinion on that?
>
> If I do not hear anything from you within this week, I will start
> negotiating with therelease team about the patch for the next point
> release.
>
> Cheers,
> Nik

Hi,

I am sorry, your messages went to my junk folder, I just saw the
accepted upload now.
Many thanks for taking care of this!

-- 
/*
Mit freundlichem Gruß / With kind regards,
 Patrick Matthäi
 GNU/Linux Debian Developer

  Blog: http://www.linux-dev.org/
E-Mail: pmatth...@debian.org
patr...@linux-dev.org
*/




signature.asc
Description: OpenPGP digital signature


Bug#876459: needrestart: Non-interactive mode not being detected properly

2018-02-22 Thread Dominik George
Hi Patrick,

> I regularly see this bug cause important PostgreSQL databases to be
> restarted on Debian stable.
> 
> Can you please make sure to provide an update for the next Debian point
> release? If you need help doing so, feel free to say that.

Any news/opinion on that?

If I do not hear anything from you within this week, I will start
negotiating with therelease team about the patch for the next point
release.

Cheers,
Nik


signature.asc
Description: PGP signature


Bug#876459: needrestart: Non-interactive mode not being detected properly

2018-02-13 Thread Dominik George
Control: severity -1 serious
Control: tags -1 + fixed-in-experimental stretch

Hi,

> the problem described in the archived bug #803249 still exists in
> 2.11-3 (Debian 9.1). When needrestart is run without a tty AND with
> DEBIAN_FRONTEND=noninteractive, it still tries to work interactively
> rather than fall back to "list only" mode. In some cases it causes
> unwanted restarts. The easiest way to reproduce it is to run
> needrestart from cron, redirecting the output to a file.

I regularly see this bug cause important PostgreSQL databases to be
restarted on Debian stable.

Can you please make sure to provide an update for the next Debian point
release? If you need help doing so, feel free to say that.

-nik


signature.asc
Description: PGP signature


Bug#876459: needrestart: Non-interactive mode not being detected properly

2017-11-02 Thread Thomas Liske

tags 876459 fixed-upstream
notfixed 803249 needrestart/2.6-1
thanks


Hi Piotr,

the fix of Debian Bug#803249 was broken. I've applied your patch
upstream, this fixes #803249 and #876459. Thanks!


Regards,
Thomas


Piotr Pańczyk  writes:

> Package: needrestart
> Version: 2.11-3
> Severity: important
> Tags: upstream patch
>
> Dear Maintainer,
> the problem described in the archived bug #803249 still exists in 2.11-3 
> (Debian 9.1). When needrestart is run without a tty AND with 
> DEBIAN_FRONTEND=noninteractive, it still tries to work interactively rather 
> than fall back to "list only" mode. In some cases it causes unwanted 
> restarts. The easiest way to reproduce it is to run needrestart from cron, 
> redirecting the output to a file.
>
> I attach a patch that may work, but I'm not sure, as I know Perl only a 
> little and don't know other implementation details. In my case it is working 
> as expected.
>
> The problem is rather serious. I use Ansible for automation and once I run it 
> to install something on an OpenVZ host. After installation by apt-get, 
> needrestart started to restart VZ containers, including the one from which 
> Ansible was run. I ended up with all the containers stopped!
>
> Regards,
> Piotr
>
>
> -- System Information:
> Debian Release: 9.1
>   APT prefers stable-updates
>   APT policy: (500, 'stable-updates'), (500, 'stable')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 2.6.32.bsd54g54 (SMP w/24 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
> LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: sysvinit (via /sbin/init)
>
> Versions of packages needrestart depends on:
> ii  dpkg   1.18.24
> ii  gettext-base   0.19.8.1-2
> ii  libintl-perl   1.26-2
> ii  libmodule-find-perl0.13-1
> ii  libmodule-scandeps-perl1.23-1
> ii  libproc-processtable-perl  0.53-2
> ii  libsort-naturally-perl 1.03-1
> ii  libterm-readkey-perl   2.37-1
> ii  perl   5.24.1-3+deb9u1
> ii  xz-utils   5.2.2-1.2+b1
>
> Versions of packages needrestart recommends:
> ii  sysvinit-core  2.88dsf-59.9
>
> Versions of packages needrestart suggests:
> pn  needrestart-session | libnotify-bin  
>
> -- no debconf information
> --- needrestart-2.11.orig/needrestart
> +++ needrestart-2.11/needrestart
> @@ -181,7 +181,7 @@ $nrconf{ui} = qq(NeedRestart::UI::stdio)
>  die "Hook directory '$nrconf{hook_d}' is invalid!\n" unless(-d 
> $nrconf{hook_d} || $opt_b);
>  $opt_r = $nrconf{restart} unless(defined($opt_r));
>  die "ERROR: Unknown restart option '$opt_r'!\n" unless($opt_r =~ 
> /^(l|i|a)$/);
> -$is_tty++ if($opt_r eq 'i' && exists($ENV{DEBIAN_FRONTEND}) && 
> $ENV{DEBIAN_FRONTEND} eq 'noninteractive');
> +$is_tty = 0 if($opt_r eq 'i' && exists($ENV{DEBIAN_FRONTEND}) && 
> $ENV{DEBIAN_FRONTEND} eq 'noninteractive');
>  $opt_r = 'l' if(!$is_tty && $opt_r eq 'i');
>  
>  $opt_m = $nrconf{ui_mode} unless(defined($opt_m));

-- 

::  WWW:https://fiasko-nw.net/~thomas/  ::
   :::  Jabber:   xmpp:tho...@jabber.fiasko-nw.net  :::
::  flickr: https://www.flickr.com/photos/laugufe/  ::



Bug#876459: needrestart: Non-interactive mode not being detected properly

2017-09-22 Thread Piotr Pańczyk
Package: needrestart
Version: 2.11-3
Severity: important
Tags: upstream patch

Dear Maintainer,
the problem described in the archived bug #803249 still exists in 2.11-3 
(Debian 9.1). When needrestart is run without a tty AND with 
DEBIAN_FRONTEND=noninteractive, it still tries to work interactively rather 
than fall back to "list only" mode. In some cases it causes unwanted restarts. 
The easiest way to reproduce it is to run needrestart from cron, redirecting 
the output to a file.

I attach a patch that may work, but I'm not sure, as I know Perl only a little 
and don't know other implementation details. In my case it is working as 
expected.

The problem is rather serious. I use Ansible for automation and once I run it 
to install something on an OpenVZ host. After installation by apt-get, 
needrestart started to restart VZ containers, including the one from which 
Ansible was run. I ended up with all the containers stopped!

Regards,
Piotr


-- System Information:
Debian Release: 9.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32.bsd54g54 (SMP w/24 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages needrestart depends on:
ii  dpkg   1.18.24
ii  gettext-base   0.19.8.1-2
ii  libintl-perl   1.26-2
ii  libmodule-find-perl0.13-1
ii  libmodule-scandeps-perl1.23-1
ii  libproc-processtable-perl  0.53-2
ii  libsort-naturally-perl 1.03-1
ii  libterm-readkey-perl   2.37-1
ii  perl   5.24.1-3+deb9u1
ii  xz-utils   5.2.2-1.2+b1

Versions of packages needrestart recommends:
ii  sysvinit-core  2.88dsf-59.9

Versions of packages needrestart suggests:
pn  needrestart-session | libnotify-bin  

-- no debconf information
--- needrestart-2.11.orig/needrestart
+++ needrestart-2.11/needrestart
@@ -181,7 +181,7 @@ $nrconf{ui} = qq(NeedRestart::UI::stdio)
 die "Hook directory '$nrconf{hook_d}' is invalid!\n" unless(-d $nrconf{hook_d} 
|| $opt_b);
 $opt_r = $nrconf{restart} unless(defined($opt_r));
 die "ERROR: Unknown restart option '$opt_r'!\n" unless($opt_r =~ /^(l|i|a)$/);
-$is_tty++ if($opt_r eq 'i' && exists($ENV{DEBIAN_FRONTEND}) && 
$ENV{DEBIAN_FRONTEND} eq 'noninteractive');
+$is_tty = 0 if($opt_r eq 'i' && exists($ENV{DEBIAN_FRONTEND}) && 
$ENV{DEBIAN_FRONTEND} eq 'noninteractive');
 $opt_r = 'l' if(!$is_tty && $opt_r eq 'i');
 
 $opt_m = $nrconf{ui_mode} unless(defined($opt_m));