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 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 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 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 - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@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