Skip to content
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

Closed
wants to merge 0 commits into from
Closed

Refact ceph-ansible #1710

wants to merge 0 commits into from

Conversation

guits
Copy link
Collaborator

@guits guits commented Jul 25, 2017

WIP

Fixes: #1681, #1698
Signed-off-by: Guillaume Abrioux gabrioux@redhat.com

@guits guits force-pushed the refact branch 2 times, most recently from 31d7416 to 82211e2 Compare July 25, 2017 15:56
Copy link
Contributor

@andrewschoen andrewschoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple questions:

  1. Could we move only the config in ceph-common and ceph-docker-common into the new ceph-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.

  2. Why do we need both ceph-config and ceph-defaults? Is ceph-config doing anything besides creating the dependency on ceph-defaults?

@@ -1,18 +0,0 @@
---
Copy link
Contributor

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.

Copy link
Collaborator Author

@guits guits Jul 25, 2017

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.

Copy link
Contributor

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.

@guits
Copy link
Collaborator Author

guits commented Jul 26, 2017

@leseb @andrewschoen I removed the symlinks

@guits
Copy link
Collaborator Author

guits commented Jul 27, 2017

jenkins test jewel-ansible2.2-update_cluster

@guits guits force-pushed the refact branch 2 times, most recently from 2337e24 to 2d7bc38 Compare July 27, 2017 14:08

- hosts: mgrs
become: True
roles:
- ceph-defaults
Copy link
Contributor

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"

# this is only here for usage with the rolling_update.yml playbook
# do not ever change this here
rolling_update: false
no_dep: false
Copy link
Contributor

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?

@guits guits force-pushed the refact branch 2 times, most recently from 413ebae to 214b5ff Compare July 27, 2017 17:46
@@ -91,6 +91,7 @@
- not containerized_deployment

roles:
- ceph-defaults
Copy link
Contributor

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.

@guits guits force-pushed the refact branch 2 times, most recently from 195de18 to ae3a688 Compare July 28, 2017 08:15
@guits guits changed the title DNM: Refact ceph-ansible Refact ceph-ansible Jul 28, 2017
@guits guits force-pushed the refact branch 7 times, most recently from 6887e8a to 815d054 Compare July 28, 2017 15:45
@guits guits closed this Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants