Testing with images from authenticated registry fails

24 views
Skip to first unread message

rob...@meinit.nl

unread,
Oct 15, 2019, 11:29:05 AM10/15/19
to molecule-users
Hi,

I'm trying to test a role on Red Hat's UBI images:

platforms:
  - name: bootstrap-rhel-latest
    image: ubi8/ubi
    registry:
      credentials:
        username: $redhatregistryusername
        password: $redhatregistrypassword
    pre_build_image: yes

This fails:

447   TASK [Log into a Docker registry] **********************************************
448    changed: [localhost] => (item={'name': 'bootstrap-rhel-latest', 'image': 'ubi8/ubi', 'registry': {'url': 'registry.access.redhat.com', 'credentials': {'username': '[secure]', 'password': '[secure]'}}, 'pre_build_image': True})
...
470    TASK [Create molecule instance(s)] *********************************************
471    changed: [localhost] => (item=bootstrap-rhel-latest)
472    
473    TASK [Wait for instance(s) creation to complete] *******************************
474    FAILED - RETRYING: Wait for instance(s) creation to complete (300 retries left).
475    failed: [localhost] (item={'started': 1, 'finished': 0, 'ansible_job_id': '304467639081.4674', 'results_file': '/home/travis/.ansible_async/304467639081.4674', 'changed': True, 'failed': False, 'item': {'name': 'bootstrap-rhel-latest', 'image': 'ubi8/ubi', 'registry': {'url': 'registry.access.redhat.com', 'credentials': {'username': '[secure]', 'password': '[secure]'}}, 'pre_build_image': True}, 'ansible_loop_var': 'item'}) => changed=false 
476      ansible_job_id: '304467639081.4674'
477      ansible_loop_var: item
478      attempts: 2
479      finished: 1
480      item:
481        ansible_job_id: '304467639081.4674'
482        ansible_loop_var: item
483        changed: true
484        failed: false
485        finished: 0
486        item:
487          image: ubi8/ubi
488          name: bootstrap-rhel-latest
489          pre_build_image: true
490          registry:
491            credentials:
492              password: [secure]
493              username: [secure]
494            url: registry.access.redhat.com
495        results_file: /home/travis/.ansible_async/304467639081.4674
496        started: 1
497      msg: 'Error pulling image ubi8/ubi:latest - 404 Client Error: Not Found ("pull access denied for ubi8/ubi, repository does not exist or may require ''docker login''")'

I don't understand why the login worked (line 447-448) and still the pull access is denied. (line 497)

Does anybody have an idea what to change to make this work?
Reply all
Reply to author
Forward
0 new messages