Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #224962

Re: systemd and non-existent service instances

From Richard Hector <richard@walnut.gen.nz>
Newsgroups linux.debian.user
Subject Re: systemd and non-existent service instances
Date 2020-07-19 12:40 +0200
Message-ID <AueTD-59N-5@gated-at.bofh.it> (permalink)
References <AudNT-4wI-3@gated-at.bofh.it> <AuegW-4HM-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 19/07/20 9:34 pm, Andrei POPESCU wrote:
> On Du, 19 iul 20, 21:10:40, Richard Hector wrote:
>> Hi all,
>> 
>> I'm running into a problem with systemd and my openvpn instances.
>> 
>> To start a vpn, I run 'systemctl start openvpn-client@foo_host2' or
>> similar. That has to be an underscore, because as far as I can see,
>> using a hyphen/dash will break the instance mechanism. Of course, the
>> actual hostname has to have a hyphen, because you can't have an
>> underscore in the DNS.
>> 
>> This means I will inevitably end up typing 'systemctl start
>> openvpn-client@foo-host2' by mistake.
>> 
>> When that happens, it appears that systemd will try to start it, and
>> fail because foo-host2.conf doesn't exist - and try for ever. Showing
>> the status of foo_host2 works fine, of course, so I don't notice until I
>> look at the logs.
>> 
>> Is this an inherent part of how systemd works, or is there a way to make
>> it return an error message, rather than silently trying the impossible?
> 
> Without checking if this is even possible, try 'mask'ing the inexistent 
> instances.

Hmm. I know I gave an example of a specific typo, but in the general
case there are rather a lot of non-existent possiblities :-)

Still, I might investigate this if there aren't better options.

Thanks,
Richard

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

systemd and non-existent service instances Richard Hector <richard@walnut.gen.nz> - 2020-07-19 11:30 +0200
  Re: systemd and non-existent service instances Andrei POPESCU <andreimpopescu@gmail.com> - 2020-07-19 12:00 +0200
    Re: systemd and non-existent service instances Richard Hector <richard@walnut.gen.nz> - 2020-07-19 12:40 +0200
  Re: systemd and non-existent service instances Richard Hector <richard@walnut.gen.nz> - 2020-07-19 12:50 +0200

csiph-web