Description of problem: ======================== Ceph-ansible installation fails with below error:- TASK [ceph-mon : pull rhceph image] ******************************************** fatal: [magna004]: FAILED! => {"changed": false, "cmd": ["docker", "pull", "docker.io/rhceph:2.2-3"], "delta": "0:00:00.524667", "end": "2017-05-02 03:16:58.023425", "failed": true, "rc": 1, "start": "2017-05-02 03:16:57.498758", "stderr": "Error: image library/rhceph:2.2-3 not found", "stdout": "Trying to pull repository docker.io/library/rhceph ... \nPulling repository docker.io/library/rhceph", "stdout_lines": ["Trying to pull repository docker.io/library/rhceph ... ", "Pulling repository docker.io/library/rhceph"], "warnings": []} to retry, use: --limit @/root/2-2update/site-docker.retry Version-Release number of selected component (if applicable): ============================================================== ceph-ansible-2.2.2-1.el7scon.noarch How reproducible: ================ always Steps to Reproduce: =================== 1.do all preflight operation on all cluster node 2. Set all required variable for ansible and install ceph Actual results: =============== TASK [ceph-mon : pull rhceph image] ******************************************** fatal: [magna004]: FAILED! => {"changed": false, "cmd": ["docker", "pull", "docker.io/rhceph:2.2-3"], "delta": "0:00:00.524667", "end": "2017-05-02 03:16:58.023425", "failed": true, "rc": 1, "start": "2017-05-02 03:16:57.498758", "stderr": "Error: image library/rhceph:2.2-3 not found", "stdout": "Trying to pull repository docker.io/library/rhceph ... \nPulling repository docker.io/library/rhceph", "stdout_lines": ["Trying to pull repository docker.io/library/rhceph ... ", "Pulling repository docker.io/library/rhceph"], "warnings": []} [root@magna044 2-2update]# grep registry group_vars/docker-commons.yml ceph_docker_registry: "brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888" [root@magna044 2-2update]# grep ceph_docker_image group_vars/all.yml ceph_docker_image: "rhceph" ceph_docker_image_tag: 2.2-3 Expected results: ================= If 'ceph_docker_registry' is set then it should pull image from there not from docker.io Additional info: ================ .//roles/ceph-docker-common/defaults/main.yml has ceph_docker_registry: docker.io If we change this value it works fine
Rachana, I see from your paste above that you put ``ceph_docker_registry`` in a file called 'group_vars/docker-commons.yml'. That file will not be used by ceph-ansible because it does not match up with a defined host group in the playbook. Can you try setting ``ceph_docker_registry`` in group_vars/all.yml? Thanks, Andrew
(In reply to Andrew Schoen from comment #2) > Rachana, > > I see from your paste above that you put ``ceph_docker_registry`` in a file > called 'group_vars/docker-commons.yml'. That file will not be used by > ceph-ansible because it does not match up with a defined host group in the > playbook. > > Can you try setting ``ceph_docker_registry`` in group_vars/all.yml? > > Thanks, > Andrew Andrew, In ceph-ansible-2.2.2-1.el7 `ceph_docker_registry`` is not available in group_vars/all.yml. Do you want me to add that variable into that file and set value?
(In reply to Rachana Patel from comment #3) > (In reply to Andrew Schoen from comment #2) > > Rachana, > > > > I see from your paste above that you put ``ceph_docker_registry`` in a file > > called 'group_vars/docker-commons.yml'. That file will not be used by > > ceph-ansible because it does not match up with a defined host group in the > > playbook. > > > > Can you try setting ``ceph_docker_registry`` in group_vars/all.yml? > > > > Thanks, > > Andrew > > Andrew, > > In ceph-ansible-2.2.2-1.el7 `ceph_docker_registry`` is not available in > group_vars/all.yml. > > Do you want me to add that variable into that file and set value? Yeah, please go ahead and add it. That file can take any ceph-ansible configuration option even if it's not there and commented out. I'm unsure why it's not there already actually. Perhaps a bug in the script that generates those files.
At least upstream, the docker-common role should be pulled in by roles/ceph-<daemon>/meta/main.yml when <foo>_containerized_deployment is set. This is how containerization work upstream. So, group_vars/docker-commons.yml should be pulled in properly.
(In reply to Daniel Gryniewicz from comment #5) > At least upstream, the docker-common role should be pulled in by > roles/ceph-<daemon>/meta/main.yml when <foo>_containerized_deployment is > set. This is how containerization work upstream. > > So, group_vars/docker-commons.yml should be pulled in properly. Yes, the ceph-docker-common role will be used. It's just that because we have no host group named 'docker-commons' in the site.yml playbook ansible will not use any configuration set in group_vars/docker-commons.yml. Please refer to the upstream ansible documentation for further explanation: http://docs.ansible.com/ansible/intro_inventory.html#splitting-out-host-and-group-specific-data
Rachana, Have you had a chance to try my suggestion in https://bugzilla.redhat.com/show_bug.cgi?id=1447179#c2 ? My testing is showing that this works if set in group_vars/all.yml Thanks!
(In reply to Andrew Schoen from comment #7) > Rachana, > > Have you had a chance to try my suggestion in > https://bugzilla.redhat.com/show_bug.cgi?id=1447179#c2 ? > > My testing is showing that this works if set in group_vars/all.yml > > Thanks! Andrew, If I add, `ceph_docker_registry` in group_vars/all.yml, it works. Thanks!
This issues can be fixed with Docs. Gregory will take next step
We are addressing this in the container GA draft document: https://docs.google.com/document/d/1JMRP7ltPHHWMV2DQVBVnZk_kgZ8fk8IX3p-l9dIM4DQ/edit
Seb, I had a chat with Andrew and we think a better short-term solution is a downstream patch that changes roles/ceph-docker-common/defaults/main.yml to point to the Red Hat source. I think longer term we need to consider shipping our own group_vars and all.yml that is pre configured as much as possible for users of the product. What do you think?
Greg, Would it be easier to simply add ceph_docker_registry to roles/ceph-common/defaults/main.yml instead? As for maintaining let's say our own 'group_vars/all.yml.rhcs.sample', we tried that and it was really difficult. If we can find an easy solution for this then yes I agree that's a nice to have. Perhaps this could also be solved by putting more efforts in the doc :).
upstream pr: https://github.com/ceph/ceph-ansible/pull/1516
I see that you've made it easier for the user to follow the docs and get the registry correctly configured. Thank you! I hear that you're saying that maintaining the all.yml.rhcs would be difficult. How is that more or less work than requiring the docs to do the same and the user to get it right? That seems like it adds two places for a mistake to happen and requires the efforts or two other parties to successfully configure this. What is your experience with doing this?
When configuring ceph-ansible with rhcs there are not so much options, so I don't see much value in having a all.yml.rhcs file. If the all.yml is not clear enough, we can potentially try to clarify it, although I need to know what needs to be done.
My intent is that each product release the document to configure and install ceph and ceph-docker becomes shorter with fewer places to stray from sane defaults. So this is why I think improving the doc is the wrong place to manage this. I'm not saying that all that has to be done as part of this BZ AND I'd like to be headed in that direction. What do you think about this idea? thank you
Upstream PR has merged; please ensure this gets back ported and moved to POST.
We are currently backporting, new build coming tomorrow.
discussed at program meeting, will have in POST in next hour or so and to ON_QA no later than tomorrow
backport PR merged
Just released a new tag: https://github.com/ceph/ceph-ansible/releases/tag/v2.2.6. Can we get a new build?
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/RHBA-2017:1496