-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Refact ceph-ansible #1710
Refact ceph-ansible #1710
Conversation
31d7416
to
82211e2
Compare
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.
A couple questions:
-
Could we move only the config in
ceph-common
andceph-docker-common
into the newceph-defaults
role? It gets to be quite a lot if we include config from the other roles as well. This would also still generate sample group_vars files for each role which I think is nice. -
Why do we need both
ceph-config
andceph-defaults
? Isceph-config
doing anything besides creating the dependency onceph-defaults
?
roles/ceph-client/defaults/main.yml
Outdated
@@ -1,18 +0,0 @@ | |||
--- |
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.
All these symlinks shouldn't be necessary. As long as ceph-defaults
is included in the same play as another role then that role should inherit all of the config in ceph-defaults/defaults/main.yml
.
These could be done by making ceph-defaults
a dependency for the other roles or just including it directly in a playbook like:
- hosts: all
roles:
- ceph-defaults
- ceph-common
- ceph-mon
In that example ceph-common
and ceph-mon
should have access to all configuration set in ceph-defaults
.
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.
Thanks for your comments @andrewschoen .
The idea is to have ceph-defaults
handling only defaults variables and ceph-config
for stuff like setting fsid
. Do you think merging these two roles would be better?
Don't you think it could be cool to keep the default behavior which is including ceph-common
or ceph-docker-common
from other roles but having the possibility to dismiss it as well (see here) so we can set dependencies in site.yml
as you described above?
Even if the CI seems to be happy, this PR is not finished at all, so, please let me know if you have any thoughts or suggestions.
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.
@guits yeah, I think it might make sense to combine ceph-config
and ceph-defaults
. I guess I just don't see the use case for ceph-defaults
on it's own. Seems like you'd always want to use ceph-config
so that fsid
is populated correctly.
I do like the behavior added with no_deps
. I still think that the configuration for all roles besides ceph-common
and ceph-docker-common
should stay with the respective role though. Anything that is common across roles or needed for ceph.conf generation should be included in ceph-config
or ceph-defaults
.
@leseb @andrewschoen I removed the symlinks |
a5554d4
to
7828b85
Compare
3afd39e
to
adfa2d5
Compare
jenkins test jewel-ansible2.2-update_cluster |
2337e24
to
2d7bc38
Compare
site-docker.yml.sample
Outdated
|
||
- hosts: mgrs | ||
become: True | ||
roles: | ||
- ceph-defaults |
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.
ceph-defaults
and ceph-docker-common
should only be used when: "ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel"
roles/ceph-common/defaults/main.yml
Outdated
# this is only here for usage with the rolling_update.yml playbook | ||
# do not ever change this here | ||
rolling_update: false | ||
no_dep: false |
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 don't think you're using no_dep
anymore are you?
413ebae
to
214b5ff
Compare
@@ -91,6 +91,7 @@ | |||
- not containerized_deployment | |||
|
|||
roles: | |||
- ceph-defaults |
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.
You're gonna need either ceph-common
or ceph-docker-common
here depending on the value of containerized_deployment
. Same for the rest of the plays in this playbook.
195de18
to
ae3a688
Compare
6887e8a
to
815d054
Compare
WIP
Fixes: #1681, #1698
Signed-off-by: Guillaume Abrioux gabrioux@redhat.com