mirror of https://github.com/ceph/ceph-ansible.git
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 <module>
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 <module>'
- ' 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: <omitted>
```
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 <gabrioux@redhat.com>
(cherry picked from commit 543d1e2e41
)
pull/3892/head
parent
b4377f6163
commit
4a678ac102
|
@ -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 }}
|
||||
|
|
Loading…
Reference in New Issue