]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
mgr: fix enabling of mgr module on mimic
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 18 Jun 2018 15:26:21 +0000 (17:26 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 13 Jul 2018 07:40:10 +0000 (09:40 +0200)
commit5a9cec411f11b4705ef7e532ba956eb2d9f8a74f
tree6b262124342fa8eba522ecd5b09091a9408265b1
parent45e0b432a4d9a0a79c7c1e63d2da996be4c1b4cc
mgr: fix enabling of mgr module on mimic

The data structure has slightly changed on mimic.

Prior to mimic, it used to be:

```
{
    "enabled_modules": [
        "status"
    ],
    "disabled_modules": [
        "balancer",
        "dashboard",
        "influx",
        "localpool",
        "prometheus",
        "restful",
        "selftest",
        "zabbix"
    ]
}
```

From mimic it looks like this:

```
{
    "enabled_modules": [
        "status"
    ],
    "disabled_modules": [
        {
            "name": "balancer",
            "can_run": true,
            "error_string": ""
        },
        {
            "name": "dashboard",
            "can_run": true,
            "error_string": ""
        }
    ]
}
```

This means we can't simply check if `item` is in `item in
_ceph_mgr_modules.disabled_modules`

the idea here is to use filter `map(attribute='name')` to build a list
when deploying mimic.

Fixes: #2766
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3abc253fecc91f29c90e23ae95e1b83f8ffd3de6)
roles/ceph-mgr/tasks/main.yml