Updated master for new dev work - Liberty-2
Update all branches to Liberty-2. Also, as of Change ID I3823900bc5aaf7757c37edb804027cf4d9c757ab the new neutron releases have a new db upgrade and stamp process in order for these version to be rev'd we need to incorporate those change. As such the neutron_db_setup.yml has been updated along with the neutron `neutron_db_revision` default variable. Change-Id: Icfb75d377498e288e67be1a8bc049b42d8aa57b1
This commit is contained in:
parent
ae11efc9ca
commit
37e42c4b64
@ -32,7 +32,7 @@ neutron_system_home_folder: "/var/lib/{{ neutron_system_user_name }}"
|
|||||||
neutron_galera_user: neutron
|
neutron_galera_user: neutron
|
||||||
neutron_galera_password: "{{ neutron_container_mysql_password }}"
|
neutron_galera_password: "{{ neutron_container_mysql_password }}"
|
||||||
neutron_galera_database: neutron
|
neutron_galera_database: neutron
|
||||||
neutron_db_revision: head
|
neutron_db_revision: heads
|
||||||
neutron_db_config: /etc/neutron/neutron.conf
|
neutron_db_config: /etc/neutron/neutron.conf
|
||||||
neutron_db_plugin: /etc/neutron/plugins/ml2/ml2_conf.ini
|
neutron_db_plugin: /etc/neutron/plugins/ml2/ml2_conf.ini
|
||||||
neutron_db_max_overflow: 20
|
neutron_db_max_overflow: 20
|
||||||
|
@ -39,6 +39,41 @@
|
|||||||
tags:
|
tags:
|
||||||
- neutron-db-setup
|
- neutron-db-setup
|
||||||
|
|
||||||
|
- name: Inspect on disk neutron DB revision
|
||||||
|
command: >
|
||||||
|
cat {{ neutron_system_home_folder }}/neutron-revision
|
||||||
|
failed_when: false
|
||||||
|
changed_when: neutron_revision_on_disk.rc != 0
|
||||||
|
register: neutron_revision_on_disk
|
||||||
|
tags:
|
||||||
|
- neutron-db-setup
|
||||||
|
- neutron-upgrade
|
||||||
|
- neutron-stamp
|
||||||
|
|
||||||
|
- name: Check last DB revision
|
||||||
|
shell: |
|
||||||
|
neutron-db-manage history | head -1 | tee {{ neutron_system_home_folder }}/neutron-revision
|
||||||
|
register: neutron_revision
|
||||||
|
sudo: yes
|
||||||
|
sudo_user: "{{ neutron_system_user_name }}"
|
||||||
|
delegate_to: "{{ item }}"
|
||||||
|
with_items: groups['neutron_all']
|
||||||
|
tags:
|
||||||
|
- neutron-db-setup
|
||||||
|
- neutron-upgrade
|
||||||
|
- neutron-stamp
|
||||||
|
|
||||||
|
- name: Stop neutron server
|
||||||
|
service:
|
||||||
|
name: "neutron-server"
|
||||||
|
state: stopped
|
||||||
|
pattern: "neutron-server"
|
||||||
|
ignore_errors: true
|
||||||
|
when: neutron_revision.results.0.stdout != neutron_revision_on_disk.stdout
|
||||||
|
tags:
|
||||||
|
- neutron-db-setup
|
||||||
|
- neutron-stamp
|
||||||
|
|
||||||
- name: Perform a Neutron DB Upgrade
|
- name: Perform a Neutron DB Upgrade
|
||||||
command: |
|
command: |
|
||||||
neutron-db-manage --config-file {{ neutron_db_config }}
|
neutron-db-manage --config-file {{ neutron_db_config }}
|
||||||
@ -46,21 +81,12 @@
|
|||||||
upgrade {{ neutron_db_revision }}
|
upgrade {{ neutron_db_revision }}
|
||||||
sudo: yes
|
sudo: yes
|
||||||
sudo_user: "{{ neutron_system_user_name }}"
|
sudo_user: "{{ neutron_system_user_name }}"
|
||||||
|
when: >
|
||||||
|
neutron_revision.results.0.stdout != neutron_revision_on_disk.stdout
|
||||||
|
notify: Restart neutron services
|
||||||
tags:
|
tags:
|
||||||
- neutron-db-setup
|
- neutron-db-setup
|
||||||
- neutron-upgrade
|
- neutron-upgrade
|
||||||
|
|
||||||
# This is using shell because we are grep-ing
|
|
||||||
- name: Check for DB revision
|
|
||||||
shell: |
|
|
||||||
neutron-db-manage history | grep -w 'Revision ID: {{ neutron_db_revision }}'
|
|
||||||
register: neutron_dbmanage
|
|
||||||
failed_when: false
|
|
||||||
changed_when: neutron_dbmanage.rc != 0
|
|
||||||
sudo: yes
|
|
||||||
sudo_user: "{{ neutron_system_user_name }}"
|
|
||||||
tags:
|
|
||||||
- neutron-db-setup
|
|
||||||
- neutron-stamp
|
- neutron-stamp
|
||||||
|
|
||||||
- name: Perform a Neutron DB Stamp
|
- name: Perform a Neutron DB Stamp
|
||||||
@ -68,9 +94,11 @@
|
|||||||
neutron-db-manage --config-file {{ neutron_db_config }}
|
neutron-db-manage --config-file {{ neutron_db_config }}
|
||||||
--config-file {{ neutron_db_plugin }}
|
--config-file {{ neutron_db_plugin }}
|
||||||
stamp {{ neutron_db_revision }}
|
stamp {{ neutron_db_revision }}
|
||||||
when: neutron_dbmanage.rc != 0
|
when: neutron_revision.results.0.stdout != neutron_revision_on_disk.stdout
|
||||||
sudo: yes
|
sudo: yes
|
||||||
sudo_user: "{{ neutron_system_user_name }}"
|
sudo_user: "{{ neutron_system_user_name }}"
|
||||||
|
notify: Restart neutron services
|
||||||
tags:
|
tags:
|
||||||
- neutron-db-setup
|
- neutron-db-setup
|
||||||
|
- neutron-upgrade
|
||||||
- neutron-stamp
|
- neutron-stamp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user