From 543d1e2e41c00bccf611c7e240ba0d8f4eda5d95 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 17 Apr 2019 08:47:25 +0200 Subject: [PATCH] update: set osd flags before upgrading any mon Typical error: ``` failed: [mon0 -> mon2] (item=noout) => changed=true cmd: - ceph - --cluster - ceph - osd - set - noout delta: '0:00:00.293756' end: '2019-04-17 06:31:57.552386' item: noout msg: non-zero return code rc: 1 start: '2019-04-17 06:31:57.258630' stderr: |- Traceback (most recent call last): File "/bin/ceph", line 1222, in retval = main() File "/bin/ceph", line 1146, in main sigdict = parse_json_funcsigs(outbuf.decode('utf-8'), 'cli') File "/usr/lib/python2.7/site-packages/ceph_argparse.py", line 788, in parse_json_funcsigs cmd['sig'] = parse_funcsig(cmd['sig']) File "/usr/lib/python2.7/site-packages/ceph_argparse.py", line 728, in parse_funcsig raise JsonFormat(s) ceph_argparse.JsonFormat: unknown type CephBool stderr_lines: - 'Traceback (most recent call last):' - ' File "/bin/ceph", line 1222, in ' - ' retval = main()' - ' File "/bin/ceph", line 1146, in main' - ' sigdict = parse_json_funcsigs(outbuf.decode(''utf-8''), ''cli'')' - ' File "/usr/lib/python2.7/site-packages/ceph_argparse.py", line 788, in parse_json_funcsigs' - ' cmd[''sig''] = parse_funcsig(cmd[''sig''])' - ' File "/usr/lib/python2.7/site-packages/ceph_argparse.py", line 728, in parse_funcsig' - ' raise JsonFormat(s)' - 'ceph_argparse.JsonFormat: unknown type CephBool' stdout: '' stdout_lines: ``` Having mixed versions of monitors seems to cause this error. Moving these tasks before any monitor gets upgraded seems to be enough to get around this issue. Signed-off-by: Guillaume Abrioux --- infrastructure-playbooks/rolling_update.yml | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 093e33c92..efb873436 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -175,19 +175,6 @@ - inventory_hostname in groups[mgr_group_name] | default([]) or groups[mgr_group_name] | default([]) | length == 0 - - import_role: - name: ceph-handler - - import_role: - name: ceph-common - when: not containerized_deployment - - import_role: - name: ceph-container-common - when: containerized_deployment - - import_role: - name: ceph-config - - import_role: - name: ceph-mon - - name: set osd flags command: ceph --cluster {{ cluster }} osd set {{ item }} with_items: @@ -209,6 +196,19 @@ - inventory_hostname == groups[mon_group_name][0] - containerized_deployment + - import_role: + name: ceph-handler + - import_role: + name: ceph-common + when: not containerized_deployment + - import_role: + name: ceph-container-common + when: containerized_deployment + - import_role: + name: ceph-config + - import_role: + name: ceph-mon + - name: start ceph mon systemd: name: ceph-mon@{{ monitor_name }} -- 2.39.5