在prechecks阶段报错
1.rabbit报错
报错信息
TASK [rabbitmq : Check if each rabbit hostname resolves uniquely to the proper IP address] ******************************************************************************************************************
failed: [localhost] (item=[{'cmd': ['getent', 'ahostsv4', 'localhost'], 'stdout': '127.0.0.1 STREAM localhost\n127.0.0.1 DGRAM \n127.0.0.1 RAW \n192.168.130.203 STREAM \n192.168.130.203 DGRAM \n192.168.130.203 RAW ', 'stderr': '', 'rc': 0, 'start': '2020-12-07 02:24:32.350705', 'end': '2020-12-07 02:24:32.355117', 'delta': '0:00:00.004412', 'changed': False, 'invocation': {'module_args': {'_raw_params': 'getent ahostsv4 localhost', 'warn': True, '_uses_shell': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stderr_lines': [], 'failed': False, 'item': 'localhost', 'ansible_loop_var': 'item'}, '127.0.0.1 STREAM localhost']) => {"ansible_loop_var": "item", "changed": false, "item": [{"ansible_loop_var": "item", "changed": false, "cmd": ["getent", "ahostsv4", "localhost"], "delta": "0:00:00.004412", "end": "2020-12-07 02:24:32.355117", "failed": false, "invocation": {"module_args": {"_raw_params": "getent ahostsv4 localhost", "_uses_shell": false, "argv": null, "chdir": null, "creates": null, "executable": null, "removes": null, "stdin": null, "stdin_add_newline": true, "strip_empty_ends": true, "warn": true}}, "item": "localhost", "rc": 0, "start": "2020-12-07 02:24:32.350705", "stderr": "", "stderr_lines": [], "stdout": "127.0.0.1 STREAM localhost\n127.0.0.1 DGRAM \n127.0.0.1 RAW \n192.168.130.203 STREAM \n192.168.130.203 DGRAM \n192.168.130.203 RAW "}, "127.0.0.1 STREAM localhost"], "msg": "Hostname has to resolve uniquely to the IP address of api_interface"}
原因和解决方法:
hosts文件被ansible添加了‘192.168.130.203 localhost’的hostname,将‘127.0.0.1 localhost’注释掉即可
2.cinder节点报错
报错信息:
TASK [cinder : Checking LVM volume group exists for Cinder] *************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["vgs", "cinder-volumes"], "delta": "0:00:00.045743", "end": "2020-12-07 02:27:49.501416", "failed_when_result": true, "msg": "non-zero return code", "rc": 5, "start": "2020-12-07 02:27:49.455673", "stderr": " Volume group \"cinder-volumes\" not found.\n Cannot process volume group cinder-volumes", "stderr_lines": [" Volume group \"cinder-volumes\" not found.", " Cannot process volume group cinder-volumes"], "stdout": "", "stdout_lines": []}
原因和解决方法:
未创建cinder-volumes的vg信息
pvcreate /dev/sdb
vgcreate cinder-volumes /dev/sdb