Merge "Avoid parallel discover_hosts (nova-related race condition)"

This commit is contained in:
Zuul 2019-06-24 13:08:22 +00:00 committed by Gerrit Code Review
commit 03976399f0
2 changed files with 7 additions and 3 deletions

View File

@ -23,15 +23,16 @@
- nova_compute_services is success - nova_compute_services is success
- nova_compute_services.stdout | from_json | length != 0 - nova_compute_services.stdout | from_json | length != 0
- name: Discovering nova hosts # TODO(yoctozepto): no need to do --by-service if ironic not used
- name: Discover nova hosts
become: true become: true
command: > command: >
docker exec nova_api nova-manage cell_v2 discover_hosts --by-service docker exec nova_api nova-manage cell_v2 discover_hosts --by-service
register: discover_hosts
changed_when: False changed_when: False
run_once: True run_once: True
delegate_to: "{{ groups['nova-api'][0] }}" delegate_to: "{{ groups['nova-api'][0] }}"
# NOTE(yoctozepto): SIGHUP is probably unnecessary
- name: Refresh cell cache in nova scheduler - name: Refresh cell cache in nova scheduler
become: true become: true
command: docker kill --signal HUP nova_scheduler command: docker kill --signal HUP nova_scheduler

View File

@ -254,7 +254,10 @@ secure_proxy_ssl_header = HTTP_X_FORWARDED_PROTO
[scheduler] [scheduler]
max_attempts = 10 max_attempts = 10
discover_hosts_in_cells_interval = 60 # NOTE(yoctozepto): kolla-ansible handles cell mapping by itself on each deploy
# periodic run must be disabled to avoid random failures (where both try to map)
# -1 is default and means periodic discovery is disabled
discover_hosts_in_cells_interval = -1
{% if enable_nova_fake | bool %} {% if enable_nova_fake | bool %}
default_filters = RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter default_filters = RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter