New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do not delegate facts on client nodes #2459
Conversation
jenkins test luminous-ansible2.4-purge_bluestore_osds_container |
I'm ok with the patch but last time I discussed this with @fultonj he said disabling fact gathering didn't change anything. What has changed since? |
@leseb this is what I've raised yesterday in a discussion with @andrewschoen |
jenkins test luminous-ansible2.4-purge_bluestore_osds_container |
site-docker.yml.sample
Outdated
@@ -32,7 +32,7 @@ | |||
delegate_facts: True | |||
with_items: "{{ groups['all'] }}" | |||
when: | |||
- delegate_facts_host | bool | |||
- delegate_facts_host | bool or inventory_hostname not in groups.get('clients') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 things:
-
The logic seems wrong:
This will delegate facts if delegate_facts_host is true or the host isnt in the clients group. E,g, if you set "delegate_facts_host = false" it will still delegate on non-client hosts.
The title makes it sound like you want delegate_facts_host and inventory_hostname not in groups.get('clients') - which should delegate if delegate_facts_host is true and the host isn't in the client group. -
This has a consequence because if you have a host that is in the clients group and another group (for whatever reason) it won't delegate facts. You may want to check if it is in all the other groups, but not in the clients group, but that makes a long statement.
Maybe a better way would be to remove the "clients" from the hosts: for this task (line 13), then the gather facts task wont run against clients though, you could run that first against clients.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's correct, i'll update this commit.
thanks @andymcc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of removing clients
from the hosts
line for this play. Perhaps we should make this fact delegation it's own play entirely, not add clients
there but then keep them here so that ceph-defaults
and ceph-docker-common
can be run against them?
I think that would take care of the second concern @andymcc had.
041c123
to
89f543c
Compare
89f543c
to
d5214c3
Compare
I think this is getting closer but I have a couple questions/concerns:
This does certainly avoid the issue of delegating facts from clients to all other nodes in the cluster though. |
4eaf16f
to
72372c6
Compare
This commit is a workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1550977 We iterate over all nodes on each node and we delegate the facts gathering. This is high memory consuming when having a large number of nodes in the inventory. That way of gathering is not necessary for clients node so we can simply gather local facts for these nodes. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
72372c6
to
339bab9
Compare
jenkins test luminous-ansible2.4-purge_bluestore_osds_container |
1 similar comment
jenkins test luminous-ansible2.4-purge_bluestore_osds_container |
as discussed with you on IRC (btw, thanks for your help), this has been addressed by the last commit I've pushed.
yes, this concern is still present and yes, I'm not sure we can find a fix quickly and without bringing a huge change. |
jenkins test luminous-ansible2.4-purge_bluestore_osds_container |
Preliminary testing shows that this patch plus moving from ansible 2.4.2 to 2.4.3 seems to reduce the memory consumed by ceph-ansible. There have only been 3 test runs (2.4.2, 2.4.3 and 2.4.3 + this patch) so we should probably do more runs before we conclude it reduces memory by x%. |
This commit is a workaround for
https://bugzilla.redhat.com/show_bug.cgi?id=1550977
We iterate over all nodes on each node and we delegate the facts gathering.
This is high memory consuming when having a large number of nodes in the
inventory.
That way of gathering is not necessary for clients node so we can simply
gather local facts for these nodes.
Signed-off-by: Guillaume Abrioux gabrioux@redhat.com