Juju Charm - Swift storage
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Alex Kavanagh c709be563a Sync charm-helpers for py38/focal pre-support 1 settimana fa
actions Upgrade the charm to py3 runtime 1 anno fa
charmhelpers Sync charm-helpers for py38/focal pre-support 1 settimana fa
files Fix import errors on Nagios check file 1 anno fa
hooks Ensure python3-hvac is installed for charms with encypt option 1 mese fa
lib Swift Global Cluster 3 mesi fa
templates Swift Global Cluster 3 mesi fa
tests Workaround for Juju bug 1860992 2 mesi fa
unit_tests Swift Global Cluster 3 mesi fa
.gitignore Add support for block device encryption 1 anno fa
.gitreview OpenDev Migration Patch 11 mesi fa
.project Resynced helpers 6 anni fa
.pydevproject Enable xenial/queens amulet testing 2 anni fa
.stestr.conf Replace ostestr with stestr in testing framework. 1 anno fa
.zuul.yaml Switch to Ussuri jobs 3 mesi fa
LICENSE Re-license charm as Apache-2.0 3 anni fa
Makefile Tests dir no longer need copy of charmhelpers 1 anno fa
README.md Review and improve README 1 mese fa
actions.yaml Action Managed Upgrades 4 anni fa
charm-helpers-hooks.yaml Sync charm/ceph helpers, tox, and requirements 6 mesi fa
config.yaml Swift Global Cluster 3 mesi fa
copyright Re-license charm as Apache-2.0 3 anni fa
hardening.yaml Add hardening support 4 anni fa
icon.svg Update charm icon 2 anni fa
metadata.yaml Remove disco support from the charm 1 mese fa
requirements.txt Update requirements 1 anno fa
revision Remove debug. 6 anni fa
setup.cfg Add Python 3 Train unit tests 8 mesi fa
test-requirements.txt Switch tests to zaza 5 mesi fa
tox.ini Switch tests to zaza 5 mesi fa



OpenStack Swift is a highly available, distributed, eventually consistent object/blob store.

The swift-storage charm deploys Swift's storage component. The charm's basic function is to initialise storage devices and manage the container, object, and account services. It works in tandem with the swift-proxy charm, which is used to add proxy nodes.



This section covers common configuration options. See file config.yaml for the full list of options, along with their descriptions and default values.


The zone option assigns a storage zone (an integer) to a storage node. A zone is associated with data replicas.


The block-device option specifies the device(s) that will be used on all machines associated with the application. Value types include:

  • an actual block device (e.g. ‘sdb’ or ‘/dev/sdb’). A space-separated list is used for multiple devices.
  • a path to a local file with the size appended after a pipe (e.g. ‘/etc/swift/storagedev1.img|5G’). The file will be created if necessary and be mapped to a loopback device. This is intended for development and testing purposes.

The resulting block device(s) will be XFS-formatted and use /srv/node/<device-name> as a mount point.


The storage-region option specifies a storage region (an integer). It is used only for multi-region (global) clusters.


Let file swift.yaml contain the deployment configuration:

        zone-assignment: manual
        replicas: 3
        zone: 1
        block-device: /dev/sdb
        zone: 2
        block-device: /dev/sdb
        zone: 3
        block-device: /dev/sdb

Deploy the proxy and storage nodes:

juju deploy --config swift.yaml swift-proxy
juju deploy --config swift.yaml swift-storage swift-storage-zone1
juju deploy --config swift.yaml swift-storage swift-storage-zone2
juju deploy --config swift.yaml swift-storage swift-storage-zone3

Add relations between the proxy node and all storage nodes:

juju add-relation swift-proxy:swift-storage swift-storage-zone1:swift-storage
juju add-relation swift-proxy:swift-storage swift-storage-zone2:swift-storage
juju add-relation swift-proxy:swift-storage swift-storage-zone3:swift-storage

This will result in a three-zone cluster, with each zone consisting of a single storage node, thereby satisfying the replica requirement of three.

Storage capacity is increased by adding swift-storage units to a zone. For example, to add two storage nodes to zone ‘3’:

juju add-unit -n 2 swift-storage-zone3

Note: When scaling out ensure the candidate machines are equipped with the block devices currently configured for the associated application.

This charm will not balance the storage ring until there are enough storage zones to meet its minimum replica requirement, in this case three.

Appendix Swift usage in the OpenStack Charms Deployment Guide offers in-depth guidance for deploying Swift with charms. In particular, it shows how to set up a multi-region (global) cluster.


This section covers Juju actions supported by the charm. Actions allow specific operations to be performed on a per-unit basis.

  • openstack-upgrade
  • pause
  • resume

To display action descriptions run juju actions swift-storage.


Please report bugs on Launchpad.

For general charm questions refer to the OpenStack Charm Guide.