From efa23998a2b5d0972ca9f1e83dd6db06c3862194 Mon Sep 17 00:00:00 2001 From: Matthew Kassawara Date: Tue, 15 Mar 2016 08:27:11 -0600 Subject: [PATCH] Install: Swift updates for Mitaka Update swift configuration for Mitaka. The swift client lacks support for OS_AUTH_URL without a version and the OpenStack client has a bug that prevents downloading files, so most of this patch involves workarounds. Also move the RDO SELinux workaround to a better location and improve some wording. Implements: bp installguide-mitaka Change-Id: Ibb0532f486681c22c8c7d7d4765345b9135e6b51 --- .../source/swift-controller-include.txt | 2 +- .../source/swift-finalize-installation.rst | 9 --- doc/install-guide/source/swift-verify.rst | 55 ++++++++++++++----- 3 files changed, 43 insertions(+), 23 deletions(-) diff --git a/doc/install-guide/source/swift-controller-include.txt b/doc/install-guide/source/swift-controller-include.txt index 0373a78437..cc04c23530 100644 --- a/doc/install-guide/source/swift-controller-include.txt +++ b/doc/install-guide/source/swift-controller-include.txt @@ -82,4 +82,4 @@ following actions: [filter:cache] use = egg:swift#memcache ... - memcache_servers = 127.0.0.1:11211 + memcache_servers = controller:11211 diff --git a/doc/install-guide/source/swift-finalize-installation.rst b/doc/install-guide/source/swift-finalize-installation.rst index e9ae0f06f1..bb1bf973db 100644 --- a/doc/install-guide/source/swift-finalize-installation.rst +++ b/doc/install-guide/source/swift-finalize-installation.rst @@ -144,15 +144,6 @@ Finalize installation # systemctl start openstack-swift-object.service openstack-swift-object-auditor.service \ openstack-swift-object-replicator.service openstack-swift-object-updater.service - 7. If SELinux errors appear in the ``/var/log/audit/audit.log`` file, - change the security context of the ``/srv/node`` directory to the lowest - security level (``s0``) for the ``swift_data_t`` type, ``object_r`` role and the - ``system_u`` user: - - .. code-block:: console - - # chcon -R system_u:object_r:swift_data_t:s0 /srv/node - .. only:: obs 3. On all nodes, ensure proper ownership of the configuration directory: diff --git a/doc/install-guide/source/swift-verify.rst b/doc/install-guide/source/swift-verify.rst index 73dad0aab0..02a2cc8d45 100644 --- a/doc/install-guide/source/swift-verify.rst +++ b/doc/install-guide/source/swift-verify.rst @@ -7,13 +7,29 @@ Verify operation of the Object Storage service. Perform these steps on the controller node. -#. In each client environment script, configure the Object Storage - service client to use the Identity API version 3: +.. only:: rdo - .. code-block:: console + .. warning:: - $ echo "export OS_AUTH_VERSION=3" \ - | tee -a admin-openrc.sh demo-openrc.sh + If one or more of these steps do not work, check the + ``/var/log/audit/audit.log`` file for SELinux messages indicating denial + of actions for the ``swift`` processes. If present, change the security + context of the ``/srv/node`` directory to the lowest security level (s0) + for the ``swift_data_t`` type, ``object_r`` role and the ``system_u`` + user: + + .. code-block:: console + + # chcon -R system_u:object_r:swift_data_t:s0 /srv/node + +#. Due to a + `bug `_, + you must add a version to the ``OS_AUTH_URL`` variable in the environment + scripts. For example: + + .. code-block:: bash + + export OS_AUTH_URL=http://controller:5000/v3 #. Source the ``demo`` credentials: @@ -39,29 +55,42 @@ Verify operation of the Object Storage service. Content-Type: text/plain; charset=utf-8 Accept-Ranges: bytes -#. Upload a test file: +#. Upload a test file to the ``container1`` container: .. code-block:: console - $ swift upload container1 FILE - FILE + $ openstack object create container1 FILE + +--------+------------+----------------------------------+ + | object | container | etag | + +--------+------------+----------------------------------+ + | FILE | container1 | ee1eca47dc88f4879d8a229cc70a07c6 | + +--------+------------+----------------------------------+ Replace ``FILE`` with the name of a local file to upload to the ``container1`` container. -#. List containers: +#. List files in the ``container1`` container: .. code-block:: console - $ swift list - container1 + $ openstack object list container1 + +------+ + | Name | + +------+ + | FILE | + +------+ -#. Download a test file: +#. Download a test file from the ``container1`` container: .. code-block:: console $ swift download container1 FILE - FILE [auth 0.295s, headers 0.339s, total 0.339s, 0.005 MB/s] + FILE [auth 0.410s, headers 0.746s, total 1.001s, 22.494 MB/s] Replace ``FILE`` with the name of the file uploaded to the ``container1`` container. + + .. note:: + + Due to a bug with the OpenStack client, you must use the conventional + ``swift`` client or other compatible client to download files.