Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Common attribute for entry state #604

Open
MikaelSmith opened this issue Nov 21, 2019 · 3 comments
Open

Common attribute for entry state #604

MikaelSmith opened this issue Nov 21, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@MikaelSmith
Copy link
Contributor

It's common for VMs, containers, and services to have a running/not-running state. Some operations - particularly exec, and thus reading the filesystem - don't work when a container or VM is not running.

We should add a common attribute for state. It's useful to know whether it's running - and thus can respond to exec and signals - or some other state. I would model this as a boolean running flag, and a free-form string that describes the state.

ls should be updated to display the state, and use color or other symbols to denote a running instance.

@MikaelSmith MikaelSmith added the enhancement New feature or request label Nov 21, 2019
@ekinanp
Copy link
Contributor

ekinanp commented Nov 21, 2019

Hm, how do you intend to use the separate flag for running?

I think making state a string would be useful. People could specify the entry's possible states in the schema, and the color code for each state. We could have docs list this stuff.

@MikaelSmith
Copy link
Contributor Author

I mentioned a uniform way of showing that an instance is running. Could also early fail Exec based on that.

@ekinanp
Copy link
Contributor

ekinanp commented Nov 21, 2019

Yeah, was mostly asking to confirm the latter. I think we should take a similar approach to signal and specify a set of common states (and color codes associated with that state). That should be enough to prevent people from (accidentally and interactively) running Exec on a non-running thing while providing a uniform way to show a running instance.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants