]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
ceph-defaults: fix handlers that are always triggered 2070/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 13 Oct 2017 13:16:18 +0000 (15:16 +0200)
committerSébastien Han <seb@redhat.com>
Tue, 17 Oct 2017 15:10:36 +0000 (17:10 +0200)
commit9d1cc160b0cdcbea458317de44cd992d506de258
treebab3535056a456aba626f5410cca13b7234db081
parent11245fb57fe0f75388b866bc3d4b5dee801fa974
ceph-defaults: fix handlers that are always triggered

Handlers are always triggered in ceph-ansible because ceph.conf file is
generated with a randomly order for the different keys/values pairs
in sections.

In python, a dict is not sorted. It means in our case each time we try
to generate the ceph.conf file it will be rendered with a random order
since the mecanism behind consist of rendering a file from a python dict
with keys/values. Therefore, as a quick workaround, forcing this dict to be
sorted before rendering the configuration file will ensure that it will be
rendered always the same way.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ec042219e64a321fa67fce0384af76eeb238c645)
Signed-off-by: Sébastien Han <seb@redhat.com>
plugins/actions/_v1_config_template.py
plugins/actions/_v2_config_template.py