During Deployment

cc-ansible deploy issues (first round)

Prevent Zun's Known Error

During the deployment of Zun, Ansible complains at Copying over kubeconfig for k8s agent task.

TASK [zun : Copying over kubeconfig for k8s agent] 
fatal: [edge]: FAILED! => {"msg": "No file was found when using first_found. Use errors='ignore' to allow this task to be skipped if no files are found"}

In order to avoid that, you need to edit the Ansible task and add ignore_errors: yes to it.

cd /opt/chi-in-a-box
vim venv/src/kolla-ansible/ansible/roles/zun/tasks/config.yml

Then change

...
- name: Copying over kubeconfig for k8s agent
  vars:
    service_name: zun-compute-k8s
...

to

...
- name: Copying over kubeconfig for k8s agent
  ignore_errors: yes
  vars:
    service_name: zun-compute-k8s
...

MariaDB Access denied for root

Solution:

The main solution is to run from clean slate. Stop all docker containers and delete all docker volumes. However if it did'nt work there is an alternative solution but risky.

We use docker to enable root user access, instead of using Ansible mysql_user module. It could be done by replacing Creating shard root mysql user task in the file venv/src/kolla-ansible/ansible/roles/mariadb/tasks/register.yml with the following:

Zun Kubeconfig

During the zun deployment, Ansible complains when running Copying over kubeconfig for k8s agent.

In that case, edit the file venv/src/kolla-ansible/ansible/roles/zun/tasks/config.yml and add ignore_errors: yes to the task Copying over kubeconfig for k8s agent.

Keystone certificate

During keystone deployment:

The solution is to commenting out the following lines in the /opt/site-config/defaults.yml

Keystone register blazar

cc-ansible deploy errors (second round)

Before running the second round, make sure to run a ./cc-ansible --site /opt/site-config/ bootstrap-servers.

Then we get the following error again:

In order to fix this, we need to copy a kubeconfig file that is written to /etc/rancher/k3s/k3s.yaml by k3s. Add the following task to the file venv/src/kolla-ansible/ansible/roles/zun/tasks/config.yml right before 'Copying over kubeconfig for k8s agent'.

Then add the line below to 'Copying over kubeconfig for k8s agent'.with_first_found:

Check if zun_compute_k8s container is healthy.

Last updated