Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1450286 - docker-registry and router deployments failed due to serviceaccount not found while using docker system container in containerized installation
docker-registry and router deployments failed due to serviceaccount not found...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.6.0
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: Steve Milner
Gan Huang
:
Depends On: 1450307
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-12 03:34 EDT by Gan Huang
Modified: 2017-08-16 15 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-10 01:23:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 05:02:50 EDT

  None (edit)
Description Gan Huang 2017-05-12 03:34:17 EDT
Description of problem:
docker-registry and router deployments failed due to serviceaccount not found while using docker system container in containerized installation:

# oc logs -f dc/router
error: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
# oc logs -f dc/docker-registry
error: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory


Version-Release number of selected component (if applicable):
openshift-ansible master branch (last commit id is 593ef65)

# openshift version
openshift v3.6.74
kubernetes v1.6.1+5115d708d7
etcd 3.1.0

container-engine image id: 74bcfa1d95732d05b3aec19577e8fa00f215bf3735f0e488fe7cda8eee8123f2

How reproducible:
always

Steps to Reproduce:
1. Trigger containerized installation using docker system container
containerized=true
openshift_docker_use_system_container=true
openshift_docker_systemcontainer_image_registry_override=brew.xxxx.xxx.redhat.com/rhel7


Actual results:
# oc logs -f dc/router
error: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
# oc logs -f dc/docker-registry
error: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory

Expected results:
docker-registry/router deployed successfully, app can be created as well.

Additional info:
No such issue in rpm installs.
Comment 1 Steve Milner 2017-05-12 12:19:57 EDT
Adding gscrivan as this may be related to the underlying container.
Comment 2 Steve Milner 2017-05-12 15:15:57 EDT
PR for adding /var/run into the system container: https://github.com/projectatomic/atomic-system-containers/pull/67

Handing this over to Giuseppe for merging and verification.
Comment 3 Steve Milner 2017-05-12 15:28:43 EDT
To clarify, the container-engine service doesn't cause this problem when the rest of the install is not containerized, correct? (IE: containerized=false)
Comment 4 Giuseppe Scrivano 2017-05-12 17:57:16 EDT
I am trying to replicate it here, in the meanwhile could you try to replace "-v /run:/run" in the systemd unit file for the node container to "-v /run:/run -v /var/run/secrets:/var/run/secrets:rbind", restart the service and see if it works?
Comment 5 Steve Milner 2017-05-12 18:02:57 EDT
To give some more background, Giuseppe believes that this is a an issue with the openshift.docker.node.service file. It's currently mounting with "/run:/run". The /var/run/secrets directory is mounted as a tmpfs and is not propagated which could be the issue.

The belief is by specifying "-v /var/run/secrets:/var/run/secrets:rbind" the file system should become available.
Comment 6 Giuseppe Scrivano 2017-05-13 15:30:57 EDT
I could reproduce it here and I could see that `openshift.docker.gte_1_10` is not properly set when using the Docker container.

It results in losing `:rslave` in "-v {{ openshift.common.data_dir }}:{{ openshift.common.data_dir }}{{ ':rslave' if openshift.docker.gte_1_10 | default(False) | bool else '' }}" in the roles/openshift_node/templates/openshift.docker.node.service file.

I've tried to manually set ':rslave' and it solves the reported issue.
Comment 7 Steve Milner 2017-05-14 11:58:31 EDT
Giuseppe:

PTAL https://github.com/openshift/openshift-ansible/pull/4184
Comment 8 Steve Milner 2017-05-15 09:54:39 EDT
PR merged.
Comment 10 Gan Huang 2017-06-12 03:04:10 EDT
Verified with openshift-ansible-3.6.98-1.git.0.e651d65.el7.noarch.rpm

atomic-1.17.2-4.git2760e30.el7.x86_64
runc-1.0.0-6.gite800860.el7.x86_64

# atomic -v
1.17.1
# runc -v
runc version 1.0.0-rc3
commit: cafb8d8755dc2b990fc73fbf7bff62f534da9219-dirty
spec: 1.0.0-rc5

# docker version
Client:
 Version:         1.12.6
 API version:     1.24
 Package version: docker-1.12.6-28.git1398f24.el7.x86_64
 Go version:      go1.7.4
 Git commit:      1398f24/1.12.6
 Built:           Wed May 17 01:16:44 2017
 OS/Arch:         linux/amd64

Server:
 Version:         1.12.6
 API version:     1.24
 Package version: docker-1.12.6-31.git3a6eaeb.el7.x86_64
 Go version:      go1.7.6
 Git commit:      3a6eaeb/1.12.6
 Built:           Tue Jun  6 12:45:07 2017
 OS/Arch:         linux/amd64
Comment 12 errata-xmlrpc 2017-08-10 01:23:08 EDT
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/RHEA-2017:1716

Note You need to log in before you can comment on or make changes to this bug.