Skip to content

Cannot install docker registry on a cluster with master and one minion #1123

Closed

Description

@ppalaga

Steps to reproduce:

cd origin
git checkout v0.3.2
make clean
export OPENSHIFT_DEV_CLUSTER=true
export OPENSHIFT_NUM_MINIONS=1
vagrant halt
rm -Rf openshift.local.*
vagrant destroy minion-1 -f
vagrant destroy master -f
vagrant up
ssh -o PasswordAuthentication=no -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
   -p 2222 -i ".vagrant/machines/master/virtualbox/private_key" [email protected] << EOF
        set -x
        set -e
        sudo ln -T /usr/bin/openshift /usr/bin/osc

        cd /vagrant
        export KUBECONFIG="/vagrant/openshift.local.certificates/admin/.kubeconfig"
        export CURL_CA_BUNDLE="/vagrant/openshift.local.certificates/admin/root.crt"

        #perhaps not necessary?
        examples/sample-app/pullimages.sh

        CERT_DIR="/vagrant/openshift.local.certificates/openshift-client" hack/install-registry.sh

EOF

The docker log on minion-1 is the only place where I could see something suspicious happening: https://gist.github.com/ppalaga/ba12ac5a6e4c42e5fbd2#file-docker-log

Docker seems to pull and create openshift/origin-pod, v0.3.2 sucessfully around https://gist.github.com/ppalaga/ba12ac5a6e4c42e5fbd2#file-docker-log-L317 , but I am not able to tell from the log what happens after that:

After that:

[vagrant@openshift-minion-1 ~]$ sudo docker ps -a
CONTAINER ID        IMAGE                              COMMAND                CREATED             STATUS                           PORTS               NAMES
776dc6b0570c        openshift/origin-deployer:v0.3.2   "/usr/bin/openshift-   About an hour ago   Exited (255) About an hour ago                       k8s_deployment.c9754cc8_deploy-docker-registry-1cwxe1.default.api_b884f277-bc03-11e4-ae70-0800279696e1_dd86986c   
3de11bcdf48b        openshift/origin-pod:v0.3.2        "/pod"                 About an hour ago   Up About an hour                                     k8s_POD.772ec8a6_deploy-docker-registry-1cwxe1.default.api_b884f277-bc03-11e4-ae70-0800279696e1_4b0988fe   
[vagrant@openshift-master vagrant]$ osc get pods
POD                             IP                  CONTAINER(S)        IMAGE(S)                           HOST                            LABELS              STATUS
deploy-docker-registry-1cwxe1   10.1.0.2            deployment          openshift/origin-deployer:v0.3.2   openshift-minion-1/10.245.2.3   <none>              Failed

Activity

  1. mfojtik commented on Feb 24, 2015

    @mfojtik
    Contributor

    @smarterclayton any ideas?

  2. ppalaga commented on Feb 24, 2015

    @ppalaga
    ContributorAuthor

    Using current master f4221c5 and openshift ex registry --create --credentials="/vagrant/openshift.local.certificates/admin/.kubeconfig" instead of hack/install-registry.sh does not help.

  3. smarterclayton commented on Mar 9, 2015

    @smarterclayton
    Contributor

    Can you get the log output of the deployment pod?

  4. ppalaga commented on Mar 9, 2015

    @ppalaga
    ContributorAuthor

    I hope this is what you want:

    Both listings were made on minion-1:

    $ sudo docker ps -a
    CONTAINER ID        IMAGE                            COMMAND                CREATED             STATUS                        PORTS               NAMES
    3ff3c9e1da64        openshift/origin-deployer:v0.4   "/usr/bin/openshift-   25 minutes ago      Exited (255) 24 minutes ago                       k8s_deployment.47ea56b6_deploy-docker-registry-1qk7we.default.api_48566147-c664-11e4-b549-0800279696e1_4874ed16   
    6adeaf065f63        openshift/origin-pod:v0.4        "/pod"                 28 minutes ago      Up 28 minutes                                     k8s_POD.8fdfc847_deploy-docker-registry-1qk7we.default.api_48566147-c664-11e4-b549-0800279696e1_36d9ff45        
    
    sudo docker logs --tail="all" 3ff3c9e1da64
    F0309 14:01:48.758685       1 deployer.go:65] Get https://10.0.2.15:8443/api/v1beta1/replicationControllers/docker-registry-1?namespace=default: dial tcp 10.0.2.15:8443: connection refused
    
  5. ppalaga commented on Mar 9, 2015

    @ppalaga
    ContributorAuthor

    I guess that 10.0.2.15:8443 is supposed to be the master. Looking at master, I see the following:

    (1) 10.0.2.15 is up:

    [vagrant@openshift-master ~]$ sudo ifconfig
    docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 172.17.42.1  netmask 255.255.0.0  broadcast 0.0.0.0
            ether 56:84:7a:fe:97:99  txqueuelen 0  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 10.245.2.2  netmask 255.255.255.0  broadcast 10.245.2.255
            inet6 fe80::a00:27ff:fee3:305e  prefixlen 64  scopeid 0x20<link>
            ether 08:00:27:e3:30:5e  txqueuelen 1000  (Ethernet)
            RX packets 7640  bytes 1490723 (1.4 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 9593  bytes 1087160 (1.0 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 0  (Local Loopback)
            RX packets 327264  bytes 58218662 (55.5 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 327264  bytes 58218662 (55.5 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    p2p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
            inet6 fe80::a00:27ff:fe96:96e1  prefixlen 64  scopeid 0x20<link>
            ether 08:00:27:96:96:e1  txqueuelen 1000  (Ethernet)
            RX packets 97080  bytes 79123791 (75.4 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 45370  bytes 2821462 (2.6 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    

    (2) But the 8443 port seems to be served only over ipv6:

    [vagrant@openshift-master ~]$ sudo netstat -tulpen | grep 8443
    tcp6       0      0 :::8443                 :::*                    LISTEN      0          23760      2970/openshift      
    
    
  6. ppalaga commented on Mar 9, 2015

    @ppalaga
    ContributorAuthor

    It looks like setting KUBERNETES_MASTER has no effect:

    [vagrant@openshift-minion-1 vagrant]$ export KUBERNETES_MASTER=https://fe80::a00:27ff:fe96:96e1:8443
    [vagrant@openshift-minion-1 vagrant]$ openshift ex registry --create --credentials=/vagrant/openshift.local.certificates/admin/.kubeconfig
    F0309 16:06:02.242542   15583 registry.go:145] Can't check for existing docker-registry "docker-registry": Get https://10.0.2.15:8443/api/v1beta1/services/docker-registry?namespace=default: dial tcp 10.0.2.15:8443: connection refused
    
  7. ncdc commented on Mar 9, 2015

    @ncdc
    Contributor

    Do you have firewalld enabled?

  8. ppalaga commented on Mar 9, 2015

    @ppalaga
    ContributorAuthor

    No, firewalld is off on master:

    [vagrant@openshift-master vagrant]$ sudo firewall-cmd --state
    not running
    
  9. 0xmichalis commented on Mar 9, 2015

    @0xmichalis
    Contributor
  10. ppalaga commented on Mar 10, 2015

    @ppalaga
    ContributorAuthor

    Upgrading to v0.4.1 solves the problem. It was probably fixed by this commit: b60ea67

    Thank you all for the assistance!

  11. added a commit that references this issue on Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions