Switch back to use constrained Django version

Supposedly, Adjutant has upgraded used Django version and constrained
version can be used now, since upper limit for Django is not defined
anymore in project requirements [1]

We also fix ansible_facts usage with same commit to resolve
circular dependency.

[1] df8c3e4a8b/requirements.txt (L3)

Change-Id: Ie5c4f5528a25d0a13c12749c1d7af09377792342
This commit is contained in:
Dmitriy Rabotyagov 2023-04-07 14:21:53 +02:00 committed by Dmitriy Rabotyagov
parent 7f2d4a2073
commit 7444c804a9
2 changed files with 2 additions and 10 deletions

View File

@ -77,7 +77,7 @@ adjutant_horizon_publicurl: "{{ openstack_service_publicuri_proto | default(adju
# uWSGI settings
adjutant_wsgi_threads: 1
adjutant_wsgi_processes_max: 16
adjutant_wsgi_processes: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, adjutant_wsgi_processes_max] | min }}"
adjutant_wsgi_processes: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, adjutant_wsgi_processes_max] | min }}"
adjutant_use_uwsgi: True
adjutant_email_backend: django.core.mail.backends.smtp.EmailBackend

View File

@ -13,20 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE(noonedeadpunk): Adjutant is incompatible with provided in u-c Django version
# While it's ajutant issue, we should workaround this until it got fixed.
- name: Retrieve the constraints URL
uri:
url: "{{ adjutant_upper_constraints_url }}"
return_content: yes
register: _u_c_contents
- name: Install the python venv
import_role:
name: "python_venv_build"
vars:
venv_python_executable: "{{ adjutant_venv_python_executable }}"
venv_build_constraints: "{{ _u_c_contents.content.split('\n') | reject('match', '^(Django)=') | list }}"
venv_build_constraints: "{{ adjutant_git_constraints }}"
venv_build_distro_package_list: "{{ adjutant_devel_distro_packages }}"
venv_install_destination_path: "{{ adjutant_bin | dirname }}"
venv_pip_install_args: "{{ adjutant_pip_install_args }}"