Browse Source

Merge "ovn-migration: Remove docker references" into stable/ussuri

changes/93/743693/1
Zuul 6 days ago
committed by Gerrit Code Review
parent
commit
66bcfcf692
6 changed files with 27 additions and 32 deletions
  1. +5
    -5
      tools/ovn_migration/infrared/tripleo-ovn-migration/main.yml
  2. +11
    -11
      tools/ovn_migration/infrared/tripleo-ovn-migration/roles/prepare-migration/tasks/main.yml
  3. +2
    -7
      tools/ovn_migration/tripleo_environment/playbooks/reduce-dhcp-renewal-time.yml
  4. +6
    -6
      tools/ovn_migration/tripleo_environment/playbooks/roles/migration/tasks/sync-dbs.yml
  5. +2
    -2
      tools/ovn_migration/tripleo_environment/playbooks/roles/migration/templates/activate-ovn.sh.j2
  6. +1
    -1
      tools/ovn_migration/tripleo_environment/playbooks/roles/migration/templates/clone-br-int.sh.j2

+ 5
- 5
tools/ovn_migration/infrared/tripleo-ovn-migration/main.yml View File

@@ -35,15 +35,15 @@
state: directory
path: "{{ ovn_migration_working_dir }}"

- name: Set the docker registry information
- name: Set the image registry information
block:
- name: Get the docker registry info (infrared deployment)
- name: Get the image registry info (infrared deployment)
block:
- name: Set is_infrard deployment
set_fact:
is_infrared: True

- name: Save the docker reg
- name: Save the image reg
set_fact:
container_image_prepare:
namespace: "{{ install.get('registry', {}).namespace|default(False)|ternary(install.get('registry', {}).namespace, install.get('registry', {}).mirror + '/' + 'rhosp' + install.version) }}"
@@ -54,13 +54,13 @@
when:
- install is defined

- name: Get the docker registry info (tripleo deployment)
- name: Get the image registry info (tripleo deployment)
block:
- name: Set is_infrard deployment
set_fact:
is_infrared: False

- name: Save the docker reg
- name: Save the image reg
set_fact:
container_image_prepare:
namespace: "{{ registry_namespace }}"


+ 11
- 11
tools/ovn_migration/infrared/tripleo-ovn-migration/roles/prepare-migration/tasks/main.yml View File

@@ -31,9 +31,9 @@
set_fact:
overcloud_deploy_ovn_script: '~/overcloud-deploy-ovn.sh'

- name: Set docker images environment file
- name: Set container images environment file
set_fact:
output_env_file: /home/stack/docker-images-ovn.yaml
output_env_file: /home/stack/container-images-ovn.yaml

- name: Get the proper neutron-ovn-ha.yaml path
stat:
@@ -79,7 +79,7 @@

- name: Set image tag from puddle version
set_fact:
docker_image_tag: "{{ core_puddle_version.stdout }}"
container_image_tag: "{{ core_puddle_version.stdout }}"

- name: Get registry namespace
shell: cat containers-prepare-parameter.yaml | grep -v _namespace | grep namespace | awk '{print $2}'
@@ -94,7 +94,7 @@
msg: "{{ core_puddle_version.stdout }}"

- debug:
msg: "{{ docker_image_tag }}"
msg: "{{ container_image_tag }}"

- debug:
msg: "{{ reg_namespace }}"
@@ -102,7 +102,7 @@

- name: Set image tag (tripleo deployment)
set_fact:
docker_image_tag: "{{ image_tag }}"
container_image_tag: "{{ image_tag }}"
when:
- not infrared_deployment|bool

@@ -116,16 +116,16 @@
- name: Add ovn container images to ovn_container_images.yaml
lineinfile:
dest: ~/ovn_container_images.yaml
line: "- imagename: {{ reg_namespace }}/{{ image_prefix }}-{{ item }}:{{ docker_image_tag }}"
line: "- imagename: {{ reg_namespace }}/{{ image_prefix }}-{{ item }}:{{ container_image_tag }}"
with_items:
- "ovn-northd"
- "ovn-controller"
- "neutron-server-ovn"
- "neutron-metadata-agent-ovn"

- name: Generate docker images environment file
- name: Generate container images environment file
shell: |
echo "parameter_defaults:" > ~/docker-images-ovn.yaml
echo "parameter_defaults:" > ~/container-images-ovn.yaml
changed_when: False

- name: Set the local namespace
@@ -160,10 +160,10 @@
when:
- local_namespace != ''

- name: Add ovn container images to docker images environment file
- name: Add ovn container images to container images environment file
lineinfile:
dest: ~/docker-images-ovn.yaml
line: " {{ item.name }}: {{ local_registry }}/{{ image_prefix }}-{{ item.image_name }}:{{ docker_image_tag }}"
dest: ~/container-images-ovn.yaml
line: " {{ item.name }}: {{ local_registry }}/{{ image_prefix }}-{{ item.image_name }}:{{ container_image_tag }}"
with_items:
- { name: ContainerNeutronApiImage, image_name: neutron-server-ovn}
- { name: ContainerNeutronConfigImage, image_name: neutron-server-ovn}


+ 2
- 7
tools/ovn_migration/tripleo_environment/playbooks/reduce-dhcp-renewal-time.yml View File

@@ -13,12 +13,7 @@
ignore_errors: yes

- block:
- name: Get the neutron dhcp agent docker id
shell:
docker ps | grep neutron_dhcp | awk '{print $1}'
register: dhcp_agent_docker_id
ignore_errors: yes

- name: Restart neutron dhcp agent
command: docker restart {{ dhcp_agent_docker_id.stdout }}
shell:
podman restart $(podman ps --filter "name=neutron_dhcp" --format {% raw %}"{{.ID}}"{% endraw %})
ignore_errors: yes

+ 6
- 6
tools/ovn_migration/tripleo_environment/playbooks/roles/migration/tasks/sync-dbs.yml View File

@@ -1,20 +1,20 @@
---
- name: Get the neutron docker ID
- name: Get the neutron container ID
shell:
docker ps | grep neutron-server-ovn | awk '{print $1}'
register: neutron_docker_id
podman ps --filter "name=neutron-server-ovn" --format {% raw %}"{{.ID}}"{% endraw %}
register: neutron_id

- name: Sync neutron db with OVN db (container) - Run 1
command: docker exec "{{ neutron_docker_id.stdout }}"
command: podman exec "{{ neutron_id.stdout }}"
neutron-ovn-db-sync-util --config-file /etc/neutron/neutron.conf
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini
--ovn-neutron_sync_mode repair

- name: Sync neutron db with OVN db (container) - Run 2
command: docker exec "{{ neutron_docker_id.stdout }}"
command: podman exec "{{ neutron_id.stdout }}"
neutron-ovn-db-sync-util --config-file /etc/neutron/neutron.conf
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini
--ovn-neutron_sync_mode repair

- name: Pause and let ovn-controllers settle before doing the final activation (5 minute)
pause: minutes=5
pause: minutes=5

+ 2
- 2
tools/ovn_migration/tripleo_environment/playbooks/roles/migration/templates/activate-ovn.sh.j2 View File

@@ -2,7 +2,7 @@

set -x

docker stop ovn_controller
podman stop ovn_controller

# restore bridge mappings
ovn_orig_bm=$(ovs-vsctl get open . external_ids:ovn-bridge-mappings-back)
@@ -28,7 +28,7 @@ ovs-vsctl del-controller {{ ovn_bridge }}
# Activate ovn-controller by configuring integration bridge
ovs-vsctl set open . external_ids:ovn-bridge={{ ovn_bridge }}

docker start ovn_controller
podman start ovn_controller

# Delete ovs bridges - br-tun and br-migration
ovs-vsctl --if-exists del-br {{ tunnel_bridge }}


+ 1
- 1
tools/ovn_migration/tripleo_environment/playbooks/roles/migration/templates/clone-br-int.sh.j2 View File

@@ -73,5 +73,5 @@ function copy_interfaces_to_br_migration() {
}

recreate_bridge_mappings
docker restart ovn_controller
podman restart ovn_controller
copy_interfaces_to_br_migration

Loading…
Cancel
Save