openshift / openshift-ansible

Install and config an OpenShift 3.x cluster
https://try.openshift.com
Apache License 2.0
2.17k stars 2.32k forks source link

docker_image_availability check fails, repo url divided into single character urls #5610

Closed sjenning closed 6 years ago

sjenning commented 6 years ago

Description

Looks to be a tokenizing error in the docker_image_availability check

Failure summary:

  1. Hosts:    infra.lab.variantweb.net, master.lab.variantweb.net, node1.lab.variantweb.net
     Play:     Verify Requirements
     Task:     openshift_health_check
     Message:  One or more checks failed
     Details:  check "docker_image_availability":
               One or more required Docker images are not available:
                   openshift3/ose-deployer:v3.7.0-0.127.0,
                   openshift3/ose-docker-registry:v3.7.0-0.127.0,
                   openshift3/ose-haproxy-router:v3.7.0-0.127.0,
                   openshift3/ose-pod:v3.7.0-0.127.0
               Configured registries: r (unreachable), e (unreachable), g (unreachable), i (unreachable), s (unreachable), t (unreachable), r (unreachable), y (unreachable), . (unreachable), o (unreachable), p (unreachable), s (unreachable), . (unreachable), o (unreachable), p (unreachable), e (unreachable), n (unreachable), s (unreachable), h (unreachable), i (unreachable), f (unreachable), t (unreachable), . (unreachable), c (unreachable), o (unreachable), m (unreachable), registry.access.redhat.com
               Checked by: timeout 10 skopeo inspect --tls-verify=false docker://{registry}/{image}
Version
$ ansible --version
ansible 2.3.2.0
  config file = /home/sjennings/projects/go/src/github.com/openshift/openshift-ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.13 (default, Jun 26 2017, 10:20:05) [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)]

$ git describe
openshift-ansible-3.7.0-0.135.0-10-g62cb2a8d5
Steps To Reproduce
  1. run playbook/byo/config.yml
  2. playbook fails with above error
Expected Results

Installation check succeeds and each character of the openshift_docker_additional_registries is not treated as an individual repo url.

@sdodson

sjenning commented 6 years ago

I believe the error was introduced here https://github.com/openshift/openshift-ansible/pull/5559/files#diff-f6d4c415edd5332159aa1c77eb72b757R156

sdodson commented 6 years ago

/assign mtnbikenc

mtnbikenc commented 6 years ago

@michaelgugino You did some work around this var recently and it looks like this is related. Can you give some background?

michaelgugino commented 6 years ago

@mtnbikenc

Previously, openshift_facts was transforming user-provided strings into lists.

This logic has been moved inside of the docker role. If any other sections of the code assume a list, those sections will have to reimplement the CSV string to list conversion.

I recommend we deprecate providing additional/blocked/insecure as CSV strings and enforce lists.

michaelgugino commented 6 years ago

@mtnbikenc

You'll also need to add the enterprise registry like we're here: https://github.com/openshift/openshift-ansible/pull/5559/files#diff-9dc9c16f5365d2528dd6e1525beebd73R53

mtnbikenc commented 6 years ago

@sdodson, should this be a docs update and add a check to make sure this var is provided as a list or implement more code for CSV list creation? Reference: https://github.com/openshift/openshift-ansible/pull/5165/files#diff-1b06f2ffbea00508e375a7c7ec2d3051

@sjenning Is this problem resolved if you specify the inventory var as a list?

openshift_docker_additional_registries=['registry.ops.openshift.com']
mtnbikenc commented 6 years ago

Looks like @ashcrow already has a PR on this. https://github.com/openshift/openshift-ansible/pull/5619

ashcrow commented 6 years ago

😸

Yup, reported in https://bugzilla.redhat.com/show_bug.cgi?id=1497274 as well.