From 1f4996bdd93914b9533c1e9931aca92d1ae56295 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Sun, 8 Nov 2015 21:47:54 -0600 Subject: [PATCH] Adding docs/comments for glance config Deployers who use a dollar sign ($) in their swift backend passwords for glance will be unable to authenticate to the swift backend. This is due to how oslo.config formats strings. This patch adds documentation and comments to the user_variables.yml to ensure deployers know how to escape those strings. This patch also adds a commented variable for the auth version on swift backends so that deployers are reminded to use the correct version number. Closes-bug: 1514291 Change-Id: I717e9afb5af1160de67dc5d0f87985fde5ad393e --- doc/source/install-guide/configure-glance.rst | 16 ++++++++++++++-- etc/openstack_deploy/user_variables.yml | 15 ++++++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/doc/source/install-guide/configure-glance.rst b/doc/source/install-guide/configure-glance.rst index 91ff4ad948..67f0c2ab9f 100644 --- a/doc/source/install-guide/configure-glance.rst +++ b/doc/source/install-guide/configure-glance.rst @@ -19,13 +19,15 @@ usage. glance_default_store: swift -#. Set the appropriate authentication URL: +#. Set the appropriate authentication URL and version: .. code-block:: yaml + glance_swift_store_auth_version: 2 glance_swift_store_auth_address: https://127.0.0.1/v2.0 -#. Set the swift account credentials: +#. Set the swift account credentials (see *Special Considerations* at the + bottom of this page): .. code-block:: yaml @@ -106,6 +108,16 @@ usage. - ``trusted-auth+cachemanagement`` +Special Considerations +~~~~~~~~~~~~~~~~~~~~~~ + +If the swift password or key contains a dollar sign (``$``), it must +be escaped with an additional dollar sign (``$$``). For example, a password of +``super$ecure`` would need to be entered as ``super$$ecure``. This is needed +due to the way `oslo.config formats strings`_. + +.. _oslo.config formats strings: https://bugs.launchpad.net/oslo-incubator/+bug/1259729 + -------------- .. include:: navigation.txt diff --git a/etc/openstack_deploy/user_variables.yml b/etc/openstack_deploy/user_variables.yml index 8d32ca7e42..06d9ee2d11 100644 --- a/etc/openstack_deploy/user_variables.yml +++ b/etc/openstack_deploy/user_variables.yml @@ -67,9 +67,18 @@ glance_swift_store_endpoint_type: internalURL # dhcp_domain: ## Glance with Swift -### Extra options when configuring swift as a glance back-end. -### By default it will use the local swift install -### Set these when using a remote swift as a glance backend +# Extra options when configuring swift as a glance back-end. By default it +# will use the local swift installation. Set these when using a remote swift +# as a glance backend. +# +# NOTE: Ensure that the auth version matches your authentication endpoint. +# +# NOTE: If the password for glance_swift_store_key contains a dollar sign ($), +# it must be escaped with an additional dollar sign ($$), not a backslash. For +# example, a password of "super$ecure" would need to be entered as +# "super$$ecure" below. See Launchpad Bug #1259729 for more details. +# +#glance_swift_store_auth_version: 3 #glance_swift_store_auth_address: "https://some.auth.url.com" #glance_swift_store_user: "OPENSTACK_TENANT_ID:OPENSTACK_USER_NAME" #glance_swift_store_key: "OPENSTACK_USER_PASSWORD"