Re: [systemd-devel] systemd services via SSH (-H key)
On 23/10/15 21:04, Lennart Poettering wrote: >> Can a container name be all-numeric? > We make the same restrictions on container names as on host names. And > that means all-numeric is OK. Ahh, so there goes the idea of just using heuristics (i.e. am I looking at a string of digits only) to determine if it's a port number or a container name. >> > Who made the decision to use ':'? Any particular reason? > I did. > > The ultimate goal is that I wanted a way to reference units in the > network, by specifying a path to them. I.e. something like: > >foo:bar:baz/apache.service Makes sense. So that explains why not another character such as /. I suppose # might work as a delimiter for specifying a port number: e.g. foo#portno I seem to recall seeing that in BIND: > 24-Oct-2015 00:12:26.494 queries: client 10.255.255.251#59505 > (www.bom.gov.au): query: www.bom.gov.au IN +EDC (10.255.255.1) You might need to escape the # in some places, but it would at least allow specification of the port number. Regards, -- Stuart Longland (aka Redhatter, VK4MSL) I haven't lost my mind... ...it's backed up on a tape somewhere. signature.asc Description: OpenPGP digital signature ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd services via SSH (-H key)
On 23/10/15 08:59, Reindl Harald wrote: >> Because the syntax of -H parameter is "[user@]host[:container]" >> and it does not allow specifying an explicit port number. > > [user@]host[:container][:port] > [user@]host[:port][:container] Can a container name be all-numeric? Who made the decision to use ':'? Any particular reason? -- Stuart Longland (aka Redhatter, VK4MSL) I haven't lost my mind... ...it's backed up on a tape somewhere. signature.asc Description: OpenPGP digital signature ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] How does systemd discover template instances?
Hi all, First up, I'm rather new to systemd, having been more or less forced into it by the decisions of the Ubuntu and Debian projects, which have both gone that way. (I know the default can be changed, but upstream have chosen this init system, so I as a software developer must learn to use it.) I have a SysV init script which I based on the Debian init script for OpenVPN. The service I'm starting up is a collection of device drivers for a data acquisition system. (Think: SCADA-style application.) These drivers run as daemon processes in userspace, and communicate with devices out in the field by various means (we've got drivers that talk Modbus and EDMI, we're planning a BACNet driver, etc) and they talk with the rest of the system over AMQP (RabbitMQ). The drivers can be written in any language (most are in Python, some may be done in C++), and may not necessarily take the same command line arguments. I'd like to be able to write a set of systemd unit files that can either selectively, or all together, bring the driver instances up and down. The existing script permits this, and under Debian Wheezy, works well. Under Jessie with systemd however, the systemd wrappers get in the way and we lose the ability to control individual instances. I also feel there are some features of systemd which would be useful (auto-restart on crash for example). For that reason, I'm looking at how to write some unit files to achieve this aim. I feel I can probably achieve most of this with some simple wrapper scripts that make the drivers all react the same (in the eyes of systemd), which brings me to the problem of instances. (In fact, I can probably use my existing init script.) Assuming I have a few files distributed in the base package: /lib/systemd/system/comms-drivers.service /lib/systemd/system/comms-drivers@.service Ordinarily, one would tell systemd about template instances by creating symbolic links. Suppose however I wanted to not do this, but instead, provide some automatic discovery mechanism for systemd, so it could run a script that would tell it what instances exist. Is there a mechanism for doing this in systemd? -- Stuart Longland (aka Redhatter, VK4MSL) I haven't lost my mind... ...it's backed up on a tape somewhere. signature.asc Description: OpenPGP digital signature ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How does systemd discover template instances?
On 15/10/15 13:23, Andrei Borzenkov wrote: > 15.10.2015 00:30, Stuart Longland пишет: >> Assuming I have a few files distributed in the base package: >> /lib/systemd/system/comms-drivers.service >> /lib/systemd/system/comms-drivers@.service >> >> Ordinarily, one would tell systemd about template instances by creating >> symbolic links. >> >> Suppose however I wanted to not do this, but instead, provide some >> automatic discovery mechanism for systemd, so it could run a script that >> would tell it what instances exist. >> >> Is there a mechanism for doing this in systemd? >> >> > > I'm not sure if I actually understand the question, but - templates are > instantiated on the fly. If template foo@.service exists and it is > attempted to start foo@bar.service, systemd will create it internally. > It is full fledged unit that is visible in status, can be stopped, is > part of dependency resolution etc. Okay, that's useful to know. So in order to start foo@bar.service, I don't need to create any files. Question is, how does systemd find out about the existence of foo@bar.service without a file being present? The idea being that the service foo.service acts as a means of starting/stopping/querying all instances. I would guess that stopping/restarting/querying, systemd is smart enough to look at what's presently running, however what about starting? -- Stuart Longland (aka Redhatter, VK4MSL) I haven't lost my mind... ...it's backed up on a tape somewhere. signature.asc Description: OpenPGP digital signature ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel