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

profiles: introducing cluster profiles #1018

Merged
merged 4 commits into from
Jul 28, 2017
Merged

profiles: introducing cluster profiles #1018

merged 4 commits into from
Jul 28, 2017

Conversation

leseb
Copy link
Member

@leseb leseb commented Oct 7, 2016

This commit introduces a new directory called "profiles" which
contains some set of variables for a particular use case. These profiles
provide guidance for certain scenarios such as:

  • configuring rgw with keystone v3

Signed-off-by: Sébastien Han seb@redhat.com

Copy link
Contributor

@dang dang left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@leseb
Copy link
Member Author

leseb commented Oct 13, 2016

@cloudnull any idea why I'm getting the rgw section twice?

[client.rgw.ceph-rgw0]
keyring = /var/lib/ceph/radosgw/ceph-rgw.ceph-rgw0/keyring
rgw data = /var/lib/ceph/radosgw/ceph-rgw.ceph-rgw0
host = ceph-rgw0
rgw socket path = /tmp/radosgw-ceph-rgw0.sock
log file = /var/log/ceph/ceph-rgw-ceph-rgw0.log
rgw frontends = civetweb port=10.0.2.15:8080 num_threads=50

[client.rgw.ceph-rgw0]
rgw keystone token cache size = 10000
rgw keystone url = http://192.168.0.1:35357
rgw s3 auth use keystone = true
nss db path = /var/lib/ceph/radosgw/ceph-radosgw.ceph-rgw0/nss
rgw keystone accepted roles = Member, _member_, admin
rgw keystone admin token = password
rgw keystone revocation interval = 900

Could this be because of the {{ hostvars[inventory_hostname]['ansible_hostname'] }}?
Thanks!

@leseb leseb force-pushed the profile-examples branch 2 times, most recently from 239d5b5 to 76f21b9 Compare October 13, 2016 12:18
@cloudnull
Copy link
Contributor

Are these overrides combined and targetting the same file via some kind of a hash merge happening elsewhere? It looks like the overrides contain different values between the sections which would be something triggered by loading the two sections keys into the same override dictionary.

@leseb
Copy link
Member Author

leseb commented Oct 17, 2016

@cloudnull well I have my ceph.conf.j2 template that fills the default content of the section and then I filled group_vars/rgws with overrrides. This is the only thing that is happening here.

Am I missing something?

@OrFriedmann
Copy link
Contributor

OrFriedmann commented Oct 18, 2016

@leseb @cloudnull The problem is in the config_template module (v2 and v1) as in line 303 of v2 of the module, it is not recongnize the section of the rgw and it creates the new section.

I put q in the module :
0.8s return_config_overrides_ini: config.sections()=["client.rgw.{{ hostvars[inventory_hostname]['ansible_hostname'] }}", 'global', 'client.libvirt', 'client.rgw.ceph-osd0', 'osd']

@leseb
Copy link
Member Author

leseb commented Nov 2, 2016

Thanks @OrFriedmann for looking into this, do you guys think we can get an easy fix for this? @cloudnull

Thanks!

@OrFriedmann
Copy link
Contributor

I have an idea how to solve this, Please comment if you are agree with me
We can create all.j2 or rgw.j2 and use jinja to create the sections with the names of the rgws and voilà.

@leseb
Copy link
Member Author

leseb commented Nov 8, 2016

@OrFriedmann do you mind giving this a try and tell us if that works?
I'd love to merge this at some point :)
Thanks!

@cloudnull
Copy link
Contributor

cloudnull commented Nov 8, 2016

@leseb @OrFriedmann are we still seeing this with the updated module for 2.2 ?

@cloudnull
Copy link
Contributor

also, does the section "[client.rgw.ceph-rgw0]" already exist in the target file which config_template is attempting to append to?

@leseb
Copy link
Member Author

leseb commented Nov 9, 2016

@cloudnull the issue is still present with ansible 2.2. The section doesn't exist before it gets created. Running ansible twice doesn't merge both sections.

@OrFriedmann
Copy link
Contributor

@leseb @cloudnull The problem as I see it is that the add_section function in the config_template module compares the name of the variable client.rgw.{{ hostvars[inventory_hostname]['ansible_hostname'] }} with the name of the section client.rgw.ceph-osd0, when it should compare the value of the variable with the name of the section.
The solution should probably be something along the line of translating
client.rgw.{{ hostvars[inventory_hostname]['ansible_hostname'] }} to client.rgw.ceph-osd0 (for example)
before adding the new sections

