vagrant-openstack icon indicating copy to clipboard operation
vagrant-openstack copied to clipboard

ansible playbook fail

Open midu16 opened this issue 4 years ago • 9 comments

Hello,

I am facing the following issue on a Fedora 34:

TASK [runplaybooks : Run Setup Hosts Playbook] *********************************
fatal: [controller-01]: FAILED! => {"changed": true, "cmd": "openstack-ansible --forks 2 setup-hosts.yml > /vagrant/logs/setup-hosts.log", "delta": "0:01:07.373003", "end": "2021-07-06 12:16:44.966819", "msg": "non-zero return code", "rc": 2, "start": "2021-07-06 12:15:37.593816", "stderr": " [WARNING]: Unable to parse /etc/openstack_deploy/inventory.ini as an inventory\nsource\n [WARNING]: Invalid request to find a file that matches a \"null\" value\n [WARNING]: Consider using 'become', 'become_method', and 'become_user' rather\nthan running machinectl", "stderr_lines": [" [WARNING]: Unable to parse /etc/openstack_deploy/inventory.ini as an inventory", "source", " [WARNING]: Invalid request to find a file that matches a \"null\" value", " [WARNING]: Consider using 'become', 'become_method', and 'become_user' rather", "than running machinectl"], "stdout": "", "stdout_lines": []}

TASK [runplaybooks : Running openstack-ansible setup-hosts.yml] ****************
fatal: [controller-01]: FAILED! => {"changed": true, "cmd": "openstack-ansible --forks 1 setup-hosts.yml -v > /vagrant/logs/setup-hosts-fallback.log", "delta": "0:00:46.030336", "end": "2021-07-06 12:17:31.150826", "msg": "non-zero return code", "rc": 2, "start": "2021-07-06 12:16:45.120490", "stderr": " [WARNING]: Unable to parse /etc/openstack_deploy/inventory.ini as an inventory\nsource\n [WARNING]: Invalid request to find a file that matches a \"null\" value\n [WARNING]: Consider using 'become', 'become_method', and 'become_user' rather\nthan running machinectl", "stderr_lines": [" [WARNING]: Unable to parse /etc/openstack_deploy/inventory.ini as an inventory", "source", " [WARNING]: Invalid request to find a file that matches a \"null\" value", " [WARNING]: Consider using 'become', 'become_method', and 'become_user' rather", "than running machinectl"], "stdout": "", "stdout_lines": []}

THank you, M

midu16 avatar Jul 06 '21 14:07 midu16

I have the same error.

logs/setup-hosts.log shows that openstack-ansible failes at the command aria2c [...] http://cdimage.ubuntu.com/ubuntu-base/releases/18.04/release/ubuntu-base-18.04.1-base-amd64.tar.gz which is configured to log to /var/log/aria2c-image-prestage.log in the controller-01. There you can see that downloading the ubuntu-image 404s, probably, because it's so old:

vagrant@controller-01:~$ cat /var/log/aria2c-image-prestage.log

12/09 08:28:55 [NOTICE] Downloading 1 item(s)

12/09 08:28:55 [ERROR] CUID#7 - Download aborted. URI=http://cdimage.ubuntu.com/ubuntu-base/releases/18.04/release/ubuntu-base-18.04.1-base-amd64.tar.gz
Exception: [AbstractCommand.cc:351] errorCode=3 URI=http://cdimage.ubuntu.com/ubuntu-base/releases/18.04/release/ubuntu-base-18.04.1-base-amd64.tar.gz
  -> [HttpSkipResponseCommand.cc:219] errorCode=3 Resource not found

The available version is 18.04.05: http://cdimage.ubuntu.com/ubuntu-base/releases/18.04/release/

This is caused by checking out an older version 19.0.0 from https://github.com/openstack/openstack-ansible/tags , defined in config.yml

toelke avatar Dec 09 '21 08:12 toelke

Dear @toelke,

Have you changed the URL from https://github.com/midu16/vagrant-openstack/blob/024c5bf687b7a004ca245fb3634b77ef2943d02c/full-stack.yml from the default value http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.img to http://cdimage.ubuntu.com/ubuntu-base/releases/18.04/release/ubuntu-base-18.04.1-base-amd64.tar.gz ?

I am asking, because I cannot find the command you are outputting out into the Ansible code.

Thank you, @midu16

midu16 avatar Dec 09 '21 17:12 midu16

No, I only changed config.yml; the provisioning runs to completion, but then the resulting openstack-client can't run any openstack commands, probably because of a python2/3 issue. I am retrying today using ubuntu-20.4 as box.

toelke avatar Dec 10 '21 08:12 toelke

@toelke Hello, whet version did you use ? because it didn't work for me as well ? Thanks

badrouarafana avatar Feb 22 '25 01:02 badrouarafana

I gave up on openstack and built on kubevirt.

toelke avatar Feb 22 '25 07:02 toelke

You said, you changed some value and it worked until the end, could you tell me what was it ?

Sefyupowa avatar Feb 22 '25 11:02 Sefyupowa

Just a note on this. This repo that supported the book that was published a few years ago, and for the release of OpenStack at the time, has been unmaintained since 2021.

uksysadmin avatar Feb 22 '25 11:02 uksysadmin

You said, you changed some value and it worked until the end, could you tell me what was it ?

I mean this was years ago, but from my message above, I guess I changed this line to a newer tag from this.

toelke avatar Feb 22 '25 19:02 toelke

@toelke , i did it as well to a newer tag, but it didn't work, i switch to devstack anyway i wanted to follow the book's architecture guess i'm a bit late ^^

Thanks any way

badrouarafana avatar Feb 22 '25 19:02 badrouarafana