Swift should mirror other roles and use a list instead of a dictionary
for it's filtered_services.
This patch makes that change.
Change-Id: Ie6bf282a36ed63d73996447a88c3c5f6056465a7
Beginning with commit 6ffcc29 of swift3, the swift3 and s3token middlewares
must come between authtoken and keystoneauth in the swift proxy pipeline.
When 6ffcc29 was committed, reordering was optional at the expense of an
unneceessary call to keystone. However, the change becomes mandatory when using
keystone v3 tokens. Without this change, authtoken will strip the necessary
headers that s3token just added to the environment.
Change-Id: Ic7d07d869aa617ee00190a9aedf411017539b97b
Add support for the openSUSE Leap distributions. Nothing special is
required for this except for adding the appropriate distro variables
file and also update the zypper cache before package installation.
Moreover, the syslog user belongs to the 'users' group instead of a
dedicated 'syslog' group so we adjust the defaults for openSUSE.
Depends-On: I96c02fb2ee26691f1d7dd449d7205baa231795fe
Change-Id: I86beac2b3e038a0a4a3bf9618218bc1e393bdf08
This patch implements the use of dynamic includes,
the filtered service list and the elimination of
redundant tasks in order to optimise the role
execution.
Change-Id: Ia957bd80ec6a97a29b4b3a1c28bf37dfc9226ab1
When running a rolling upgrade, each swift node is addressed
individually. This can result in undefined variables when a node doesn't
have the necessary SSH and ring information.
For minor upgrades, these changes are not necessary. They are only
necessary in fresh installs, or modifying storage capacity. Thus, this
patch checks to see if it's a new install (no swift venv_tag previously
defined) or it's the same version (current venv tag matches the previous
one) and only does syncs in those cases.
Change-Id: Ice3b4526609f5a5fd4472c8408de9ed08aea29e6
As part of the docs migration work[0] for Pike we need to switch to use the
openstackdocstheme.
[0]https://review.openstack.org/#/c/472275/
Change-Id: Ia3d468d5ed5c31314a20cf1c7b4b6a9829628064
This commit adds support for the swift3 middware, which allows S3-compatible
clients to use swift for object storage.
Change-Id: I56cd63057cc771310b69c311d975e06f73c773f7
Related-Bug: 1625053
The keystonemiddleware library recently switched to using the
cryptography library over pycrypto, which was unmaintained. See
Iced7f5115e49ccf4f7f5bf6813cb5988b95c248b
Change-Id: Ib492bce6df005e8b4e824352e523d2d80c1a8839
Co-Authored-By: Nolan Brubaker <nolan.brubaker@rackspace.com>
Currently the role tests use whatever versions of pip,
setuptools and wheel are already installed on the host.
When a version of these tools changes it often causes
problems for our testing.
This will ensure that we use a known good set of pins
which is maintained in the general SHA bumping process.
Change-Id: Ib62f4c84bcfe62442e94671422860b5eec1222a3
In order to do a developer mode that allows installation of packages
from local file, which take precedence over the developer_mode
constraints, we need to allow the order of the constraints to be
changed.
This patch adds a "pip_install_developer_constraints" var which is used
to set the developer mode constraints. By default this will leave the
same behaviour but will allow additional constraints to be added, or the
developermode constraints file to be overriden altogether.
Change-Id: I67f880def4b16e519865cc18937807e80b0b82c8
In order to make it easier to detect the currently deployed
venv for a service, and therefore allow smarter decisions
for things like upgrading, we implement the venv tag as a
local fact.
The file used to store facts will be the same for all
OpenStack services, with each service using its own section.
Example:
"ansible_local": {
"openstack_ansible": {
"swift": {
"venv_tag": "14.2.1"
}
}
}
Change-Id: I54f6317ba1b82c29a2b64c59e64cc7a34a82e880
We use an SSH bastion host which we do our deployment through. The
deployment host doesn't have direct access to the same network as the
host. As a result the venv local checksum lookup fails.
I have described this here:
https://bugs.launchpad.net/openstack-ansible/+bug/1689283
This is a simple fix for this problem, assuming everything is good it
will need repeating in multiple places in the code base.
Change-Id: Ib0693f6ff28e2f9e9b2befbd1abc05945a7b6d61
When executing the tests repo clone in OpenStack-CI,
use zuul-cloner instead of git to enable cross-repo
testing. This ensures that if a dependent patch from
the tests repo is noted using 'Depends-On: <change-id>'
in the commit message, that patch will be included.
Change-Id: Ie1a48685f48cd5074031d58478a541967a01be42
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
Use the defaults file to set the 'swift_vars' and 'swift_proxy_vars'
variables instead of set_fact tasks.
Change-Id: I52636950652180c4192ad7596dc96c397a7c78f9
To greatly reduce the amount of log noise from skipped tasks, set a
var in the role that filters the 'swift_services' dict to one that only
contains services relevant for each host.
Change-Id: Ib4e7d398ce2b34e560520d0266dc67bed653cc5c
The systemd unit 'TimeoutSec' value which controls the time
between sending a SIGTERM signal and a SIGKILL signal when
stopping or restarting the service has been reduced from 300
seconds to 120 seconds. This provides 2 minutes for long-lived
sessions to drain while preventing new ones from starting
before a restart or a stop.
The 'RestartSec' value which controls the time between the
service stop and start when restarting has been reduced from
150 seconds to 2 seconds to make the restart happen faster.
These values can be adjusted by using the *_init_config_overrides
variables which use the config_template task to change template
defaults.
Change-Id: I048b877e859ad744dc54f19a93afdd89f8ef1661
The update of the apt cache and the package installation
can all be handled in a single task by providing the
package action plugin with the right parameters. This
removes an extra task to optimise execution.
The minimum Ansible version is raised to 2.2 due to a
known bug [1] in Ansible's apt module which does not
update the cache properly if the cache update and the
install are combined in a single task.
[1] https://github.com/ansible/ansible-modules-core/issues/1497
Change-Id: I532d866286d4cb885e1f3696819455cbdc8c0c39
'ansible_become' defined as a host_var or in the inventory for a host
has a higher precedence than 'become' defined within a playbook.
In change Id5b76a87809f03951c954fc3d752419a673403f7, 'become' was
defined explicitly for each play running against localhost so
'ansible_become' should be removed from its host_vars.
Change-Id: I3b56a8c2df670423a2cb4e473379028e23bb01bd
This creates a specific slice which all OpenStack services will operate
from. By creating an independent slice these components will be governed
away from the system slice allowing us to better optimise resource
consumption.
See the following for more information on slices:
* https://www.freedesktop.org/software/systemd/man/systemd.slice.html
See for following for more information on resource controls:
* https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html
Tools like ``systemd-cgtop`` and ``systemd-cgls`` will now give us
insight into specific processes, process groups, and resouce consumption
in ways that we've not had access to before. To enable some of this reporting
the accounting options have been added to the [Service] section of the unit
file.
Change-Id: Ibcb7d2a69ed67a99c88dc143c76aa8448d31cc9e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
When running a MR swift deploy we rebalance the ring in quick
succession.
To do this successfully we need to set the
"swift_pretend_min_part_hours_passed" to True. This shouldn't be needed
in a regular deploy, or a deploy where rings don't change.
Change-Id: Ib86dcfbdb5f6346e2c7da67b6bf2b29c62f99dab
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