Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

fleetctl start != systemctl start #1025

Closed
bcwaldon opened this issue Nov 14, 2014 · 6 comments · Fixed by #1566
Closed

fleetctl start != systemctl start #1025

bcwaldon opened this issue Nov 14, 2014 · 6 comments · Fixed by #1566

Comments

@bcwaldon
Copy link
Contributor

The fleetctl start command sets the desired state of a unit to "launched" (that's a fleet state, not a systemd state) and waits for the unit to be scheduled and the target machine to publish systemd state. fleetctl does not look at the contents of this systemd state.

The systemctl start command acts more like an RPC command, sending a StartUnit message over dbus and waiting for the created systemd job to finish.

We have a clear usability problem here. Users expect fleetctl start to be equivalent to systemctl start (#1019). This inconsistency is also preventing us from moving forward on adding a fleetctl restart command, which should reasonably act like systemctl restart (#961).

Assuming others agree that this inconsistency is a problem, I see only one real path forward. fleetctl start needs to watch for the unit to actually start successfuly in systemd.

@Xe
Copy link

Xe commented Nov 14, 2014

👍

@jzelinskie
Copy link

...or rename the command fleetctl launch and fleetctl relaunch ;)

@Xe
Copy link

Xe commented Nov 14, 2014

As a temporary workaround you can do this:

function fleet_start {
    fleetctl load $*

    for unit in $*
    do
        fleetctl ssh $unit sudo systemctl start $unit
    done
}

This will not work with global units.

EDIT: shell script hates dashes, changed fleet-start-unit-wait to fleet_start

@chrisfarms
Copy link

👍

@anpieber
Copy link

I'm also a big 👍 on this one to finally get the inconsistency solved. Anything we can provide to help with this one?

@xied75
Copy link

xied75 commented Apr 29, 2015

👍

@jonboulle jonboulle added kind/bug and removed bug labels Sep 24, 2015
dongsupark pushed a commit to dongsupark/fleet that referenced this issue Apr 25, 2016
To resolve inconsistency between systemctl start and fleetctl start, fleetctl
needs to check systemd states after starting units. If the systemd state is
not a desired one, wait until it gets an active state.

Fixes: coreos#1025
dongsupark pushed a commit to dongsupark/fleet that referenced this issue Apr 25, 2016
To resolve inconsistency between systemctl start and fleetctl start, fleetctl
needs to check systemd states after starting units. If the systemd state is
not a desired one, wait until it gets an active state.

Fixes: coreos#1025
dongsupark pushed a commit to dongsupark/fleet that referenced this issue Apr 25, 2016
To resolve inconsistency between systemctl start and fleetctl start, fleetctl
needs to check systemd states after starting units. If the systemd state is
not a desired one, wait until it gets an active state.

Fixes: coreos#1025
dongsupark pushed a commit to endocode/fleet that referenced this issue Apr 26, 2016
To resolve inconsistency between systemctl start and fleetctl start, fleetctl
needs to check systemd states after starting units. If the systemd state is
not a desired one, wait until it gets an active state.

Fixes: coreos#1025
dongsupark pushed a commit to dongsupark/fleet that referenced this issue Apr 29, 2016
To resolve inconsistency between systemctl start and fleetctl start, fleetctl
needs to check systemd states after starting units. If the systemd state is
not a desired one, wait until it gets an active state.

Fixes: coreos#1025
dongsupark pushed a commit to dongsupark/fleet that referenced this issue May 9, 2016
To resolve inconsistency between systemctl start and fleetctl start, fleetctl
needs to check systemd states after starting units. If the systemd state is
not a desired one, wait until it gets an active state.

Fixes: coreos#1025
dongsupark pushed a commit to endocode/fleet that referenced this issue May 30, 2016
To resolve inconsistency between systemctl start and fleetctl start, fleetctl
needs to check systemd states after starting units. If the systemd state is
not a desired one, wait until it gets an active state.

Fixes: coreos#1025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants