FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 06-18-2012, 12:40 PM
Paul Wise
 
Default Announce: script to automatically restart services after update of dependencies

On Mon, Jun 18, 2012 at 5:40 PM, Tomas Pospisek wrote:

> I want to announce restart-services here [1][2]. It's a script
> that tries to restart all services that have had their
> dependency packages updated. This is primarily useful when
> security-relevant libraries get security releases.
>
> It's using checkrestart from the debian-goodies package to do
> most of its work.
>
> Together with the unattended-upgrades package it is saving me
> a lot of system maintenance time, thus I am announcing it here
> in the hope that it will save others a lot of time as well.

Sounds useful, maybe put it in the debian-goodies package?

Also, please blacklist gdm3 and dbus since restarting them currently
kills GNOME sessions (and probably other user desktop sessions started
by gdm3).

--
bye,
pabs

http://wiki.debian.org/PaulWise


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAKTje6FYP5BVTv+aR0XbihVHCaJHuOOi3em8Ce4WUAw1v1PWu A@mail.gmail.com">http://lists.debian.org/CAKTje6FYP5BVTv+aR0XbihVHCaJHuOOi3em8Ce4WUAw1v1PWu A@mail.gmail.com
 
Old 06-18-2012, 01:10 PM
Ben Hutchings
 
Default Announce: script to automatically restart services after update of dependencies

On Mon, 2012-06-18 at 20:40 +0800, Paul Wise wrote:
> On Mon, Jun 18, 2012 at 5:40 PM, Tomas Pospisek wrote:
>
> > I want to announce restart-services here [1][2]. It's a script
> > that tries to restart all services that have had their
> > dependency packages updated. This is primarily useful when
> > security-relevant libraries get security releases.
> >
> > It's using checkrestart from the debian-goodies package to do
> > most of its work.
> >
> > Together with the unattended-upgrades package it is saving me
> > a lot of system maintenance time, thus I am announcing it here
> > in the hope that it will save others a lot of time as well.
>
> Sounds useful, maybe put it in the debian-goodies package?

What, yet another feature reserved for those in the know? Surely we
should be doing this by default.

Ben.

> Also, please blacklist gdm3 and dbus since restarting them currently
> kills GNOME sessions (and probably other user desktop sessions started
> by gdm3).

--
Ben Hutchings
If more than one person is responsible for a bug, no one is at fault.
 
Old 06-18-2012, 09:54 PM
Tomas Pospisek
 
Default Announce: script to automatically restart services after update of dependencies

On Mon, 18 Jun 2012 14:10:46 +0100, Ben Hutchings <ben@decadent.org.uk>
wrote:
> On Mon, 2012-06-18 at 20:40 +0800, Paul Wise wrote:
>> On Mon, Jun 18, 2012 at 5:40 PM, Tomas Pospisek wrote:
>>
>> > I want to announce restart-services here [1][2]. It's a script
>> > that tries to restart all services that have had their
>> > dependency packages updated. This is primarily useful when
>> > security-relevant libraries get security releases.
>> >
>> > It's using checkrestart from the debian-goodies package to do
>> > most of its work.
>> >
>> > Together with the unattended-upgrades package it is saving me
>> > a lot of system maintenance time, thus I am announcing it here
>> > in the hope that it will save others a lot of time as well.
>>
>> Sounds useful, maybe put it in the debian-goodies package?

I've proposed this to Javier [3] and it's been quite well received :-)

> What, yet another feature reserved for those in the know? Surely we
> should be doing this by default.

I agree. Could you suggest a way forward? Currently I'm aiming for
debian-goodies, however maybe unattended-upgrades would be a better fit.
However I think really it should go into apt-level inftrastructure.

?

>> Also, please blacklist gdm3 and dbus since restarting them currently
>> kills GNOME sessions (and probably other user desktop sessions started
>> by gdm3).

Noted. I'll discuss this with Javier.

PS: Sorry Ben for also replying in private to you. I'll have to get used
to mailing lists (and my web mail client) again :-o

[3] http://bugs.debian.org/676509


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/dd2dff74094493356b2da0485cc34ebd@mail.sp-metanet
 
Old 06-19-2012, 10:23 AM
Goswin von Brederlow
 
Default Announce: script to automatically restart services after update of dependencies

Tomas Pospisek <tpo2@sourcepole.ch> writes:

> On Mon, 18 Jun 2012 14:10:46 +0100, Ben Hutchings <ben@decadent.org.uk>
> wrote:
>> On Mon, 2012-06-18 at 20:40 +0800, Paul Wise wrote:
>>> On Mon, Jun 18, 2012 at 5:40 PM, Tomas Pospisek wrote:
>>>
>>> > I want to announce restart-services here [1][2]. It's a script
>>> > that tries to restart all services that have had their
>>> > dependency packages updated. This is primarily useful when
>>> > security-relevant libraries get security releases.
>>> >
>>> > It's using checkrestart from the debian-goodies package to do
>>> > most of its work.
>>> >
>>> > Together with the unattended-upgrades package it is saving me
>>> > a lot of system maintenance time, thus I am announcing it here
>>> > in the hope that it will save others a lot of time as well.
>>>
>>> Sounds useful, maybe put it in the debian-goodies package?
>
> I've proposed this to Javier [3] and it's been quite well received :-)
>
>> What, yet another feature reserved for those in the know? Surely we
>> should be doing this by default.
>
> I agree. Could you suggest a way forward? Currently I'm aiming for
> debian-goodies, however maybe unattended-upgrades would be a better fit.
> However I think really it should go into apt-level inftrastructure.
>
> ?

I want to automatically restart services so that / and /usr can be
remounted read-only again. But I don't want unattended upgrades. So for
me debian-goddies is a better fit. Easy enough to add it then to the apt
config.

>>> Also, please blacklist gdm3 and dbus since restarting them currently
>>> kills GNOME sessions (and probably other user desktop sessions started
>>> by gdm3).
>
> Noted. I'll discuss this with Javier.
>
> PS: Sorry Ben for also replying in private to you. I'll have to get used
> to mailing lists (and my web mail client) again :-o
>
> [3] http://bugs.debian.org/676509

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/87r4tbd2ha.fsf@frosties.localnet
 
Old 06-19-2012, 11:59 AM
Tomas Pospisek
 
Default Announce: script to automatically restart services after update of dependencies

On Tue, 19 Jun 2012 12:23:45 +0200, Goswin von Brederlow wrote:
> Tomas Pospisek writes:
>
>> On Mon, 18 Jun 2012 14:10:46 +0100, Ben Hutchings wrote:
>>> On Mon, 2012-06-18 at 20:40 +0800, Paul Wise wrote:
>>>> On Mon, Jun 18, 2012 at 5:40 PM, Tomas Pospisek wrote:
>>>>
>>>> > I want to announce restart-services here [1][2]. It's a script
>>>> > that tries to restart all services that have had their
>>>> > dependency packages updated. This is primarily useful when
>>>> > security-relevant libraries get security releases.
>>>> >
>>>> > It's using checkrestart from the debian-goodies package to do
>>>> > most of its work.
>>>> >
>>>> > Together with the unattended-upgrades package it is saving me
>>>> > a lot of system maintenance time, thus I am announcing it here
>>>> > in the hope that it will save others a lot of time as well.
>>>>
>>>> Sounds useful, maybe put it in the debian-goodies package?
>>
>> I've proposed this to Javier [3] and it's been quite well received :-)
>>
>>> What, yet another feature reserved for those in the know? Surely we
>>> should be doing this by default.
>>
>> I agree. Could you suggest a way forward? Currently I'm aiming for
>> debian-goodies, however maybe unattended-upgrades would be a better
fit.
>> However I think really it should go into apt-level inftrastructure.
>
> I want to automatically restart services so that / and /usr can be
> remounted read-only again. But I don't want unattended upgrades. So for
> me debian-goddies is a better fit. Easy enough to add it then to the
> apt config.


Point taken.

However Ben argued, if I interpret him correctly, that services that
depend
on something (a library), should be restarted by default if that
dependency gets
updated and the user should not be required to install an "obscure"
package to
have that sane default behavior.

This implies that an "apt-get install library" needs to trigger that
restart.
Which means that apt-get needs to depend on restart-services. So either
restart-services and checkrestart should go into the apt package, or apt
needs
to depend on/recommend debian-goodies, which would currently pull in
python,
perl, curl, dialog and their respective dependencies.

The later may be a technically working solution, but from a conceptual and
a
KISS point of view doesn't make sense to me.

Is my conclusion correct so far?

So if we want a "clean" solution, then checkrestart/restart-services would
need
to move into apt and get rid of the non-essential dependencies (get
rewritten in
shell or C).

?

*t

>> [3] http://bugs.debian.org/676509


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/dd25736bb03f21cb838910bbfd35c9a4@mail.sp-metanet
 
Old 06-19-2012, 12:27 PM
Ben Hutchings
 
Default Announce: script to automatically restart services after update of dependencies

On Mon, 2012-06-18 at 23:47 +0200, Tomas Pospisek wrote:
> On Mon, 18 Jun 2012 14:10:46 +0100, Ben Hutchings <ben@decadent.org.uk>
> wrote:
> > On Mon, 2012-06-18 at 20:40 +0800, Paul Wise wrote:
> >> On Mon, Jun 18, 2012 at 5:40 PM, Tomas Pospisek wrote:
> >>
> >> > I want to announce restart-services here [1][2]. It's a script
> >> > that tries to restart all services that have had their
> >> > dependency packages updated. This is primarily useful when
> >> > security-relevant libraries get security releases.
> >> >
> >> > It's using checkrestart from the debian-goodies package to do
> >> > most of its work.
> >> >
> >> > Together with the unattended-upgrades package it is saving me
> >> > a lot of system maintenance time, thus I am announcing it here
> >> > in the hope that it will save others a lot of time as well.
> >>
> >> Sounds useful, maybe put it in the debian-goodies package?
>
> I suggested that to Javier [3] and I think it was quite well received :-)
>
> > What, yet another feature reserved for those in the know? Surely we
> > should be doing this by default.
>
> I agree. Can you recommend any way forward? Currently I'm aiming for
> debian-goodies as Paul proposes. However there's also the
> unattended-upgrades package, that'd maybe be an even better fit.
>
> However I think this really belongs somewhere on the level of apt?
[...]

I don't think this belongs in unattended-upgrades; whether you want
services automatically restarted is orthogonal to whether you perform
upgrades interactively or not.

What I think would be most useful would be an APT hook (or built-in
feature) enabled in a default installation that does:

1. Check for running processes that have the old libraries mapped
2. Depending on configuration, restart services (with the blacklist
as suggested):
- if set to always restart, then do
- if set to never restart, then don't
- if set to ask, then ask (through debconf) with a default of no
(I think the default would be 'ask')
3. If not everything was restarted (e.g. gdm3 or non-service process),
send mail to root saying what needs to be restarted later

(How do you map from pid to service name when using sysvinit?)

Also, the set of libraries to check could be restricted to those for
which the upgrade had urgency=high.

Ben.

--
Ben Hutchings
If more than one person is responsible for a bug, no one is at fault.
 
Old 06-19-2012, 12:29 PM
"Eugene V. Lyubimkin"
 
Default Announce: script to automatically restart services after update of dependencies

Hello,

On 2012-06-19 13:59, Tomas Pospisek wrote:
> This implies that an "apt-get install library" needs to trigger that
> restart.
> Which means that apt-get needs to depend on restart-services. So either
> restart-services and checkrestart should go into the apt package, or apt
> needs
> to depend on/recommend debian-goodies, which would currently pull in
> python,
> perl, curl, dialog and their respective dependencies.
>
> The later may be a technically working solution, but from a conceptual and
> a
> KISS point of view doesn't make sense to me.
>
> Is my conclusion correct so far?
>
> So if we want a "clean" solution, then checkrestart/restart-services would
> need
> to move into apt and get rid of the non-essential dependencies (get
> rewritten in
> shell or C).

I believe this is a wrong layer for proposed functionality -- apt-get
(libapt) is not the only high-level package manager for Debian.

If I were you, I'd look into dpkg file triggers instead. Triggers will
by the way automatically solve the problem that you don't restart
a service 5 times if 5 libraries were upgraded.

--
Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com
C++ GNU/Linux developer, Debian Developer


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120619122924.GA20339@r500-debian
 
Old 06-19-2012, 01:01 PM
Ben Hutchings
 
Default Announce: script to automatically restart services after update of dependencies

On Tue, 2012-06-19 at 15:29 +0300, Eugene V. Lyubimkin wrote:
> Hello,
>
> On 2012-06-19 13:59, Tomas Pospisek wrote:
> > This implies that an "apt-get install library" needs to trigger that
> > restart.
> > Which means that apt-get needs to depend on restart-services. So either
> > restart-services and checkrestart should go into the apt package, or apt
> > needs
> > to depend on/recommend debian-goodies, which would currently pull in
> > python,
> > perl, curl, dialog and their respective dependencies.
> >
> > The later may be a technically working solution, but from a conceptual and
> > a
> > KISS point of view doesn't make sense to me.
> >
> > Is my conclusion correct so far?
> >
> > So if we want a "clean" solution, then checkrestart/restart-services would
> > need
> > to move into apt and get rid of the non-essential dependencies (get
> > rewritten in
> > shell or C).
>
> I believe this is a wrong layer for proposed functionality -- apt-get
> (libapt) is not the only high-level package manager for Debian.
>
> If I were you, I'd look into dpkg file triggers instead. Triggers will
> by the way automatically solve the problem that you don't restart
> a service 5 times if 5 libraries were upgraded.

But we still need one trigger per service? I don't think that's a good
idea.

Ben.

--
Ben Hutchings
If more than one person is responsible for a bug, no one is at fault.
 
Old 06-19-2012, 01:13 PM
"Eugene V. Lyubimkin"
 
Default Announce: script to automatically restart services after update of dependencies

On 2012-06-19 14:01, Ben Hutchings wrote:
> On Tue, 2012-06-19 at 15:29 +0300, Eugene V. Lyubimkin wrote:
> > Hello,
> >
> > On 2012-06-19 13:59, Tomas Pospisek wrote:
> > > This implies that an "apt-get install library" needs to trigger that
> > > restart.
> > > Which means that apt-get needs to depend on restart-services. So either
> > > restart-services and checkrestart should go into the apt package, or apt
> > > needs
> > > to depend on/recommend debian-goodies, which would currently pull in
> > > python,
> > > perl, curl, dialog and their respective dependencies.
> > >
> > > The later may be a technically working solution, but from a conceptual and
> > > a
> > > KISS point of view doesn't make sense to me.
> > >
> > > Is my conclusion correct so far?
> > >
> > > So if we want a "clean" solution, then checkrestart/restart-services would
> > > need
> > > to move into apt and get rid of the non-essential dependencies (get
> > > rewritten in
> > > shell or C).
> >
> > I believe this is a wrong layer for proposed functionality -- apt-get
> > (libapt) is not the only high-level package manager for Debian.
> >
> > If I were you, I'd look into dpkg file triggers instead. Triggers will
> > by the way automatically solve the problem that you don't restart
> > a service 5 times if 5 libraries were upgraded.
>
> But we still need one trigger per service? I don't think that's a good
> idea.

Not necessarily, I imagine there can be a package 'restart-services'
which would declare a trigger on all dynamic libraries and then on
trigger invocation it will check&restart needed services.

That however indeed depends on some details of actual
restart-services utilities and trigger processing which I don't know,
so I'm just proposing that for evaluation.

CC'ing debian-dpkg@ to hear an opinion of dpkg folks.

Should that idea be not workable, I agree that using APT hooks might be
a good alternative to hardcoding anything to libapt (which I object to).

--
Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com
C++ GNU/Linux developer, Debian Developer


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120619131348.GB20339@r500-debian
 
Old 06-19-2012, 01:13 PM
"Eugene V. Lyubimkin"
 
Default Announce: script to automatically restart services after update of dependencies

On 2012-06-19 14:01, Ben Hutchings wrote:
> On Tue, 2012-06-19 at 15:29 +0300, Eugene V. Lyubimkin wrote:
> > Hello,
> >
> > On 2012-06-19 13:59, Tomas Pospisek wrote:
> > > This implies that an "apt-get install library" needs to trigger that
> > > restart.
> > > Which means that apt-get needs to depend on restart-services. So either
> > > restart-services and checkrestart should go into the apt package, or apt
> > > needs
> > > to depend on/recommend debian-goodies, which would currently pull in
> > > python,
> > > perl, curl, dialog and their respective dependencies.
> > >
> > > The later may be a technically working solution, but from a conceptual and
> > > a
> > > KISS point of view doesn't make sense to me.
> > >
> > > Is my conclusion correct so far?
> > >
> > > So if we want a "clean" solution, then checkrestart/restart-services would
> > > need
> > > to move into apt and get rid of the non-essential dependencies (get
> > > rewritten in
> > > shell or C).
> >
> > I believe this is a wrong layer for proposed functionality -- apt-get
> > (libapt) is not the only high-level package manager for Debian.
> >
> > If I were you, I'd look into dpkg file triggers instead. Triggers will
> > by the way automatically solve the problem that you don't restart
> > a service 5 times if 5 libraries were upgraded.
>
> But we still need one trigger per service? I don't think that's a good
> idea.

Not necessarily, I imagine there can be a package 'restart-services'
which would declare a trigger on all dynamic libraries and then on
trigger invocation it will check&restart needed services.

That however indeed depends on some details of actual
restart-services utilities and trigger processing which I don't know,
so I'm just proposing that for evaluation.

CC'ing debian-dpkg@ to hear an opinion of dpkg folks.

Should that idea be not workable, I agree that using APT hooks might be
a good alternative to hardcoding anything to libapt (which I object to).

--
Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com
C++ GNU/Linux developer, Debian Developer


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120619131348.GB20339@r500-debian
 

Thread Tools




All times are GMT. The time now is 03:19 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org