Skip to content

Synchronise master with upstream #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: stackhpc/master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ dhcp_provider = {{ dhcp_provider }}
[dnsmasq]
dhcp_hostsdir = {{ dnsmasq_dhcp_hostsdir }}
dhcp_optsdir = {{ dnsmasq_dhcp_optsdir }}
leases_file = {{ dnsmasq_leases_file }}
dhcp_leasefile = {{ dnsmasq_leases_file }}
{% endif %}

{% if enable_cors | bool == true %}
Expand Down
17 changes: 0 additions & 17 deletions playbooks/roles/bifrost-keystone-install/tasks/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
--network-interface argument to "bifrost-cli install".
when: ('ansible_' + ans_network_interface) not in hostvars[inventory_hostname]

- name: "Get keystone-wsgi-public location"
shell: echo $(dirname $(which keystone-wsgi-public))
register: keystone_install_prefix
environment: "{{ bifrost_venv_env }}"

# NOTE(sean-k-mooney) only the MySQL db is started during bootstrapping.
# all other services are started in the Start phase.
- name: "Start database service"
Expand Down Expand Up @@ -195,18 +190,6 @@
group: "{{ nginx_user }}" # TODO(TheJulia): Split webserver user/group.
mode: "0755"

# Note(ashestakov): "copy" module in ansible doesn't support recursive
# copying on remote host. "cp" command used instead.
- name: "Copy keystone-wsgi-public to /var/www/keystone/public"
command: cp -r "{{ keystone_install_prefix.stdout }}/keystone-wsgi-public" /var/www/keystone/public

- name: "Ensure owner and mode of keystone-wsgi-public"
file:
path: /var/www/keystone/public
owner: "keystone"
group: "{{ nginx_user }}"
mode: "0754"

- name: "Bootstrap uWSGI"
include_role:
name: bifrost-uwsgi-install
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# {{ ansible_managed }}
[uwsgi]
module = keystone.wsgi.api:application
plugins = python

master = true
processes = 2
threads = 2
Expand All @@ -18,4 +21,3 @@ uid = keystone
gid = {{ nginx_user }}

chdir = /var/www/keystone/
wsgi-file = /var/www/keystone/public
10 changes: 7 additions & 3 deletions playbooks/roles/bifrost-pip-install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
# source installation if the package itself is in constraints.
- not source_install | bool

- name: "Detect Python version in virtualenv"
command: "{{ ansible_python_interpreter }} -c 'import sys; print(\".\".join(map(str, sys.version_info[:3])))'"
register: ansible_python_interpreter_version

- name: "Install {{ package }} package from pip using virtualenv"
pip:
name: "{{ package }}"
Expand All @@ -45,7 +49,7 @@
retries: "{{ pip_install_retries }}"
delay: "{{ pip_install_delay }}"
when: not source_install | bool
environment: "{{ (bifrost_venv_env | combine({'SETUPTOOLS_USE_DISTUTILS': 'stdlib'})) if ansible_facts.python_version is version('3.12', '<') else bifrost_venv_env }}"
environment: "{{ (bifrost_venv_env | combine({'SETUPTOOLS_USE_DISTUTILS': 'stdlib'})) if ansible_python_interpreter_version.stdout is version('3.12', '<') else bifrost_venv_env }}"

- name: "Install requirements from {{ sourcedir }} using pip"
pip:
Expand All @@ -56,7 +60,7 @@
retries: 5
delay: 10
when: source_install | bool
environment: "{{ (bifrost_venv_env | combine({'SETUPTOOLS_USE_DISTUTILS': 'stdlib'})) if ansible_facts.python_version is version('3.12', '<') else bifrost_venv_env }}"
environment: "{{ (bifrost_venv_env | combine({'SETUPTOOLS_USE_DISTUTILS': 'stdlib'})) if ansible_python_interpreter_version.stdout is version('3.12', '<') else bifrost_venv_env }}"

# NOTE(dtantsur): do not use constraints here, it does not work when the
# package itself is constrained.
Expand All @@ -66,4 +70,4 @@
editable: "{{ developer_mode | bool }}"
extra_args: "{{ extra_args }}"
when: source_install | bool
environment: "{{ (bifrost_venv_env | combine({'SETUPTOOLS_USE_DISTUTILS': 'stdlib'})) if ansible_facts.python_version is version('3.12', '<') else bifrost_venv_env }}"
environment: "{{ (bifrost_venv_env | combine({'SETUPTOOLS_USE_DISTUTILS': 'stdlib'})) if ansible_python_interpreter_version.stdout is version('3.12', '<') else bifrost_venv_env }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
fixes:
- |
Fixes error DHCP lease file not found for dnsmasq dhcp provider.
Changed wrong DHCP lease variable name in ironic.conf.j2 template in bifrost-ironic-install role.
4 changes: 4 additions & 0 deletions releasenotes/notes/keystone-uwsgi-fix-cd7e95d1f1fa8768.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
Fixes Keystone start-up by providing the correct WSGI entry point.
6 changes: 6 additions & 0 deletions scripts/install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ case ${ID,,} in
# NOTE(rpittau): epel repos are installed but the content is purged
# in the CI images, we remove them and reinstall later
sudo -E ${PKG_MANAGER} remove -y epel-release epel-next-release

if [[ $NAME == 'CentOS Stream' ]] && [[ $VERSION == 9 ]]; then
export CONSTRAINTS_FILE="$BIFROST_HOME/upper-constraints-cs9-py39.txt"
export UPPER_CONSTRAINTS_FILE=$CONSTRAINTS_FILE
export TOX_CONSTRAINTS_FILE=$CONSTRAINTS_FILE
fi
;;

*) echo "ERROR: Supported package manager not found. Supported: apt, dnf, yum, zypper"; exit 1;;
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-bifrost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euxo pipefail

export PYTHONUNBUFFERED=1
SCRIPT_HOME="$(cd "$(dirname "$0")" && pwd)"
BIFROST_HOME=$SCRIPT_HOME/..
export BIFROST_HOME=$SCRIPT_HOME/..
USE_DHCP="${USE_DHCP:-false}"
BUILD_IMAGE="${BUILD_IMAGE:-false}"
BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'}
Expand Down
Loading