Origin: oc cluster up still does not recognize --insecure-registry argument in 3.10

Created on 9 Aug 2018  路  9Comments  路  Source: openshift/origin

Although https://github.com/openshift/origin/issues/8997 is closed, but I had oc cluster up failed at error msg did not detect an --insecure-registry argument on the Docker daemon, even though there is --insecure-registry xxxxxxxx:5000 parameter on dockerd engine.

And the workaroud in 8997 does not work for me.

Version
[root@openshift-1 OpenShift_BaseDir]# oc version
oc v3.10.0+dd10d17
kubernetes v1.10.0+b81c8f8
features: Basic-Auth GSSAPI Kerberos SPNEGO
[root@openshift-1 OpenShift_BaseDir]#
[root@openshift-1 OpenShift_BaseDir]# cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.5 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.5"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.5 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.5:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.5
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.5"
[root@openshift-1 OpenShift_BaseDir]# docker version
Client:
 Version:           18.06.0-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        0ffa825
 Built:             Wed Jul 18 19:08:18 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.0-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       0ffa825
  Built:            Wed Jul 18 19:10:42 2018
  OS/Arch:          linux/amd64
  Experimental:     false
[root@openshift-1 OpenShift_BaseDir]#
Steps To Reproduce
  1. [step 1]
  2. [step 2]
Current Result
I0809 02:57:17.728539   25629 helper.go:183] Inspecting docker container "origin"
I0809 02:57:17.729078   25629 helper.go:187] Container "origin" was not found
Checking for supported Docker version (=>1.22) ...
I0809 02:57:17.729098   25629 helper.go:99] Retrieving Docker version
I0809 02:57:17.729613   25629 helper.go:105] Docker version results: &types.Version{Version:"18.06.0-ce", APIVersion:"1.38", MinAPIVersion:"1.12", GitCommit:"0ffa825", GoVersion:"go1.10.3", Os:"linux", Arch:"amd64", KernelVersion:"3.10.0-862.2.3.el7.x86_64", Experimental:false, BuildTime:"2018-07-18T19:10:42.000000000+00:00"}
Checking if insecured registry is configured properly in Docker ...
I0809 02:57:17.729655   25629 registryconfig.go:30] Contains 1 --insecure-registry entries
F0809 02:57:17.729699   25629 helpers.go:119] error: did not detect an --insecure-registry argument on the Docker daemon
[root@openshift-1 ~]#
Expected Result

oc cluster up would recognize insecure-registry and in both parameter and daemon.json

Additional Information

[try to run $ oc adm diagnostics (or oadm diagnostics) command if possible]
[if you are reporting issue related to builds, provide build logs with BUILD_LOGLEVEL=5]
[consider attaching output of the $ oc get all -o json -n <namespace> command to the issue]
[visit https://docs.openshift.org/latest/welcome/index.html]

componencluster-up lifecyclrotten simaster

Most helpful comment

Yup, i was doing it wrong .. but not all methods work.
this does NOT work:
more /etc/docker/daemon.json
{
"insecure-registry": "172.30.0.0/16"
}

You need to have the IP(s) in array like this:

{
        "insecure-registries": [
                "172.30.0.0/16"
        ]
}

At least that worked for me, with firewall setup from https://medium.com/@fabiojose/working-with-oc-cluster-up-a052339ea219 .

All 9 comments

on fedora 28 only /etc/docker/daemon.json approach worked. i did not test the dockerd parameter approach

@openshift/sig-master

Yup, i was doing it wrong .. but not all methods work.
on 16.04.1-Ubuntu

oc version
oc v3.10.0+dd10d17
kubernetes v1.10.0+b81c8f8
features: Basic-Auth GSSAPI Kerberos SPNEGO

this does NOT work:
more /etc/docker/daemon.json
{
"insecure-registry": "172.30.0.0/16"
}
This works correctly:
dockerd --insecure-registry 172.30.0.0/16

same result as above if setting below in /etc/default/docker
DOCKER_OPTS='--insecure-registry 172.30.0.0/16'

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Yup, i was doing it wrong .. but not all methods work.
this does NOT work:
more /etc/docker/daemon.json
{
"insecure-registry": "172.30.0.0/16"
}

You need to have the IP(s) in array like this:

{
        "insecure-registries": [
                "172.30.0.0/16"
        ]
}

At least that worked for me, with firewall setup from https://medium.com/@fabiojose/working-with-oc-cluster-up-a052339ea219 .

Just check the output of docker info.

docker project might change their configuration methods any time, so do not rely on file names and stuff like that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

crobby picture crobby  路  4Comments

thescouser89 picture thescouser89  路  3Comments

nicolaferraro picture nicolaferraro  路  3Comments

syui picture syui  路  3Comments

theone4ever picture theone4ever  路  3Comments