Hide Forgot
I put exit 1 in the entry script for etcd container. and built locally and then tested without Type=notify in the service file, and I see that the systemctl status logs the start error correctly. systemctl status etcd.service ● etcd.service - Etcd Server Loaded: loaded (/etc/systemd/system/etcd.service; enabled; vendor preset: disabled) Active: failed (Result: start-limit) since Thu 2016-09-15 12:39:31 EDT; 6s ago Process: 16412 ExecStop=/bin/runc kill etcd (code=exited, status=1/FAILURE) Process: 16393 ExecStart=/bin/runc start etcd (code=exited, status=1/FAILURE) Main PID: 16393 (code=exited, status=1/FAILURE) Sep 15 12:39:31 rhel73 systemd[1]: Unit etcd.service entered failed state. Sep 15 12:39:31 rhel73 systemd[1]: etcd.service failed. Sep 15 12:39:31 rhel73 systemd[1]: etcd.service holdoff time over, scheduling restart. Sep 15 12:39:31 rhel73 systemd[1]: start request repeated too quickly for etcd.service Sep 15 12:39:31 rhel73 systemd[1]: Failed to start Etcd Server. Sep 15 12:39:31 rhel73 systemd[1]: Unit etcd.service entered failed state. Sep 15 12:39:31 rhel73 systemd[1]: etcd.service failed. So I dont think there is an issue here.
CAI, Also as per systemd docuementation, Type=notify is useful when "the daemon sends a notification message via sd_notify(3) or an equivalent call when it has finished starting up". I am not sure runc or etcd does that.
CAI, I think I see the difference when using Type=notify. #systemctl start etcd.service Job for etcd.service failed because the control process exited with error code. See "systemctl status etcd.service" and "journalctl -xe" for details. I think this failure is not available without Type=notify. I will fix it next built today.