Bug 1447179 - [ceph-ansible] : Installation fails in pull image task as it tries to fetch from docker.io eventhough 'ceph_docker_registry' is set to something else
Summary: [ceph-ansible] : Installation fails in pull image task as it tries to fetch ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Storage Console
Classification: Red Hat Storage
Component: ceph-ansible
Version: 2
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 2
Assignee: Sébastien Han
QA Contact: Rachana Patel
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-02 03:25 UTC by Rachana Patel
Modified: 2017-06-19 13:17 UTC (History)
18 users (show)

Fixed In Version: ceph-ansible-2.2.6-1.el7scon
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-19 13:17:34 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1496 0 normal SHIPPED_LIVE ceph-installer, ceph-ansible, and ceph-iscsi-ansible update 2017-06-19 17:14:02 UTC

Description Rachana Patel 2017-05-02 03:25:36 UTC
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

Comment 2 Andrew Schoen 2017-05-02 18:20:08 UTC
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

Comment 3 Rachana Patel 2017-05-02 20:52:33 UTC
(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?

Comment 4 Andrew Schoen 2017-05-02 20:54:49 UTC
(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.

Comment 5 Daniel Gryniewicz 2017-05-03 12:23:00 UTC
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.

Comment 6 Andrew Schoen 2017-05-03 12:50:47 UTC
(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

Comment 7 Andrew Schoen 2017-05-04 16:34:32 UTC
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!

Comment 8 Rachana Patel 2017-05-10 12:45:49 UTC
(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!

Comment 9 John Poelstra 2017-05-10 15:24:32 UTC
This issues can be fixed with Docs. Gregory will take next step

Comment 10 seb 2017-05-10 16:54:40 UTC
We are addressing this in the container GA draft document: https://docs.google.com/document/d/1JMRP7ltPHHWMV2DQVBVnZk_kgZ8fk8IX3p-l9dIM4DQ/edit

Comment 11 Christina Meno 2017-05-10 17:38:11 UTC
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?

Comment 12 seb 2017-05-11 06:34:31 UTC
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 :).

Comment 13 seb 2017-05-12 13:04:23 UTC
upstream pr: https://github.com/ceph/ceph-ansible/pull/1516

Comment 14 Christina Meno 2017-05-15 17:57:41 UTC
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?

Comment 15 seb 2017-05-16 09:25:30 UTC
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.

Comment 16 Christina Meno 2017-05-16 16:16:31 UTC
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

Comment 17 Ian Colle 2017-05-16 16:21:27 UTC
Upstream PR has merged; please ensure this gets back ported and moved to POST.

Comment 18 seb 2017-05-17 14:45:49 UTC
We are currently backporting, new build coming tomorrow.

Comment 19 John Poelstra 2017-05-17 15:11:18 UTC
discussed at program meeting, will have in POST in next hour or so and to ON_QA no later than tomorrow

Comment 20 Andrew Schoen 2017-05-17 20:52:29 UTC
backport PR merged

Comment 24 seb 2017-05-18 14:38:44 UTC
Just released a new tag: https://github.com/ceph/ceph-ansible/releases/tag/v2.2.6.
Can we get a new build?

Comment 30 errata-xmlrpc 2017-06-19 13:17:34 UTC
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


Note You need to log in before you can comment on or make changes to this bug.