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

fleet ignoring manual unit state changes #628

Closed
bcwaldon opened this issue Jul 8, 2014 · 11 comments
Closed

fleet ignoring manual unit state changes #628

bcwaldon opened this issue Jul 8, 2014 · 11 comments
Assignees
Milestone

Comments

@bcwaldon
Copy link
Contributor

bcwaldon commented Jul 8, 2014

Create a unit foo.service with the following contents:

[Service]
ExecStart=/bin/sleep infinity

Start it with fleetctl:

$ fleetctl start foo.service
Job foo.service launched on 9181c53e.../172.17.8.101
$ fleetctl list-units
UNIT        STATE       LOAD    ACTIVE  SUB DESC    MACHINE
foo.service launched    loaded  active  running -   9181c53e.../172.17.8.101

Stop it manually with systemctl:

$ systemctl stop foo.service
$ systemctl status foo.service
● foo.service
   Loaded: loaded (/run/fleet/units/foo.service; linked-runtime)
   Active: inactive (dead)

Jul 08 18:20:17 core-01 systemd[1]: Starting foo.service...
Jul 08 18:20:17 core-01 systemd[1]: Started foo.service.
Jul 08 18:20:29 core-01 systemd[1]: Stopping foo.service...
Jul 08 18:20:29 core-01 systemd[1]: Stopped foo.service.

fleet doesn't get the message, however:

$ fleetctl list-units
UNIT        STATE       LOAD    ACTIVE  SUB DESC    MACHINE
foo.service launched    loaded  active  running -   9181c53e.../172.17.8.101
@jonboulle
Copy link
Contributor

what

@bcwaldon
Copy link
Contributor Author

bcwaldon commented Jul 8, 2014

@jonboulle I know...

@bcwaldon
Copy link
Contributor Author

bcwaldon commented Jul 8, 2014

More interesting:

$ fleetctl load foo.service
Job foo.service loaded on 9181c53e.../172.17.8.101
$ fleetctl list-units
UNIT        STATE   LOAD    ACTIVE      SUB DESC    MACHINE
foo.service loaded  loaded  inactive    dead    -   9181c53e.../172.17.8.101
$ systemctl start foo.service
$ fleetctl list-units
UNIT        STATE   LOAD    ACTIVE  SUB DESC    MACHINE
foo.service loaded  loaded  active  running -   9181c53e.../172.17.8.101

Maybe this goes back to #352?

@bcwaldon
Copy link
Contributor Author

bcwaldon commented Jul 9, 2014

This is because we don't react to nil UnitStatus objects coming out of dbus at all.

@jonboulle
Copy link
Contributor

What do you mean "nil UnitStatus objects coming out of dbus"? What does that look like?

@bcwaldon
Copy link
Contributor Author

bcwaldon commented Jul 9, 2014

@jonboulle
Copy link
Contributor

@bcwaldon I meant in terms of what we get from dbus/go-systemd itself - seems like a bug to me that the status channel ever returns nils

@bcwaldon
Copy link
Contributor Author

bcwaldon commented Jul 9, 2014

@jonboulle nil does mean something, and we could totally react to it. We just don't. We could react by fetching the current state of the Unit and publishing that, which would actually fix this bug. We've gone back and forth on how we are managing unit state, but we've never really sat down and figured out the 100% correct solution. Let's talk in person.

@bcwaldon bcwaldon removed this from the v0.5.3 milestone Jul 9, 2014
@bcwaldon bcwaldon added this to the v0.6.0 milestone Jul 11, 2014
@jonboulle
Copy link
Contributor

Is this covered by #651 ?

@bcwaldon
Copy link
Contributor Author

yes

@bcwaldon
Copy link
Contributor Author

Fixed by #651

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

No branches or pull requests

2 participants