Merge "Update legacy neutron L3HA tool support"
This commit is contained in:
commit
a5fc4f3129
@ -379,7 +379,10 @@ neutron_local_ip: 127.0.0.1
|
|||||||
###
|
###
|
||||||
|
|
||||||
# Set this option to "true" to enable legacy neutron L3HA tool support
|
# Set this option to "true" to enable legacy neutron L3HA tool support
|
||||||
# TODO(cloudnull): Remove this in the Ocata cycle
|
# This tool is useful to ensure any non-HA neutron entities
|
||||||
|
# are re-scheduled if the agent managing them goes down.
|
||||||
|
# It is also useful if the built-in HA capabilities cannot
|
||||||
|
# be used in the environment for whatever reason.
|
||||||
neutron_legacy_ha_tool_enabled: false
|
neutron_legacy_ha_tool_enabled: false
|
||||||
|
|
||||||
# L3HA configuration options
|
# L3HA configuration options
|
||||||
|
@ -13,45 +13,40 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# This should be revised in Kilo
|
- name: Implement the legacy neutron L3HA tool scripts
|
||||||
# kilo_revision: true
|
|
||||||
|
|
||||||
- name: "Drop AT&T neutron ha tool"
|
|
||||||
template:
|
|
||||||
src: "neutron-ha-tool.py.j2"
|
|
||||||
dest: "/opt/neutron-ha-tool.py"
|
|
||||||
owner: "root"
|
|
||||||
group: "root"
|
|
||||||
mode: "0755"
|
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
when:
|
when:
|
||||||
- neutron_legacy_ha_tool_enabled | bool
|
- neutron_legacy_ha_tool_enabled | bool
|
||||||
|
block:
|
||||||
|
- name: Implement the neutron HA tool script
|
||||||
|
template:
|
||||||
|
src: "neutron-ha-tool.py.j2"
|
||||||
|
dest: "/opt/neutron-ha-tool.py"
|
||||||
|
owner: "root"
|
||||||
|
group: "root"
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
- name: Convert the hostname to an int
|
- name: Convert the hostname to an int
|
||||||
name2int:
|
name2int:
|
||||||
name: "{{ inventory_hostname }}"
|
name: "{{ inventory_hostname }}"
|
||||||
register: hashed_name
|
register: hashed_name
|
||||||
when:
|
|
||||||
- neutron_legacy_ha_tool_enabled | bool
|
|
||||||
|
|
||||||
# These are used in the Neutron HA Cron job script, and processed in the template.
|
# These are used in the Neutron HA Cron job script, and processed in the template.
|
||||||
- name: Creating Job Facts
|
- name: Creating Job Facts
|
||||||
set_fact:
|
set_fact:
|
||||||
do_job: ". /root/openrc && /opt/neutron-ha-tool.py {% if keystone_service_internaluri_insecure | bool %}--insecure {% endif %}--l3-agent-migrate"
|
do_job: ". /root/openrc && /opt/neutron-ha-tool.py {% if keystone_service_internaluri_insecure | bool %}--insecure {% endif %}--l3-agent-migrate"
|
||||||
sleep_time: "{{ hashed_name.int_value }}"
|
sleep_time: "{{ hashed_name.int_value }}"
|
||||||
when:
|
|
||||||
- neutron_legacy_ha_tool_enabled | bool
|
|
||||||
|
|
||||||
- name: "Drop Neutron HA job script"
|
- name: Implement openrc/clouds.yaml
|
||||||
template:
|
include_role:
|
||||||
src: "neutron_ha_tool.sh.j2"
|
name: "openstack_openrc"
|
||||||
dest: "/opt/neutron-ha-tool.sh"
|
|
||||||
owner: "root"
|
- name: Implement the Neutron HA job script
|
||||||
group: "root"
|
template:
|
||||||
mode: "0755"
|
src: "neutron_ha_tool.sh.j2"
|
||||||
when:
|
dest: "/opt/neutron-ha-tool.sh"
|
||||||
- neutron_legacy_ha_tool_enabled | bool
|
owner: "root"
|
||||||
|
group: "root"
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
- name: Create Neutron HA
|
- name: Create Neutron HA
|
||||||
cron:
|
cron:
|
||||||
@ -65,7 +60,7 @@
|
|||||||
user: root
|
user: root
|
||||||
cron_file: "neutron-ha-tool"
|
cron_file: "neutron-ha-tool"
|
||||||
|
|
||||||
- name: "Remove AT&T neutron ha tool when disabled"
|
- name: Remove AT&T neutron ha tool when disabled
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
Loading…
Reference in New Issue
Block a user