Fix default value logic of 'glance_backend_file' variable

glance_backend_file should be set to 'yes' if no other backends
are enabled. In all-Ceph clusters the best choice of backend is
Ceph. In non-Ceph clusters if Swift is enabled the latter is the
next best choice for Glance. With this fix default backend is
configured automatically and helps avoid non-ha file backend
issues after deployment.

Change-Id: I3d1c7cb2de9fedecdf9ad8744f6589c6f3f83ece
Closes-Bug: #1770660
This commit is contained in:
Vladislav Belogrudov 2018-05-11 18:01:15 +03:00
parent 06b46533a4
commit 8bfb789790

View File

@ -586,10 +586,11 @@ keystone_default_user_role: "_member_"
# Using glance_backend_ceph rather than enable_ceph to determine whether to
# use the file backend, as this allows for the external ceph case, where
# enable_ceph is False.
glance_backend_file: "{{ not glance_backend_ceph | bool }}"
glance_backend_file: "{{ not (glance_backend_ceph | bool or glance_backend_swift | bool or glance_backend_vmware | bool) }}"
glance_backend_ceph: "{{ enable_ceph }}"
glance_backend_vmware: "no"
glance_backend_swift: "no"
# ceph backend has priority over swift in all-ceph clusters
glance_backend_swift: "{{ not (enable_ceph | bool) and enable_swift | bool }}"
glance_file_datadir_volume: "glance"
glance_enable_rolling_upgrade: "no"