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

Scope unit state by machine #722

Closed
bcwaldon opened this issue Jul 28, 2014 · 1 comment
Closed

Scope unit state by machine #722

bcwaldon opened this issue Jul 28, 2014 · 1 comment
Assignees
Milestone

Comments

@bcwaldon
Copy link
Contributor

This is a clone of #638.

fleet does a fine job at reporting unit state in the simple cases, but adding any complexity to the unit lifecycle causes mis-publishing of unit state into etcd.

For example, starting and destroying a single unit will result in all states being published properly. Now imagine seting an ExecStop option that takes a long time to finish (i.e. /usr/bin/sleep 10s). Start it, unload it and immediately start it again. If that unit is scheduled to a different machine the second time it is started, an active state will be published, but 10s later an inactive state will overwrite it.

We need to stop treating units like only one agent can possibly report state for it at a given time. It is incredibly important to know if a unit is still running in some capacity on a node, when it shouldn't be.

Taking systemd's lead, it allows you to visualize processes across a bunch of systemd-nspawn containers like so:

$ systemctl --recursive list-units fleet.service
UNIT                 LOAD   ACTIVE SUB     DESCRIPTION
fleet.service        loaded active running fleet
smoke0:fleet.service loaded active running fleet.service
smoke1:fleet.service loaded active running fleet.service
smoke2:fleet.service loaded active running fleet.service
smoke3:fleet.service loaded active running fleet.service
@jonboulle
Copy link
Contributor

related: #749

@bcwaldon bcwaldon added this to the v0.7.0 milestone Aug 8, 2014
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