[Debian-ha-maintainers] Bug#862248: Bug#862248: No straightforward and permanent way to disable DRBD autostart, no drbd systemd unit file

Apollon Oikonomopoulos apoikos at debian.org
Wed May 10 12:18:15 UTC 2017


On 20:55 Wed 10 May     , Christian Balzer wrote:
> is there any package you're not involved with? ^o^

Nah, we just happen to be running the same things :)

> On Wed, 10 May 2017 12:37:34 +0300 Apollon Oikonomopoulos wrote:
> 
> > Control: severity -1 wishlist
> >
> Sure thing.
>  
> > Hi,
> > 
> > On 17:53 Wed 10 May     , Christian Balzer wrote:
> > > Jessie (backports), systemd.
> > > 
> > > When running DRBD with pacemaker it is recommended (and with systemd
> > > required, see link below) to disable DRBD startup at boot time.
> > > 
> > > However:
> > > ---
> > > # systemctl disable drbd
> > > drbd.service is not a native service, redirecting to systemd-sysv-install.
> > > Executing: /lib/systemd/systemd-sysv-install disable drbd
> > > insserv: warning: current start runlevel(s) (empty) of script `drbd' overrides LSB defaults (2 3 4 5).
> > > insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `drbd' overrides LSB defaults (0 1 6).
> > > ---
> > > 
> > > But since systemd-sysv picks up anything in /etc/init.d/ we get after a
> > > reboot:
> > > ---
> > > # systemctl status drbd
> > >   drbd.service - LSB: Control drbd resources.
> > >    Loaded: loaded (/etc/init.d/drbd; generated; vendor preset: enabled)
> > >    Active: active (exited) since Wed 2017-05-10 10:37:39 JST; 6h ago
> > >      Docs: man:systemd-sysv-generator(8)
> > >    CGroup: /system.slice/drbd.service
> > > ---
> > > 
> > > Ways forward would be a unit file for systemd that actually allows disable
> > > to work as expected or some other means to (permanently) neuter the init.d
> > > file (instead of an "exit 0" at the top which did the trick for now).  
> > 
> > Thanks for the report!
> > 
> > You can always use `systemctl mask drbd.service', which will neuter the 
> > initscript completely. I'm downgrading the severity to 'wishlist', 
> > unless `systemctl mask' causes some ill side-effects, in which case 
> > please change the severity again.
> > 
> That worked w/o any ill effects I can see.
> 
> Unfortunately mask is not a particular well known/referenced systemctl
> feature, but then again that might be my tremendous love and admiration
> for all things systemd speaking. ^o^

mask is well-documented, it's just something we didn't have with 
sysvinit, so most people ignore its existence and it's not cited often.

> 
> > But yes, ideally we should provide a native unit.
> > 
> I wonder if this bears referencing to the systemd/systemd-sysv folks, to
> maybe suggest "mask" in the output when somebody runs disable against a
> LSB sysv init script. 

The thing is, systemctl disable *should* do the right thing, even in 
jessie. It makes me suspect there are some older package left-overs 
around. Can you please try running:

 $ systemctl disable drbd.service
 $ systemctl daemon-reload
 $ find /lib/systemd /run/systemd /etc/systemd -name drbd.service

Thanks
Apollon



More information about the Debian-ha-maintainers mailing list