Skip to content

Commit 05e82de

Browse files
authored
Merge pull request #146 from openstack/stable/victoria
Sync upstream - Stable/victoria
2 parents 2a28e99 + 1b40f0d commit 05e82de

File tree

24 files changed

+177
-79
lines changed

24 files changed

+177
-79
lines changed

.ansible-lint

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1+
---
12
use_default_rules: true
23
skip_list:
3-
# [E701] galaxy_info missing in metadata
4+
# [E701] galaxy_info missing in metadata
45
- '701'
5-
# [E602] https://github.com/ansible/ansible-lint/issues/457
6+
# [E602] https://github.com/ansible/ansible-lint/issues/457
67
- '602'
7-
# [E301] Commands should not change things if nothing needs doing
8-
# TODO(mnasiadka): Fix tasks that fail this check in a later iteration
8+
# [E301] Commands should not change things if nothing needs doing
9+
# TODO(mnasiadka): Fix tasks that fail this check in a later iteration
910
- '301'
10-
# [E503] Tasks that run when changed should likely be handlers
11-
# TODO(mnasiadka): Rework baremetal role to do handlers instead of when: *.changed
11+
# [E503] Tasks that run when changed should likely be handlers
12+
# TODO(mnasiadka): Rework baremetal role to do handlers instead of when: *.changed
1213
- '503'
13-
# [E106] Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern
14+
# [E106] Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern
1415
- '106'
15-
# [E208] permissions not mentioned
16-
# FIXME(mnasiadka): Rework file/template to include permissions
16+
# [E208] permissions not mentioned
17+
# FIXME(mnasiadka): Rework file/template to include permissions
1718
- '208'
19+
# [unnamed-task] All tasks should be named
20+
# FIXME(mgoddard): Add names to all tasks
21+
- unnamed-task

ansible/action_plugins/merge_configs.py

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@
4646
default: None
4747
required: True
4848
type: str
49+
whitespace:
50+
description:
51+
- Whether whitespace characters should be used around equal signs
52+
default: True
53+
required: False
54+
type: bool
4955
author: Sam Yaple
5056
'''
5157

@@ -67,10 +73,11 @@
6773

6874
class OverrideConfigParser(iniparser.BaseParser):
6975

70-
def __init__(self):
76+
def __init__(self, whitespace=True):
7177
self._cur_sections = collections.OrderedDict()
7278
self._sections = collections.OrderedDict()
7379
self._cur_section = None
80+
self._whitespace = ' ' if whitespace else ''
7481

7582
def assignment(self, key, value):
7683
if self._cur_section is None:
@@ -107,12 +114,20 @@ def write(self, fp):
107114
def write_key_value(key, values):
108115
for v in values:
109116
if not v:
110-
fp.write('{} =\n'.format(key))
117+
fp.write('{key}{ws}=\n'.format(
118+
key=key, ws=self._whitespace))
111119
for index, value in enumerate(v):
112120
if index == 0:
113-
fp.write('{} = {}\n'.format(key, value))
121+
fp.write('{key}{ws}={ws}{value}\n'.format(
122+
key=key,
123+
ws=self._whitespace,
124+
value=value))
114125
else:
115-
fp.write('{} {}\n'.format(len(key) * ' ', value))
126+
indent_size = len(key) + len(self._whitespace) * 2 + 1
127+
ws_indent = ' ' * indent_size
128+
fp.write('{ws_indent}{value}\n'.format(
129+
ws_indent=ws_indent,
130+
value=value))
116131

117132
def write_section(section):
118133
for key, values in section.items():
@@ -158,7 +173,8 @@ def run(self, tmp=None, task_vars=None):
158173
if not isinstance(sources, list):
159174
sources = [sources]
160175

161-
config = OverrideConfigParser()
176+
config = OverrideConfigParser(
177+
whitespace=self._task.args.get('whitespace', True))
162178

163179
for source in sources:
164180
self.read_config(source, config)
@@ -179,6 +195,7 @@ def run(self, tmp=None, task_vars=None):
179195

180196
new_task = self._task.copy()
181197
new_task.args.pop('sources', None)
198+
new_task.args.pop('whitespace', None)
182199

183200
new_task.args.update(
184201
dict(

ansible/roles/cinder/templates/cinder-wsgi.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ LogLevel info
2525
<IfVersion >= 2.4>
2626
ErrorLogFormat "%{cu}t %M"
2727
</IfVersion>
28-
ErrorLog /var/log/kolla/cinder/cinder-api.log
28+
ErrorLog /var/log/kolla/cinder/cinder-api-error.log
2929
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
3030
CustomLog /var/log/kolla/cinder/cinder-api-access.log logformat
3131
{% if cinder_enable_tls_backend | bool %}

ansible/roles/cinder/templates/cinder.conf.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
debug = {{ cinder_logging_debug }}
33

44
log_dir = /var/log/kolla/cinder
5+
{% if service_name == "cinder-api" %}
6+
log_file = cinder-api.log
7+
{% endif %}
58
use_forwarded_for = true
69

710
# Set use_stderr to False or the logs will also be sent to stderr
File renamed without changes.

ansible/roles/nova-cell/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ haproxy_nova_serialconsole_proxy_tunnel_timeout: "10m"
415415
####################
416416

417417
nova_logging_debug: "{{ openstack_logging_debug }}"
418+
nova_libvirt_logging_debug: "{{ nova_logging_debug }}"
418419

419420
openstack_nova_auth: "{{ openstack_auth }}"
420421

ansible/roles/nova-cell/tasks/external_ceph.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
enabled: "{{ cinder_backend_ceph }}"
137137
notify:
138138
- Restart nova-libvirt container
139+
no_log: True
139140

140141
- name: Ensuring config directory has correct owner and permission
141142
become: true

ansible/roles/nova-cell/templates/libvirtd.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ auth_tcp = "none"
1212
tcp_port = "{{ nova_libvirt_port }}"
1313
ca_file = ""
1414
{% endif %}
15-
{% if nova_logging_debug | bool %}
15+
{% if nova_libvirt_logging_debug | bool %}
1616
log_level = 1
1717
log_outputs = "1:file:/var/log/kolla/libvirt/libvirtd.log"
1818
{% else %}

ansible/roles/octavia/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,4 +237,4 @@ octavia_amp_network:
237237
enable_dhcp: yes
238238

239239
# Octavia management network subnet CIDR.
240-
octavia_amp_network_cidr: 10.0.0.0/24
240+
octavia_amp_network_cidr: 10.1.0.0/24

ansible/roles/prechecks/tasks/timesync_checks.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@
55
register: timedatectl_status
66
changed_when: false
77

8-
- name: Fail if no (S)NTP service is running
9-
fail:
10-
msg: >-
11-
timedatectl does not see any (S)NTP service running.
12-
Please ensure you have (S)NTP client working.
13-
when:
14-
- "'service: active' not in timedatectl_status.stdout"
15-
# Ubuntu Bionic (18.04)
16-
- "'service active: yes' not in timedatectl_status.stdout"
17-
188
- name: Fail if the clock is not synchronized
199
fail:
2010
msg: >-

0 commit comments

Comments
 (0)