Enabling the vmstated service with service vmstated enable followed by service vmstated start starts vmstated, but it dies immediately because the directory it scans for directories of bhyve guest configurations doesn't exist. The rc.d script still exits without an error.
Running vmstated -f returns with exit code 2, but allowing it to daemonize doesn't log an error (with a default syslog.conf at least) and exits with status 0.
Expected behaviour
The rc.d script should return a non-zero exit code (EX_CONFIG (78) from sysexits.h would be fitting) if vmstated isn't running after it started it. The rc.d script should also either create the directory or fail to start if the directory is missing.
This is an easy misconfiguration to encounter on first installation even if it goes away the moment you create the required parent directory to put in a guest configuration. IMO this should still be handled better because it can trip up a new user and fatal configuration errors shouldn't be silently ignored.
This should be fixed with the recent commit (b8c2560d32a3e2862b00b994e98137732598d99e) in version 0.06, but I'll do some additional testing before I'll close this.
Discovered behaviour
Enabling the vmstated service with
service vmstated enable
followed byservice vmstated start
startsvmstated
, but it dies immediately because the directory it scans for directories of bhyve guest configurations doesn't exist. The rc.d script still exits without an error.Running
vmstated -f
returns with exit code 2, but allowing it to daemonize doesn't log an error (with a default syslog.conf at least) and exits with status 0.Expected behaviour
The rc.d script should return a non-zero exit code (
EX_CONFIG (78)
fromsysexits.h
would be fitting) if vmstated isn't running after it started it. The rc.d script should also either create the directory or fail to start if the directory is missing.This is an easy misconfiguration to encounter on first installation even if it goes away the moment you create the required parent directory to put in a guest configuration. IMO this should still be handled better because it can trip up a new user and fatal configuration errors shouldn't be silently ignored.