Bug 1382403

Summary: flannel system container - service fails to start after reboot on rhel atomic host
Product: Red Hat Enterprise Linux 7 Reporter: Michael Nguyen <mnguyen>
Component: flannel-containerAssignee: Avesh Agarwal <avagarwa>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.3CC: avagarwa, mnguyen, ypu
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: flannel-docker-0.5.5-5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 09:11:37 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:

Description Michael Nguyen 2016-10-06 14:58:00 UTC
Description of problem:
flannel container fails to start after reboot on rhel atomic host

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. atomic install --system --name=etcd gscrivano/etcd
2. systemctl start etcd
3. runc exec etcd etcdctl set /atomic.io/network/config '{"Network":"172.17.0.0/16"}'
4. systemctl start flannel
5. systemctl daemon-reload
6. systemctl reboot
7. Check status of flannel and docker

Actual results:
Flannel is not started and prevents docker from restarting

Expected results:
Flannel and docker services are up and running

Additional info:

Comment 2 Avesh Agarwal 2016-10-06 15:53:37 UTC
Let me know more details here:

1. why are you using this image gscrivano/etcd? why not official rhel/atomic's etcd image? 

2. how did you install flannel? is it rpm or container?

Comment 3 Michael Nguyen 2016-10-06 16:00:23 UTC
1.  I just tried with the official rhel/atomic etcd image and maybe hitting this issue: https://bugzilla.redhat.com/show_bug.cgi?id=1376123

The service won't start after using atomic install --system to install the container.

2.  I am installing flannel as a container.

Comment 4 Avesh Agarwal 2016-10-06 16:06:46 UTC
1. Even with the issue, etcd container service will start without any issue except that systemctl will time out. For a workaround, to avoid that after installation, just remove Type=notify manually from the service unit file, and then start the service.

2. Could you please tell the exact command you used for flannel installation.

3. Do you have flannel or etcd rpms installed on the machine? To find out if they are interfering with the container installation?

Comment 5 Michael Nguyen 2016-10-06 16:41:41 UTC
1.  I removed Type=notify and the containers start without the timeout now but am still seeing the restart issue after reboot.

2.  atomic install --system --name=flannel brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/rhel7/flannel


3.  I just tried removing flannel and etcd rpms then installing the containers.  I am seeing the same issue with flannel starting after reboot.

Comment 6 Avesh Agarwal 2016-10-06 18:48:40 UTC
The issue is reproducible and the cause is that after reboot /etc/systemd/system/docker.service.d/flannel.conf and /run/flannel are deleted and not recreated during next restart of flannel. I have noticed that at times, even during the initial start, these files are not created and flannel fails.

Comment 7 Avesh Agarwal 2016-10-06 19:10:04 UTC
I think I have found the root cause and the problem is that bind mount of /etc/systemd/system/docker.service.d/ is incorrect and point to a file flannel.conf.

Comment 8 Avesh Agarwal 2016-10-06 19:30:37 UTC
I have pushed an update to its upstream repo here: https://github.com/aveshagarwal/flannel-container/commit/1a177a55496af0fba4b0ac6d7d3e80a1bbd15133

I will push this change to rhel/atomic in the next rebuild for rc candidate.

Comment 9 Michael Nguyen 2016-10-07 13:23:57 UTC
I've tested flannel-docker-0.5.5-5 and the service starts after reboot now.

Comment 11 Joy Pu 2016-10-14 05:37:31 UTC
Test with the newest version of flannel-docker-0.5.5-6 with the steps in comment #1. And seems after the system rebooted. Flannel and docker all works fine. So set this to verified.

Comment 12 errata-xmlrpc 2016-11-04 09:11:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:2650