Open iby opened 9 years ago
Looks like might be related to #964?
I'm a bit confused by MachineID = %m
- can you help me understand what you're trying to achieve/expect that to do?
We only support a subset of substitution parameters in the X-Fleet
section - see here. Perhaps we could update that doc to clarify?
At the same time it cannot find any units…
In case you haven't figured out yet - list-unit-files
is what you're after. list-units
will show the state of scheduled units, of which there are none in this case because the unit will never successfully be scheduled.
BTW, you might be interested in this native Python client for the fleet API: https://github.com/cnelson/python-fleet
The fleet library looks interesting, will dig into that later, thanks!
With MachineID = %m
in X-Fleet
I expected fleet to launch the instance / unit on the machine I'm invoking the command. I attempted to use that when just started working with fleet, then I realised that it probably doesn't make much sense because machine id becomes known after fleet decides what host the unit should be deployed to.
Yet, I didn't figure out how to launch a unit instance on a particular machine. Yes, I can just use systemd for that, but I don't want to deal with systemd, I want to use fleet, I use it for all container launching, it's great as a centralised command point and I don't want to deviate into another tool.
My current solution involves patching MachineID = %m
with /etc/machine-id
value after the unit file gets deployed to a host by Ansible. This enables fleet to launch that unit on the current machine. It'd be great if we could tell fleet to launch units on local host by simply giving it MachineID = %m
, think it makes perfect sense given we can use explicit machine ids.
Fleet hangs up and doesn't timeout while trying to start a service with STDERR to STDOUT redirection. This happens with a unit that has a misconfigured
MachineID
parameter or%m
. When I change it to a proper machine id, it works as expected. I need the redirection to keep things simple inside python.If I do this without redirection, it simply quits without any messages. Doing this on stable version 0.10.2.
Also, when I try this manually for the first time fleetctl goes into endless loop, this happens on stable-alpha. It really seems that %m parameters doesn't work as expected.
When I run it for the second time:
At the same time it cannot find any units…