Skip to content
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

Upstream Train sync 2021-12-02 #48

Open
wants to merge 40 commits into
base: cumulus/train
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4a1032b
Use internal API for Barbican communication
Jul 6, 2020
6b9b4a5
CI: Add ssh retries
mnasiadka Feb 24, 2021
99ea10b
CentOS 8: Make it clearer the 7 to 8 migration stays on Train
markgoddard Mar 17, 2021
a0c0d6e
docs: fix registry mirror example
markgoddard Mar 18, 2021
147951d
nova-cell: Stop printing ceph keys in output
mnasiadka Mar 2, 2021
292cf26
Merge "nova-cell: Stop printing ceph keys in output" into stable/train
Mar 30, 2021
b53afa6
Merge "CI: Add ssh retries" into stable/train
Mar 30, 2021
437c6a1
Fix installation errors with Python 2
priteau Apr 9, 2021
82ae334
Update setuptools inside virtualenvs
priteau Apr 19, 2021
5e3e2d3
Document setuptools update
priteau Apr 19, 2021
26760b6
docs: Improve policy documentation
markgoddard Mar 30, 2021
f3268ac
Negative seqno need to be considered when comparing seqno
Jan 29, 2021
189a4e5
Use @type instead of type
JohnGarbutt May 10, 2021
05b551b
Disable Alertmanager's peer gossip in non-HA deployments
cityofships May 6, 2021
56eefd8
baremetal: Install Docker SDK less than 5.0.0
mnasiadka May 19, 2021
26d310e
Ensure keepalived is upgraded
markgoddard May 17, 2021
1206f38
Merge "Use internal API for Barbican communication" into stable/train
May 25, 2021
e466281
Remove [octavia]/base_url option from neutron.conf
priteau May 26, 2021
018b997
CI: pull images before deploy
mnasiadka Apr 6, 2021
c12330f
[CI] Remove setup_gate.sh symlink
yoctozepto Sep 8, 2020
acffff8
Merge "CI: pull images before deploy" into stable/train
May 28, 2021
8e80d67
Merge "[CI] Remove setup_gate.sh symlink" into stable/train
May 28, 2021
4920980
CI: Use PATH to find kolla-ansible script
markgoddard Feb 12, 2021
ac1b377
Merge "CI: Use PATH to find kolla-ansible script" into stable/train
Jun 5, 2021
ebaa5bb
Fix RabbitMQ restart ordering
markgoddard Jun 7, 2021
6966e6f
neutron: Add become for copying sriov_agent.ini
mnasiadka Jun 7, 2021
3440e0c
Merge "neutron: Add become for copying sriov_agent.ini" into stable/t…
Jun 9, 2021
3a1b947
Support editable installation in all cases
keuko Apr 7, 2021
362838d
Do not set pid file for iscsid
yoctozepto Jun 20, 2021
b882000
baremetal: Don't start Docker after install on Debian/Ubuntu
mnasiadka Apr 23, 2021
f1201f9
[CI] Do not set ansible_python_interpreter for Zuul
yoctozepto Jun 26, 2021
94f7b7d
Merge "baremetal: Don't start Docker after install on Debian/Ubuntu" …
Jul 1, 2021
93e1ed1
Fix empty match while setting supported_policy_files
mchlumsky Nov 4, 2019
f63266a
[docker] Added a new flag to disable default network
dincercelik Oct 21, 2019
f725a50
Disable docker's ip-forward when iptables disabled
yoctozepto Jun 10, 2021
e7013aa
Merge "[docker] Added a new flag to disable default network" into sta…
Jul 26, 2021
804f58e
Merge "Disable docker's ip-forward when iptables disabled" into stabl…
Jul 26, 2021
5e17f61
Correctly configure S3 Token Middleware for Swift
mmalchuk Feb 10, 2021
992c762
CI: Remove ara integration
priteau Oct 8, 2021
21800d0
Merge remote-tracking branch 'upstream/stable/train' into train-sync-…
paulbrowne Dec 2, 2021
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
2 changes: 2 additions & 0 deletions ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ docker_client_timeout: 120

# Docker networking options
docker_disable_default_iptables_rules: "no"
docker_disable_default_network: "no"
docker_disable_ip_forward: "no"

# Retention settings for Docker logs
docker_log_max_file: "5"
Expand Down
46 changes: 44 additions & 2 deletions ansible/roles/baremetal/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,26 @@
changed_when: false
register: running_containers

# APT starts Docker engine right after installation, which creates
# iptables rules before we disable iptables in Docker config

- name: Check if docker systemd unit exists
stat:
path: /etc/systemd/system/docker.service
register: docker_unit_file

- name: Mask the docker systemd unit on Debian/Ubuntu
file:
src: /dev/null
dest: /etc/systemd/system/docker.service
owner: root
group: root
state: link
become: true
when:
- ansible_os_family == 'Debian'
- not docker_unit_file.stat.exists

- name: Install apt packages
package:
name: "{{ (debian_pkg_install | join(' ')).split() }}"
Expand Down Expand Up @@ -73,17 +93,38 @@
when: ansible_os_family == 'RedHat'
register: rpm_install_result

# Workaround older Ansible that fails systemd tasks
# when unit is masked

- name: Check if docker service is masked
become: True
stat:
path: /etc/systemd/system/docker.service
register: docker_unit_masked
when: ansible_os_family == 'Debian'

- name: Unmask docker service
become: True
file:
path: /etc/systemd/system/docker.service
state: absent
when:
- ansible_os_family == 'Debian'
- docker_unit_masked.stat.islnk
- docker_unit_masked.stat.lnk_source == '/dev/null'

# If any packages were updated, and any containers were running, wait for the
# daemon to come up and start all previously running containers.

- block:
# At some point (at least on CentOS 7) Docker CE stopped starting
# automatically after an upgrade from legacy docker . Start it manually.
- name: Start docker
service:
systemd:
name: docker
state: started
enabled: yes
masked: no
become: True

- name: Wait for Docker to start
Expand Down Expand Up @@ -125,7 +166,8 @@

- name: Install docker SDK for python
pip:
name: docker
# NOTE(mnasiadka): docker 5.0.0 lacks six in deps but requires it
name: docker<5.0.0
executable: "{{ virtualenv is none | ternary('pip' ~ host_python_major_version, omit) }}"
virtualenv: "{{ virtualenv is none | ternary(omit, virtualenv) }}"
virtualenv_site_packages: "{{ virtualenv is none | ternary(omit, virtualenv_site_packages) }}"
Expand Down
39 changes: 35 additions & 4 deletions ansible/roles/baremetal/tasks/post-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
- name: Warn about docker default iptables
debug:
msg: >-
Docker default iptables rules will be disabled by default from the Victoria 11.0.0
Docker default iptables rules will be disabled by default from the Wallaby 12.0.0
release. If you have any non-Kolla containers that need this functionality, you should
plan a migration for this change, or set docker_disable_default_iptables_rules to false.
when: not docker_disable_default_iptables_rules | bool
Expand All @@ -103,6 +103,34 @@
docker_config: "{{ docker_config | combine({'iptables': false}) }}"
when: docker_disable_default_iptables_rules | bool

- name: Warn about docker default networking
debug:
msg: >-
Docker default network on docker0 will be disabled by default from the
Wallaby 12.0.0 release. If you have any non-Kolla containers that need
this functionality, you should plan a migration for this change, or set
docker_disable_default_network to false.
when: not docker_disable_default_network | bool

- name: Disable docker default network on docker0
set_fact:
docker_config: "{{ docker_config | combine({'bridge': 'none'}) }}"
when: docker_disable_default_network | bool

- name: Warn about docker ip_forward
debug:
msg: >-
Docker ip_forward will be disabled by default from the
Wallaby 12.0.0 release. If you have any non-Kolla containers that need
this functionality, you should plan a migration for this change, or set
docker_disable_ip_forward to false.
when: not docker_disable_ip_forward | bool

- name: Disable docker ip_forward
set_fact:
docker_config: "{{ docker_config | combine({'ip-forward': false}) }}"
when: docker_disable_ip_forward | bool

- name: Merge custom docker config
set_fact:
docker_config: "{{ docker_config | combine(docker_custom_config) }}"
Expand Down Expand Up @@ -189,22 +217,25 @@
when: create_kolla_user | bool

- name: Start docker
service:
systemd:
name: docker
state: started
masked: no
become: True

- name: Restart docker
service:
systemd:
name: docker
state: restarted
masked: no
become: True
when: docker_configured.changed or docker_reloaded.changed

- name: Enable docker
service:
systemd:
name: docker
enabled: yes
masked: no
become: True

- name: Stop time service
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/cinder/templates/cinder.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ connection_string = {{ osprofiler_backend_connection_string }}
{% if enable_barbican | bool %}
[barbican]
auth_endpoint = {{ keystone_internal_url }}
barbican_endpoint_type = internal
{% endif %}

[coordination]
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/common/templates/conf/output/00-local.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</store>
{% if log_direct_to_elasticsearch %}
<store>
type elasticsearch
@type elasticsearch
host {{ elasticsearch_address }}
port {{ elasticsearch_port }}
scheme {{ fluentd_elasticsearch_scheme }}
Expand Down Expand Up @@ -66,7 +66,7 @@
</store>
{% if log_direct_to_elasticsearch %}
<store>
type elasticsearch
@type elasticsearch
host {{ elasticsearch_address }}
port {{ elasticsearch_port }}
scheme {{ fluentd_elasticsearch_scheme }}
Expand Down
6 changes: 6 additions & 0 deletions ansible/roles/glance/templates/glance-api.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,9 @@ trace_sqlalchemy = true
hmac_keys = {{ osprofiler_secret }}
connection_string = {{ osprofiler_backend_connection_string }}
{% endif %}

{% if enable_barbican | bool %}
[barbican]
auth_endpoint = {{ keystone_internal_url }}
barbican_endpoint_type = internal
{% endif %}
2 changes: 2 additions & 0 deletions ansible/roles/haproxy/tasks/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
notify:
- Restart keepalived container

- import_tasks: check-containers.yml

# NOTE(yoctozepto): haproxy role handlers should not be flushed early.
# site.yml handles all haproxy things in a dedicated play.
# This is to avoid extra haproxy service restart.
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/horizon/tasks/policy_item.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Update policy file name
- set_fact:
supported_policy_files: "{{ supported_policy_format_list | map('regex_replace', '(.*)', '{{ project_name }}_\\1') | list }}"
supported_policy_files: "{{ supported_policy_format_list | map('regex_replace', '(.+)', '{{ project_name }}_\\1') | list }}"

- name: Check if policies shall be overwritten
local_action: stat path="{{ fullpath }}"
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/iscsi/templates/iscsid.json.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"command": "iscsid -d 8 -f --pid=/run/iscsid.pid",
"command": "iscsid -d 8 -f",
"config_files": []
}
2 changes: 1 addition & 1 deletion ansible/roles/mariadb/tasks/recover_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
shell:
cmd: |
if [[ ! -z {{ hostvars[inventory_hostname]['seqno'] }} && ! -z {{ hostvars[item]['seqno'] }} &&
{{ hostvars[inventory_hostname]['seqno'] }} =~ ^[0-9]+$ && {{ hostvars[item]['seqno'] }} =~ ^[0-9]+$ &&
{{ hostvars[inventory_hostname]['seqno'] }} =~ ^-?[0-9]+$ && {{ hostvars[item]['seqno'] }} =~ ^-?[0-9]+$ &&
{{ hostvars[inventory_hostname]['seqno'] }} -lt {{ hostvars[item]['seqno'] }} ]]; then echo {{ hostvars[item]['seqno'] }}; fi
with_items: "{{ groups['mariadb'] }}"
register: seqno_compare
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/neutron/tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
- "Restart {{ item.key }} container"

- name: Copying over sriov_agent.ini
become: true
vars:
service_name: "neutron-sriov-agent"
neutron_sriov_agent: "{{ neutron_services[service_name] }}"
Expand Down
5 changes: 0 additions & 5 deletions ansible/roles/neutron/templates/neutron.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@ drivers = ovs
drivers = ovs
{% endif %}

{% if enable_octavia | bool %}
[octavia]
base_url = {{ internal_protocol }}://{{ octavia_internal_fqdn | put_address_in_context('url') }}:{{ octavia_api_port }}
{% endif %}

{% if enable_designate | bool %}
[designate]
url = {{ internal_protocol }}://{{ designate_internal_fqdn | put_address_in_context('url') }}:{{ designate_api_port }}/v2
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/nova-cell/tasks/external_ceph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
enabled: "{{ cinder_backend_ceph }}"
notify:
- Restart nova-libvirt container
no_log: True

- name: Ensuring config directory has correct owner and permission
become: true
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/nova-cell/templates/nova.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ connection_string = {{ osprofiler_backend_connection_string }}
{% if enable_barbican | bool %}
[barbican]
auth_endpoint = {{ keystone_internal_url }}
barbican_endpoint_type = internal
{% endif %}

