552bd0c353
This patch implements the Swift ring distribution and rebalance using an Ansible playbook, callable by a Mistral workflow. This has several benefits that are important for Swift clusters: - Rebalancing and ring deployment is possible without executing a full overcloud update. This is especially important when there is a longer rebalance in progress and/or multiple rebalances are required - Rebalancing can be scheduled using Mistral, for example to rebalance daily in a cron-like fashion - Avoids rebalances on every node, which is risky in case one or more nodes fail to rebalance and leave the cluster in an inconsistent state. - Rebalance only if it is safe, eg. a full replication run has finished after the last ring update The Ansible playbook can be executed either directly using ansible-playbook & tripleo-ansible-inventory, or by executing the Mistral workflow. Change-Id: I7bb1d7d4f45bee36df1c435a11bda5d4cdaae896
32 lines
893 B
YAML
32 lines
893 B
YAML
---
|
|
version: '2.0'
|
|
name: tripleo.swift_ring.v1
|
|
description: Rebalance and distribute Swift rings using Ansible
|
|
|
|
|
|
workflows:
|
|
rebalance:
|
|
tags:
|
|
- tripleo-common-managed
|
|
|
|
tasks:
|
|
get_private_key:
|
|
action: tripleo.validations.get_privkey
|
|
on-success: deploy_rings
|
|
|
|
deploy_rings:
|
|
action: tripleo.ansible-playbook
|
|
publish:
|
|
output: <% task().result %>
|
|
input:
|
|
ssh_private_key: <% task(get_private_key).result %>
|
|
ssh_common_args: '-o StrictHostKeyChecking=no'
|
|
ssh_extra_args: '-o UserKnownHostsFile=/dev/null'
|
|
verbosity: 1
|
|
remote_user: heat-admin
|
|
become: true
|
|
become_user: root
|
|
playbook: /usr/share/tripleo-common/playbooks/swift_ring_rebalance.yaml
|
|
inventory: /usr/bin/tripleo-ansible-inventory
|
|
use_openstack_credentials: true
|