Closed despiegk closed 1 year ago
zinit is built to run as a process manager to replace systemd. Hence it need to run as pid
(init process). There are other ways to run it as a normal process (in debugging mode) in that case you are actively doing development on it and know exactly what you are doing.
So zinit can run mainly as follows:
PID 1
(how it runs in zos)PID 1
inside a container (mainly flists already uses it) this is done using a special flag (zinit init --container)
Also running any command like zinit logs
or other commands, calls the PID 1 over a unix socket to execute this command. hence you can't run it unless zinit init
is actually running! so all other zinit
commands are just an api call to the main process.
This means:
zinit log
won't work without zinit running, because if there are no zinit, means there are no processes and if there are no processes, there are no logs. zinit keep all processes logs in a fixed size ringbuffer, we never write them to disk.
vecotr
to attack to the ringbuffer, and push all logs to vector aggregation sever)zinit list
also need to have zinit already working otherwise it won't be able to list what services are monitored and their statuseszinit
can be indeed started multiple times in debug mode. (for development) and in that case you need to give them different unix
sockets paths otherwise they will override the socket and hence older started processes won't be reachable anymore with the zinit commandthis can be done more logical in my opinion
We can for sure improve the errors reporting always
the issue for error reporting https://github.com/threefoldtech/zinit/pull/48
could not shutdown
basezinitredis: zinit shutdown zinit: INFO (zinit::zinit) shutting down zinit: INFO (zinit::zinit) service 'redis' is scheduled for a shutdown basezinitredis: zinit: ERROR (zinit::app::api) failed to execute shutdown: EPERM: Operation not permitted
I had to remove it with a hard kill