{% if nova_compute_virt_type == "xenapi" %}
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/nova/templates/nova.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,5 @@ connection_string = {{ osprofiler_backend_connection_string }}
{% if enable_barbican | bool %}
[barbican]
auth_endpoint = {{ keystone_internal_url }}
barbican_endpoint_type = internal
{% endif %}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"command": "/opt/prometheus_alertmanager/alertmanager --config.file=/etc/prometheus/alertmanager.yml --web.listen-address={{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_alertmanager_port }} --web.external-url={{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ prometheus_alertmanager_port }} {% if groups["prometheus-alertmanager"] | length > 1 %} --cluster.listen-address={{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_alertmanager_cluster_port }} {% for host in groups["prometheus-alertmanager"] %} --cluster.peer={{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host]['prometheus_alertmanager_cluster_port'] }}{% endfor %}{% endif %} --storage.path /var/lib/prometheus",
"command": "/opt/prometheus_alertmanager/alertmanager --config.file=/etc/prometheus/alertmanager.yml --web.listen-address={{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_alertmanager_port }} --web.external-url={{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ prometheus_alertmanager_port }} --cluster.listen-address={% if groups["prometheus-alertmanager"] | length > 1 %}{{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_alertmanager_cluster_port }} {% for host in groups["prometheus-alertmanager"] %} --cluster.peer={{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host]['prometheus_alertmanager_cluster_port'] }}{% endfor %}{% endif %} --storage.path /var/lib/prometheus",
"config_files": [
{
"source": "{{ container_config_directory }}/prometheus-alertmanager.yml",
Expand Down
18 changes: 17 additions & 1 deletion ansible/roles/rabbitmq/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
---
- name: Restart rabbitmq container
# NOTE(mgoddard): These tasks perform a 'full stop upgrade', which is necessary when moving between
# major releases. In future kolla-ansible releases we may be able to change this to a rolling
# restart. For info on this process see https://www.rabbitmq.com/upgrade.html

- name: Restart first rabbitmq container
vars:
service_name: "rabbitmq"
service: "{{ rabbitmq_services[service_name] }}"
include_tasks: 'restart_services.yml'
when:
- kolla_action != "config"
- inventory_hostname == groups[service.group] | first
listen: Restart rabbitmq container

- name: Restart remaining rabbitmq containers
vars:
service_name: "rabbitmq"
service: "{{ rabbitmq_services[service_name] }}"
include_tasks: 'restart_services.yml'
when:
- kolla_action != "config"
- inventory_hostname == item
- inventory_hostname != groups[service.group] | first
loop: "{{ groups[service.group] }}"
listen: Restart rabbitmq container
2 changes: 1 addition & 1 deletion ansible/roles/swift/templates/proxy-server.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ use = egg:swift#s3api

[filter:s3token]
use = egg:swift#s3token
www_authenticate_uri = {{ keystone_internal_url }}/v3
auth_uri = {{ keystone_internal_url }}/v3
{% endif %}
35 changes: 21 additions & 14 deletions doc/source/admin/advanced-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,27 +265,34 @@ operator needs to create ``/etc/kolla/config/global.conf`` with content:
[database]
max_pool_size = 100

In case the operators want to customize ``policy.json`` file, they should
create a full policy file for specific project in the same directory like above
and Kolla will overwrite default policy file with it. Be aware, with some
projects are keeping full policy file in source code, operators just need to
copy it but with some others are defining default rules in codebase, they have
to generate it.
OpenStack policy customisation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For example to overwrite ``policy.json`` file of Neutron project, the operator
needs to grab ``policy.json`` from Neutron project source code, update rules
and then put it to ``/etc/kolla/config/neutron/policy.json``.
OpenStack services allow customisation of policy. Since the Queens release,
default policy configuration is defined within the source code for each
service, meaning that operators only need to override rules they wish to
change. Projects typically provide documentation on their default policy
configuration, for example, :keystone-doc:`Keystone <configuration/policy>`.

.. note::
Policy can be customised via JSON or YAML files. As of the Wallaby release, the
JSON format is deprecated in favour of YAML. One major benefit of YAML is that
it allows for the use of comments.

Currently kolla-ansible only support JSON and YAML format for policy file.
For example, to customise the Neutron policy in YAML format, the operator
should add the customised rules in ``/etc/kolla/config/neutron/policy.yaml``.

The operator can make these changes after services were already deployed by
using following command:
The operator can make these changes after services have been deployed by using
the following command:

.. code-block:: console

kolla-ansible reconfigure
kolla-ansible deploy

In order to present a user with the correct interface, Horizon includes policy
for other services. Customisations made to those services may need to be
replicated in Horizon. For example, to customise the Neutron policy in YAML
format for Horizon, the operator should add the customised rules in
``/etc/kolla/config/horizon/neutron_policy.yaml``.

IP Address Constrained Environments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
8 changes: 4 additions & 4 deletions doc/source/user/centos8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ is to differentiate CentOS 7 and CentOS 8 container images.
Migrating from CentOS 7 to CentOS 8
-----------------------------------

This section describes how to migrate an existing deployment from CentOS 7 to
CentOS 8.
This section describes how to migrate an existing Train deployment from CentOS
7 to CentOS 8.

There is no supported upgrade path from CentOS 7 to CentOS 8. Since we want to
use the same major versions of CentOS in the host and containers, the hosts
Expand All @@ -65,8 +65,8 @@ level workflow is:
* upgrade services to ensure compatibility with those available in CentOS 8
* migrate hosts to CentOS 8 in batches

Note that in a multi-node system it is possible to have a mix of CentOS 7 and
CentOS 8 hosts while the migration takes place.
Note that in a multi-node system on the Train release it is possible to have a
mix of CentOS 7 and CentOS 8 hosts while the migration takes place.

Service compatibility
~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user/multinode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ IP address and port on which the registry is listening:

docker_custom_config:
registry-mirrors:
- 192.168.1.100:4000
- http://192.168.1.100:4000

.. _edit-inventory:

Expand Down
Loading