OpenStackCookbook / vagrant-openstack

Vagrant OpenStack-Ansible Environment used by OpenStack Cloud Computing Cookbook 4th Edition
51 stars 32 forks source link

ansible playbook fail #46

Open midu16 opened 3 years ago

midu16 commented 3 years ago

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

toelke commented 2 years ago

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

midu16 commented 2 years ago

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

toelke commented 2 years ago

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.