@alfredodeza
Copy link
Contributor

jenkins test ansible2.2-xenial-cluster

@alfredodeza
Copy link
Contributor

jenkins test this please

@alimaredia
Copy link
Contributor

alimaredia commented Apr 24, 2017

@leseb I tried running this branch and found that there was an extra endif here (

) that caused ceph-ansible to error. Should I go ahead and fix that?

@leseb
Copy link
Member Author

leseb commented Apr 25, 2017

@alimaredia thanks for reporting this, I just pushed a new version.

guits added a commit that referenced this pull request Jun 16, 2017
See:
 - #1018 (comment)
 - #1018 (comment)

The workaround here is rendering `ceph_conf_overrides` before passing it
to `config_template` to be sure we won't have a section added twice in
ceph.conf

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
@guits guits force-pushed the profile-examples branch 2 times, most recently from 5fb1439 to ccfac64 Compare June 16, 2017 09:33
guits added a commit that referenced this pull request Jun 16, 2017
See:
 - #1018 (comment)
 - #1018 (comment)

The workaround here is rendering `ceph_conf_overrides` before passing it
to `config_template` to be sure we won't have a section added twice in
ceph.conf

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
@guits
Copy link
Collaborator

guits commented Jun 16, 2017

jenkins test kraken-ansible2.2-docker_dmcrypt_journal_collocation

1 similar comment
@guits
Copy link
Collaborator

guits commented Jun 16, 2017

jenkins test kraken-ansible2.2-docker_dmcrypt_journal_collocation

@guits
Copy link
Collaborator

guits commented Jun 16, 2017

jenkins test jewel-ansible2.2-update_docker_cluster

@guits
Copy link
Collaborator

guits commented Jun 22, 2017

jenkins test kraken-ansible2.2-update_docker_cluster

@guits
Copy link
Collaborator

guits commented Jun 22, 2017

jenkins test jewel-ansible2.2-update_docker_cluster

2 similar comments
@guits
Copy link
Collaborator

guits commented Jun 22, 2017

jenkins test jewel-ansible2.2-update_docker_cluster

@guits
Copy link
Collaborator

guits commented Jun 22, 2017

jenkins test jewel-ansible2.2-update_docker_cluster

@leseb
Copy link
Member Author

leseb commented Jun 22, 2017

jenkins test jewel-ansible2.2-update_docker_cluster

@guits
Copy link
Collaborator

guits commented Jun 23, 2017

jenkins test jewel-ansible2.2-update_docker_cluster

1 similar comment
@guits
Copy link
Collaborator

guits commented Jul 19, 2017

jenkins test jewel-ansible2.2-update_docker_cluster

leseb and others added 3 commits July 19, 2017 11:50
This commit introduces a new directory called "profiles" which
contains some set of variables for a particular use case. These profiles
provide guidance for certain scenarios such as:

* configuring rgw with keystone v3

Signed-off-by: Sébastien Han <seb@redhat.com>
See:
 - #1018 (comment)
 - #1018 (comment)

The workaround here is rendering `ceph_conf_overrides` before passing it
to `config_template` to be sure we won't have a section added twice in
ceph.conf

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Remove `rgw enable static website` and `rgw enable usage log` from
ceph.conf and make it usable with ceph_config_overrides as profiles.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
We don't want to have heterogeous ceph.conf anymore and believe that we
should have the right section for the running daemon.
If we don't do this and use profiles, e.g: rgw, we will get a new rgw
section on some of the nodes.

Signed-off-by: Sébastien Han <seb@redhat.com>
@ceph-jenkins
Copy link
Collaborator

OK - luminous-ansible2.2-journal_collocation

@leseb
Copy link
Member Author

leseb commented Jul 27, 2017

jenkins test jewel-ansible2.2-dmcrypt_journal_collocation

@leseb
Copy link
Member Author

leseb commented Jul 27, 2017

jenkins test jewel-ansible2.2-xenial_cluster

@leseb
Copy link
Member Author

leseb commented Jul 27, 2017

jenkins test luminous-ansible2.2-xenial_cluster

@leseb
Copy link
Member Author

leseb commented Jul 27, 2017

jenkins test luminous-ansible2.2-docker_cluster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants