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
|
||||
# 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
|
||||
|
||||
# L3HA configuration options
|
||||
|
@ -13,45 +13,40 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# This should be revised in Kilo
|
||||
# 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
|
||||
- name: Implement the legacy neutron L3HA tool scripts
|
||||
when:
|
||||
- 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
|
||||
name2int:
|
||||
name: "{{ inventory_hostname }}"
|
||||
register: hashed_name
|
||||
when:
|
||||
- neutron_legacy_ha_tool_enabled | bool
|
||||
- name: Convert the hostname to an int
|
||||
name2int:
|
||||
name: "{{ inventory_hostname }}"
|
||||
register: hashed_name
|
||||
|
||||
# These are used in the Neutron HA Cron job script, and processed in the template.
|
||||
- name: Creating Job Facts
|
||||
set_fact:
|
||||
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 }}"
|
||||
when:
|
||||
- neutron_legacy_ha_tool_enabled | bool
|
||||
# These are used in the Neutron HA Cron job script, and processed in the template.
|
||||
- name: Creating Job Facts
|
||||
set_fact:
|
||||
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 }}"
|
||||
|
||||
- name: "Drop Neutron HA job script"
|
||||
template:
|
||||
src: "neutron_ha_tool.sh.j2"
|
||||
dest: "/opt/neutron-ha-tool.sh"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0755"
|
||||
when:
|
||||
- neutron_legacy_ha_tool_enabled | bool
|
||||
- name: Implement openrc/clouds.yaml
|
||||
include_role:
|
||||
name: "openstack_openrc"
|
||||
|
||||
- name: Implement the Neutron HA job script
|
||||
template:
|
||||
src: "neutron_ha_tool.sh.j2"
|
||||
dest: "/opt/neutron-ha-tool.sh"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0755"
|
||||
|
||||
- name: Create Neutron HA
|
||||
cron:
|
||||
@ -65,7 +60,7 @@
|
||||
user: root
|
||||
cron_file: "neutron-ha-tool"
|
||||
|
||||
- name: "Remove AT&T neutron ha tool when disabled"
|
||||
- name: Remove AT&T neutron ha tool when disabled
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: "absent"
|
||||
|
Loading…
Reference in New Issue
Block a user