This patch removes Jinja2 delimiters from when clauses and fixes the
capitalization of task names to match the other tasks in the file.
Closes-Bug: 1735785
Change-Id: I16334a11c551026c593b1872a44ed68f786719a5
Utilize the "ringbuilder.devs_changed" option to ensure that the ring
needs a rebalance. This will prevent unnecessary rebalances that cause
failures due to "min_part_hours" not being passed even though no changes
were required.
Additionally, we can now return a correct Ansible repsonse when the ring
has changed/rebalanced - and return "OK" when it hasn't returned at all.
Change-Id: I1fb4b3544a50ab5f566b3846d616107a84ff29c9
The numerous tags within the role have been condensed
to two tags: swift-install and swift-config
These tags have been chosen as they are namespaced
and cover the two major functions of the role.
Change-Id: I96c04e5d2e43e68ad5af3cc5c6035130a5650af0
Signed-off-by: alextricity25 <miguel.cantu@rackspace.com>
* Unquoted veriable deprecations have been resolved.
[DEPRECATION WARNING]: Using bare variables is deprecated.
* Undefined variable references have been ressolved.
[DEPRECATION WARNING]: Skipping task due to undefined Error,
* An Ansible performance issue has been discovered and fixed.
When a task is "included", contains variables within the
"include", and loads other tasks with conditionals that
iterate (using a lookup plugin) Ansible will spinlock for
~30 seconds per item per task. To resolve this the iteration
using the lookup plugin was removed and the task broken out
into individual tasks.
Change-Id: I1ca59bc71b93324900a2e68b9d83d075d8e8ce32
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Expose the "pretend_min_part_hours_passed" option when accessing
swift-ring-builder.
This PR adds a variable "swift_pretend_min_part_hours_passed" which
defaults to False.
Change-Id: Ief94f011049b57f1ab0c2c48dfa81659d7ba13f7
We use duplicate tasks to handle a case where we specify
swift_managed_regions, we could handle this with an if statement
that will only add the '-r' flag when the variable is specified.
This PR removes the 2 duplicate tasks in both the build and
distribution_check tasks.
Change-Id: Icba70faf90c5e54499c67bac382a8bd507143ee8
The repo split out has meant that having multiple roles for swift has
become inconvenient. We can merge the os-swift-sync role back into
os-swift and utilise variables to ensure that the swift-install,
swift-setup and swift-sync playbooks work in the same way.
This will avoid code duplication and the requirement for duplicated
changes to happen to both repositories.
Change-Id: If01d8a3aa29fc7637aecb92e61929523af08103d
Add the swift-remote host group and environment file.
Add an os_swift_sync role which will sync the swift ring and ssh keys
for swift hosts (remote and not-remote). Which has the following:
* Moves the key and ring tasks out of os_swift role to os_swift_sync.
* This adds the use of the "-r" flag that was added to the
swift_rings.py and swift_rings_check.py.
* Adds a ring.builder vs contents file consistency check.
* Adjusts the rsync process to use the built-in synchronize module
* Ensure services have started post ring/ssh key sync.
Adds environment file and sample configuration file for swift-remote
hosts (conf.d).
Move appropriate default vars to the os_swift_sync role, and remove them
from the os_swift role.
Rename the "os-swift-install.yml" playbook to "os-swift-setup.yml" as
this handles only the setup, and add a playbook to for both
os-swift-sync.yml and an overarching playbook (os-swift-install.yml)
that will call both the os-swift-sync.yml and os-swift-setup.yml
playbooks. This means the funcitonality of "os-swift-install.yml"
remains unchanged.
Adjust the run-playbooks.sh so that it calls the new overarching swift
playbook.
Change-Id: Ie2d8041b4bc46f092a96882fe3ca430be92195ed
Partially-Implements: blueprint multi-region-swift
This prevents a situation where swift_hosts[0] changes as a host, or is
removed (meaning a new swift_hosts[0]) which would prevent the rings
from being built. Additionally it will act as a backup for the ring
build files.
To clarify the purpose of the rings directory, the directory was renamed
to "ring_build_files", clarifying that the active rings are in
/etc/swift/
Change-Id: Id878d219504db195353286b28d7c038e5e659263
Closes-Bug: #1444529
This change implements the blueprint to convert all roles and plays into
a more generic setup, following upstream ansible best practices.
Items Changed:
* All tasks have tags.
* All roles use namespaced variables.
* All redundant tasks within a given play and role have been removed.
* All of the repetitive plays have been removed in-favor of a more
simplistic approach. This change duplicates code within the roles but
ensures that the roles only ever run within their own scope.
* All roles have been built using an ansible galaxy syntax.
* The `*requirement.txt` files have been reformatted follow upstream
Openstack practices.
* Dynamically generated inventory is now more organized, this should assist
anyone who may want or need to dive into the JSON blob that is created.
In the inventory a properties field is used for items that customize containers
within the inventory.
* The environment map has been modified to support additional host groups to
enable the seperation of infrastructure pieces. While the old infra_hosts group
will still work this change allows for groups to be divided up into seperate
chunks; eg: deployment of a swift only stack.
* The LXC logic now exists within the plays.
* etc/openstack_deploy/user_variables.yml has all password/token
variables extracted into the separate file
etc/openstack_deploy/user_secrets.yml in order to allow seperate
security settings on that file.
Items Excised:
* All of the roles have had the LXC logic removed from within them which
should allow roles to be consumed outside of the `os-ansible-deployment`
reference architecture.
Note:
* the directory rpc_deployment still exists and is presently pointed at plays
containing a deprecation warning instructing the user to move to the standard
playbooks directory.
* While all of the rackspace specific components and variables have been removed
and or were refactored the repository still relies on an upstream mirror of
Openstack built python files and container images. This upstream mirror is hosted
at rackspace at "http://rpc-repo.rackspace.com" though this is
not locked to and or tied to rackspace specific installations. This repository
contains all of the needed code to create and/or clone your own mirror.
DocImpact
Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Closes-Bug: #1403676
Implements: blueprint galaxy-roles
Change-Id: I03df3328b7655f0cc9e43ba83b02623d038d214e