skip to Main Content

I’m trying to deploy OpenStack on a virtual machine running CentOS 8.3.2011 by following this link, but I got an error on the pre checks phase when running the command:

kolla-ansible -i ./all-in-one prechecks

The error message was:

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 localhostn127.0.0.1       DGRAM  n127.0.0.1       RAW    n127.0.0.1       STREAM n127.0.0.1       DGRAM  n127.0.0.1       RAW    n192.168.56.103  STREAM n192.168.56.103  DGRAM  n192.168.56.103  RAW    ', 'stderr': '', 'rc': 0, 'start': '2021-05-28 07:48:12.453408', 'end': '2021-05-28 07:48:12.455955', 'delta': '0:00:00.002547', '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.002547", "end": "2021-05-28 07:48:12.455955", "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": "2021-05-28 07:48:12.453408", "stderr": "", "stderr_lines": [], "stdout": "127.0.0.1       STREAM localhostn127.0.0.1       DGRAM  n127.0.0.1       RAW    n127.0.0.1       STREAM n127.0.0.1       DGRAM  n127.0.0.1       RAW    n192.168.56.103  STREAM n192.168.56.103  DGRAM  n192.168.56.103  RAW    "}, "127.0.0.1       STREAM localhost"], "msg": "Hostname has to resolve uniquely to the IP address of api_interface"}

How can I fix this?

2

Answers


  1. Edit the /etc/hosts file. Comment out the above two lines and make an entry against your ip to localhost

    [root@localhost ~]# cat /etc/hosts
    
    #127.0.0.1 localhost
    
    #::1       localhost localhost.localdomain localhost6 localhost6.localdomain6
    
    192.168.122.73  localhost
    
    [root@localhost ~]# 
    
    Login or Signup to reply.
  2. I have recently faced this issue in my control node where prechecks ended up showing failure status against my compute node. I went to look at its /etc/hosts file which has two entries for a single hostname (ubuntu in my case).

    # BEGIN ANSIBLE GENERATED HOSTS
    192.168.3.133 ubuntu
    192.168.3.137 ubuntu
    # END ANSIBLE GENERATED HOSTS
    

    I edited the file manually to contain only one entry (primary interface IP against username ubuntu).

    # BEGIN ANSIBLE GENERATED HOSTS
    192.168.3.133 ubuntu
    # END ANSIBLE GENERATED HOSTS
    

    It worked and prechecks phase was successful.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search