tsuna-server / build-server-ansible

1 stars 0 forks source link

interface_driver in l3_agent.ini should be specified for OVN Neutron driver #60

Closed TsutomuNakamura closed 2 years ago

TsutomuNakamura commented 2 years ago

Interface driver should be specified in l3_agent.ini like below.

Neutron will output errors if interface_driver was not specified when we use OVN Neutron driver.

TsutomuNakamura commented 2 years ago

Compute nodes are recovered but a controller node is still hanging up.

Commands below is an memo to test.

Test Case1

Run the command below.

docker run --rm \
    --add-host dev-controller01:<IP> \
    --add-host dev-compute01:<IP> \
    --add-host dev-compute02:<IP> \
    --volume ${PWD}:/opt/ansible \
    --volume <src_private_key>:<dst_private_key> \
    -ti tsutomu/ansible-runner \
    --user <user> -i production -l dev-controller01:dev-compute01:dev-compute02

Check whether controller node is up or not.
-> The controller was NOT hanging up.

Check which instructions will cause hung up controller. Continue testing...

(Run the command ...)

The controller was NOT hanging up so far.

(Run the command ...)

The controller was NOT hanging up so far.

controllers_create_example_instances.yml will make a controller node hanging up.

TsutomuNakamura commented 2 years ago

Cause of the issue might be in a role test_env.

Test01

Pre-bridge-configuration for OVN

- name: Block create test env on controller node

block:

... comment out

when: "'controllers' in group_names"


Run Ansible.

docker run --rm \ --add-host dev-controller01: \ --add-host dev-compute01: \ --add-host dev-compute02: \ --volume ${PWD}:/opt/ansible \ --volume : \ -ti tsutomu/ansible-runner \ --user -i production -l dev-controller01:dev-compute01:dev-compute02


It did not cause any issues.

## Test 02
Changed roles/test_env/tasks/main.yml only from the above.

......

......

when: "'controllers' in group_names"


It makes controller hanging up.

## Test 03

* roles/test_env/tasks/main.yml

......

when: "'controllers' in group_names"


It did NOT make controller hanging up.

## Test 04

.......

......

when: "'controllers' in group_names"



It Makes controller hanging up.
There is a cause in `roles/test_env/tasks/create_example_router/do_create_router.yml`.
TsutomuNakamura commented 2 years ago

Test 05

It makes hanging up.

- name: Block of creating router
  block:
    - name: Create a router
      ansible.builtin.command:
        argv: ["openstack", "router", "create", "{{ router.name }}"]
      register: result

    - name: Print the result of creating router
      ansible.builtin.debug:
        msg: "{{ result.stdout.split('\n') }}"

    # ......
  when: result_of_checking_router.rc == 0

It did NOT make hanging up.

- name: Block of creating router
  block:
    - name: Create a router
      ansible.builtin.command:
        argv: ["openstack", "router", "create", "{{ router.name }}"]
      register: result

    - name: Print the result of creating router
      ansible.builtin.debug:
        msg: "{{ result.stdout.split('\n') }}"

    - name: Set a gateway to the router
      ansible.builtin.command:
        argv: ["openstack", "router", "set", "--external-gateway", "{{ router.external_gateway }}", "{{ router.name }}"]
      register: result

    # ......
  when: result_of_checking_router.rc == 0

It makes hanging up.

openstack router set --external-gateway ...

Makes hanging up.

TsutomuNakamura commented 2 years ago

Restarting controller node after ...

    - name: Set a gateway to the router
      ansible.builtin.command:
        argv: ["openstack", "router", "set", "--external-gateway", "{{ router.external_gateway }}", "{{ router.name }}"]
      register: result

will solve hanging up.