Update fallocate_reserve to work with py3

As ConfigParser tries to convert "%" as a part of the variable[1],
we need to adjust it's default variable inside template for swift
to work with py3 unless this will be fixed in swift by using raw [2]

[1] https://docs.python.org/3.6/library/configparser.html#configparser.ConfigParser.get
[2] https://github.com/openstack/swift/blob/master/swift/account/server.py#L66

Change-Id: I9bbd3195a7b02a55e38207aa4bba182a6e58346c
Related-Bug: https://bugs.launchpad.net/swift/+bug/1844368
This commit is contained in:
Dmitriy Rabotyagov 2019-09-17 19:51:59 +03:00
parent 25d0812be5
commit c1bdbfbb14
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ swift_allow_all_users: False
swift_recreate_keys: False
swift_sorting_method: shuffle
# Set the fallocate_reserve value which will reserve space and fail on PUTs above this value in bytes (Default 10GB)
swift_fallocate_reserve: "1%"
swift_fallocate_reserve: "{{ (swift_venv_python_executable == 'python3' and swift_install_method == 'source') | ternary('1%%', '1%') }}"
swift_account_fallocate_reserve: "{{ swift_fallocate_reserve }}"
swift_container_fallocate_reserve: "{{ swift_fallocate_reserve }}"
swift_object_fallocate_reserve: "{{ swift_fallocate_reserve }}"