Commit Graph

20 Commits

Author SHA1 Message Date
OpenDev Sysadmins 2de1b05ca5 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:20 +00:00
Jesse Pretorius 0392bc7af2 Retire openstack-ansible-os_swift_sync repository
The content from the openstack-ansible-os_swift_sync repository has
been merged into the openstack-ansible-os_swift repository and is
therefore no longer needed.

This patch implements the retirement of the os_swift_sync
repository content as per [1].

[1] http://docs.openstack.org/infra/manual/drivers.html#retiring-a-project

Change-Id: If147d82709d55fe54d6658a889de1f3a19879d7b
2016-04-09 19:43:44 +01:00
Travis Truman b3ae25df23 pin version of ansible-lint we use for testing
Latest release of ansible-lint 2.4.0 has broken
role linter tasks by introducing a dependency on
openstack-ansible-plugins for all linting

While we may choose to adapt the linter tox env
in the future, for now we want to return to previous
linter behavior.

Change-Id: I4a08ef43405ffedea0a03793510eb1a05adf4d29
2016-03-15 11:39:53 -04:00
Jesse Pretorius b0a17d5543 Add curl to bindep requirements
Change-Id: I3787f76b1688075f49a9b4e1d64a2ce1bd22dcf8
2016-03-04 19:24:13 +00:00
Jenkins 6a2e408fb2 Merge "Fix typo in swift_rings_check.py.j2" 2016-03-03 20:02:17 +00:00
Andy McCrae 6e4f33247d Fix typo in swift_rings_check.py.j2
There are line spaces missing so the output appears wrong.

Change-Id: I503913fb1b5a00afae6915184d67bc9f0dabfe06
2016-03-03 15:38:06 +00:00
Jesse Pretorius 42f0885e95 Initial commit for bindep requirements
Change-Id: If6e5aee4d34a4d77b26b5b52fd3e250bc7dd86ff
2016-03-03 15:15:54 +00:00
Matt Thompson bd6085b729 Fix meta/main.yml spacing
The dependencies section is spaced incorrectly, resulting in the role
not being installable via ansible-galaxy.

Change-Id: I55fe54d076269b20013b71445bce5dc6a082d6b0
2016-03-03 10:41:34 +00:00
Jesse Pretorius 71d02dfb72 Add empty role dependency list
The ansible-galaxy tool requires the presence of the dependencies list
in the role's meta information.

Change-Id: I09dafc869de09f9270ed929fd0e1a5709ba120bb
2016-03-02 13:58:54 +00:00
Kevin Carter 7ee179a015
Implement base configuration for independent repository
Within the tox.ini under the [flake8] section the "max-line-length"
is being set because of the venv supported added to the #! at the top
of the python files which causes the tox linters check to fail. The
"max-line-length" has been set to 120.

Updates have been made to the swift sync python files so that they
pass lint checks.

Change-Id: Icab26bb57e2f5bd5d905080e583502aeeb423cf4
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-03-01 16:11:45 -06:00
Jimmy McCrory 185233a722 Resolve ansible-lint ANSIBLE0008
ansible-lint 2.3.7 added a rule checking for use of the deprecated
'sudo' and 'sudo_user' directives. They have been replaced with 'become'
and 'become_user' respectively.

Change-Id: I2271fe8468840884f19f41abba37e696c6296350
2016-02-11 07:40:09 -08:00
Jenkins 4a158a5d43 Merge "Cleanup syntax issues for Ansible 2 compatibility" 2016-02-05 17:38:06 +00:00
Jenkins 1b3c19b59c Merge "Use Swift venv Python interpreter" 2016-02-02 16:27:08 +00:00
Jimmy McCrory 0e2425621d Cleanup syntax issues for Ansible 2 compatibility
This patch fixes a few syntax issues required for Ansible 2
compatibility that Ansible 1.x was more lenient with.

When a 'when' clause is combined with a 'with_*' statement, the clause
is processed separately for each item. Tasks with 'when' clauses which
depended on an item variable being defined have either applied a default
empty value to the item or a new task individual task has been created
for each item in the loop.

Tasks within the os-cinder-install playboook have been updated to loop
through cinder_backends as a hash.

Change-Id: I9b53eb5dd709a6bed1797961015aa3dd328340f3
2016-01-29 10:53:49 -08:00
git-harry b02907fa81 Use Swift venv Python interpreter
The use of activate_this to access the venv libraries means that the
system site packages are also included when the scripts swift_rings.py
and swift_rings_check.py are run.

This commit updates the interpreter directive for those scripts, when
Swift is deployed in a venv, to use the venv's interpreter.

Change-Id: I3ff0bf60c9ca695cddc28b05a8e8cc67d5f240e5
Closes-bug: 1538993
2016-01-29 08:35:56 +00:00
Travis Truman 533a0a86cc Interpret the swift_managed_regions variable correctly in with_nested loops
Change-Id: Iccf4a912cf530edc95191e8d171ffb36e5085ee7
Closes-Bug: 1538738
Related-Bug: 1495748
2016-01-29 08:30:28 +00:00
Jesse Pretorius 64ecb59520 Use slurp to collect the swift ssh keys
Extracting the ssh public key using cat and storing the result in a
fact has resulted in periodic failures in the collection of the key,
and thereafter the failure to appropriately place that key into the
authorised_keys file.

This patch changes the collection method to use the Ansible slurp
module which has been found to be more reliable.

Closes-Bug: #1506291
Change-Id: I3ba5cdc944f38c67762860dc0d06bd5c35eeb269
2016-01-26 14:52:13 +00:00
Matthew Oliver ef7afab1e5 Fix os_swift_sync role's set_weight
The swift_rings.py file that updates the swift ring files are
failing to update the weight in a builder file. This is caused
by the weight passed into the swift-ring-builder CLI needing
to be a string.

This patch converts the weight to a string when passing it to
swift-ring-builder.

Closes-Bug: #1532204
Change-Id: Iceb3f19eb226fdcfd373fa73d8a5d41b41a239af
2016-01-08 14:18:51 +00:00
Kevin Carter eae366558a Implement swift venv support
This commit conditionally allows the os_swift role to
install build and deploy within a venv. This is the new
default behavior of the role however the functionality
can be disabled.

In this PR, like all of the other venv related PRs, the 
`is_metal` flag was removed from the role however unlike 
some of the other PRs this removal required moving some 
of the `is_metal` logic out of the role and into the 
play. This was done for consistency as well as making 
the role more standalone. The only thing that the role 
should care about, in terms of installation, is whether 
or not to install in a venv.

Change-Id: I6f5b883a853611659567bd12e8bcf572189854b7
Implements: blueprint enable-venv-support-within-the-roles
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-10-15 17:56:05 +00:00
Andy McCrae 6f8d14aa19 Add swift-sync role and environment
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
2015-08-07 08:45:18 +00:00