Bug 1376123

Summary: unit file missing Type=notify
Product: Red Hat Enterprise Linux 7 Reporter: Qian Cai <qcai>
Component: etcd-containerAssignee: Suresh Kolichala <skolicha>
Status: CLOSED WONTFIX QA Contact: atomic-bugs <atomic-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: imcleod, lfriedma, qcai, ypu
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: etcd-docker-2.3.7-9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 12:08:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Comment 2 Avesh Agarwal 2016-09-15 16:43:53 UTC
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.

Comment 3 Avesh Agarwal 2016-09-15 16:57:52 UTC
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.

Comment 4 Avesh Agarwal 2016-09-15 17:27:22 UTC
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.