From 7444c804a9de8b71d568f63c35f47a5dda697267 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 7 Apr 2023 14:21:53 +0200 Subject: [PATCH] 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] https://opendev.org/openstack/adjutant/src/commit/df8c3e4a8b70be8697ac46f0acec9169752b4698/requirements.txt#L3 Change-Id: Ie5c4f5528a25d0a13c12749c1d7af09377792342 --- defaults/main.yml | 2 +- tasks/adjutant_install.yml | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index cd1c1ec..4b33a38 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 diff --git a/tasks/adjutant_install.yml b/tasks/adjutant_install.yml index 4008801..a6313c9 100644 --- a/tasks/adjutant_install.yml +++ b/tasks/adjutant_install.yml @@ -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 }}"