Last active
August 29, 2015 14:00
-
-
Save carmstrong/11272149 to your computer and use it in GitHub Desktop.
fleetctl queues job for scheduling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=a | |
[Service] | |
TimeoutStartSec=20m | |
ExecStart=/bin/bash -c "while true; do echo 'a...' && sleep 10; done" | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=b | |
Requires=a.service | |
After=a.service | |
[Service] | |
TimeoutStartSec=20m | |
ExecStart=/bin/bash -c "while true; do echo 'b...' && sleep 10; done" | |
[Install] | |
WantedBy=multi-user.target | |
[X-Fleet] | |
X-ConditionMachineOf=a.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ fleetctl submit a.service b.service | |
$ fleetctl list-units | |
UNIT LOAD ACTIVE SUB DESC MACHINE | |
a.service - - - a - | |
b.service - - - b - | |
$ fleetctl start b.service | |
Job b.service still queued for scheduling | |
$ fleetctl list-units | |
UNIT LOAD ACTIVE SUB DESC MACHINE | |
a.service - - - a - | |
b.service - - - b - |
@jonboulle X-Requires/X-Wants is great for coordinating dependencies across the cluster, which is what's desired here. However, not sure why even when scheduling these two jobs on the same machine (this test scenario only had one machine in the cluster), the jobs are not starting properly.
PS I opened the issue as coreos/fleet#363
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is all a bit in flux at the moment - the next release of fleet should definitely make it clearer what's going on here (one of our goals is to better report status for units that aren't scheduling, for example).
As to the behaviour you're hoping for, would it be something like the
X-Requires
/X-Wants
mentioned in #287?Do feel free to file issues against the fleet project for anything like this - sometimes we can be a little more responsive there than IRC :-)