Merge "Fix default value of cassandra minimal disk"
diff --git a/README.rst b/README.rst
index e285e13..3507284 100644
--- a/README.rst
+++ b/README.rst
@@ -168,6 +168,7 @@
cache:
engine: redis
host: 127.0.0.1
+ password: guest
port: 6379
members:
- host: 127.0.0.1
@@ -332,6 +333,7 @@
cache:
engine: redis
host: 127.0.0.1
+ password: guest
port: 6379
members:
- host: 127.0.0.1
@@ -473,6 +475,7 @@
cache:
engine: redis
host: 127.0.0.1
+ password: guest
port: 6379
members:
- host: 127.0.0.1
diff --git a/metadata/service/control/cluster.yml b/metadata/service/control/cluster.yml
index dedcc1f..f3e60e2 100644
--- a/metadata/service/control/cluster.yml
+++ b/metadata/service/control/cluster.yml
@@ -9,6 +9,7 @@
opencontrail_identity_version: '2.0'
keystone_admin_password: 'none'
keystone_service_token: 'none'
+ redis_password: 'none'
openstack_region: RegionOne
opencontrail:
common:
@@ -160,6 +161,7 @@
engine: redis
host: ${_param:cluster_local_address}
port: 6379
+ password: ${_param:redis_password}
members:
- host: ${_param:cluster_node01_address}
id: 1
diff --git a/metadata/service/control/control.yml b/metadata/service/control/control.yml
index c3bb5d1..ca7d426 100644
--- a/metadata/service/control/control.yml
+++ b/metadata/service/control/control.yml
@@ -10,6 +10,7 @@
keystone_admin_password: 'none'
keystone_service_token: 'none'
openstack_region: RegionOne
+ redis_password: 'none'
opencontrail:
common:
version: ${_param:opencontrail_version}
@@ -116,6 +117,7 @@
web:
version: ${_param:opencontrail_version}
enabled: True
+ password: ${_param:redis_password}
bind:
address: ${_param:cluster_local_address}
analytics:
diff --git a/metadata/service/control/single.yml b/metadata/service/control/single.yml
index f17d610..42181a4 100644
--- a/metadata/service/control/single.yml
+++ b/metadata/service/control/single.yml
@@ -10,6 +10,7 @@
keystone_admin_password: 'none'
keystone_service_token: 'none'
openstack_region: RegionOne
+ redis_password: 'none'
opencontrail:
common:
version: ${_param:opencontrail_version}
@@ -141,6 +142,7 @@
engine: redis
host: ${_param:single_address}
port: 6379
+ password: ${_param:redis_password}
members:
- host: ${_param:single_address}
id: 1
diff --git a/opencontrail/compute.sls b/opencontrail/compute.sls
index 27839e1..752c469 100644
--- a/opencontrail/compute.sls
+++ b/opencontrail/compute.sls
@@ -159,10 +159,17 @@
{%- else %}
-opencontrail_vrouter_package:
+opencontrail_vrouter_package_vrouter_dkms:
pkg.installed:
- names:
- contrail-vrouter-dkms
+ - require_in:
+ - pkg: opencontrail_compute_packages
+ - pkg: opencontrail_vrouter_package_vrouter_agent
+
+opencontrail_vrouter_package_vrouter_agent:
+ pkg.installed:
+ - names:
- contrail-vrouter-agent
- require_in:
- pkg: opencontrail_compute_packages
diff --git a/opencontrail/files/4.0/config.global.js b/opencontrail/files/4.0/config.global.js
index 47b1dfc..a92a22d 100644
--- a/opencontrail/files/4.0/config.global.js
+++ b/opencontrail/files/4.0/config.global.js
@@ -75,7 +75,7 @@
config.regions = {};
{%- if web.identity.engine != "none" %}
-config.regions.RegionOne = 'http://{{ web.identity.host }}:5000/v{{ web.identity.version }}';
+config.regions['{{ web.identity.get("region", "RegionOne") }}'] = 'http://{{ web.identity.host }}:5000/v{{ web.identity.version }}';
{%- endif %}
/****************************************************************************
@@ -261,7 +261,7 @@
{%- else %}
config.redis_dump_file = '/var/lib/redis/dump-webui.rdb';
{%- endif %}
-config.redis_password = '';
+config.redis_password = '{{ web.cache.get('password', 'guest') }}';
/* Cassandra Server */
config.cassandra = {};
diff --git a/opencontrail/files/4.0/contrail-alarm-gen.conf b/opencontrail/files/4.0/contrail-alarm-gen.conf
index e0c51a3..035367f 100644
--- a/opencontrail/files/4.0/contrail-alarm-gen.conf
+++ b/opencontrail/files/4.0/contrail-alarm-gen.conf
@@ -1,4 +1,5 @@
{%- from "opencontrail/map.jinja" import collector with context %}
+{%- from "opencontrail/map.jinja" import web with context %}
[DEFAULTS]
host_ip = {{ collector.bind.address }}
collectors = {% for member in collector.analytics.members %}{{ member.host }}:8086 {% endfor %}
@@ -30,6 +31,7 @@
[REDIS]
redis_server_port=6379
redis_uve_list = {% for member in collector.database.members %}{{ member.host }}:6379 {% endfor %}
+redis_password = {{ web.get('cache', {}).get('password', 'guest') }}
[SANDESH]
#sandesh_ssl_enable=False
diff --git a/opencontrail/files/4.0/contrail-analytics-api.conf b/opencontrail/files/4.0/contrail-analytics-api.conf
index 98544ae..629862e 100644
--- a/opencontrail/files/4.0/contrail-analytics-api.conf
+++ b/opencontrail/files/4.0/contrail-analytics-api.conf
@@ -1,4 +1,5 @@
{%- from "opencontrail/map.jinja" import collector with context %}
+{%- from "opencontrail/map.jinja" import web with context %}
[DEFAULTS]
host_ip = {{ collector.bind.address }}
collectors = {% for member in collector.database.members %}{{ member.host }}:8086 {% endfor %}
@@ -33,6 +34,7 @@
[REDIS]
redis_query_port = 6379
redis_uve_list = {% for member in collector.database.members %}{{ member.host }}:6379 {% endfor %}
+redis_password = {{ web.get('cache', {}).get('password', 'guest') }}
[SANDESH]
#sandesh_ssl_enable=False
diff --git a/opencontrail/files/4.0/contrail-collector.conf b/opencontrail/files/4.0/contrail-collector.conf
index 35f89cf..6613826 100644
--- a/opencontrail/files/4.0/contrail-collector.conf
+++ b/opencontrail/files/4.0/contrail-collector.conf
@@ -1,4 +1,5 @@
{%- from "opencontrail/map.jinja" import collector with context %}
+{%- from "opencontrail/map.jinja" import web with context %}
#
# Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
#
@@ -115,3 +116,4 @@
[REDIS]
port=6379
server=127.0.0.1
+password={{ web.get('cache', {}).get('password', 'guest') }}
diff --git a/opencontrail/files/4.0/contrail-keystone-auth.conf b/opencontrail/files/4.0/contrail-keystone-auth.conf
index f3aeb94..5912436 100644
--- a/opencontrail/files/4.0/contrail-keystone-auth.conf
+++ b/opencontrail/files/4.0/contrail-keystone-auth.conf
@@ -11,6 +11,7 @@
admin_password={{ config.identity.password }}
admin_tenant_name={{ config.identity.tenant }}
insecure=True
+region_name={{ config.identity.get("region", "RegionOne") }}
{%- if config.cache is defined %}
#memcache_servers=127.0.0.1:11211
memcache_servers={% for member in config.cache.members %}{{ member.host }}:{{ member.port }}{% if not loop.last %},{% endif %}{% endfor %}
diff --git a/opencontrail/files/4.0/contrail-query-engine.conf b/opencontrail/files/4.0/contrail-query-engine.conf
index 3cc9ef6..7ffd52c 100644
--- a/opencontrail/files/4.0/contrail-query-engine.conf
+++ b/opencontrail/files/4.0/contrail-query-engine.conf
@@ -1,4 +1,5 @@
{%- from "opencontrail/map.jinja" import collector with context %}
+{%- from "opencontrail/map.jinja" import web with context %}
#
# Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
#
@@ -31,6 +32,7 @@
[REDIS]
port=6379
server=127.0.0.1
+password = {{ web.get('cache', {}).get('password', 'guest') }}
[SANDESH]
# sandesh_ssl_enable=false
diff --git a/opencontrail/files/4.0/contrail-svc-monitor.conf b/opencontrail/files/4.0/contrail-svc-monitor.conf
index 8d6fb7a..8ebc4ee 100644
--- a/opencontrail/files/4.0/contrail-svc-monitor.conf
+++ b/opencontrail/files/4.0/contrail-svc-monitor.conf
@@ -7,7 +7,6 @@
zk_server_ip={% for member in config.database.members %}{{ member.host }}:2181{% if not loop.last %},{% endif %}{% endfor %}
log_file=/var/log/contrail/contrail-svc-monitor.log
cassandra_server_list={% for member in config.database.members %}{{ member.host }}:9161 {% endfor %}
-region_name=RegionOne
#nova_endpoint_type=publicURL
log_local=1
log_level=SYS_NOTICE
diff --git a/opencontrail/files/4.0/redis.conf b/opencontrail/files/4.0/redis.conf
index db9c433..5c1f1c9 100644
--- a/opencontrail/files/4.0/redis.conf
+++ b/opencontrail/files/4.0/redis.conf
@@ -1,4 +1,5 @@
{%- from "opencontrail/map.jinja" import collector with context %}
+{%- from "opencontrail/map.jinja" import web with context %}
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specify
@@ -193,6 +194,9 @@
# refuse the slave request.
#
# masterauth <master-password>
+{%- if web.get('cache', {}).get("password", None) %}
+masterauth {{ web.cache.password }}
+{%- endif %}
# When a slave loses its connection with the master, or when the replication
# is still in progress, the slave can act in two different ways:
@@ -329,6 +333,9 @@
# use a very strong password otherwise it will be very easy to break.
#
# requirepass foobared
+{%- if web.get('cache', {}).get("password", None) %}
+requirepass {{ web.cache.password }}
+{%- endif %}
# Command renaming.
#
diff --git a/opencontrail/map.jinja b/opencontrail/map.jinja
index 89c7bc1..7fa87e8 100644
--- a/opencontrail/map.jinja
+++ b/opencontrail/map.jinja
@@ -47,7 +47,13 @@
compute:
Debian:
pkgs:
- ['contrail-utils', 'iproute2', 'haproxy', '{{ ['linux-headers-', grains.get('kernelrelease')]|join('') }}']
+ - contrail-utils
+ - iproute2
+ - haproxy
+ - {{ ['linux-headers-', grains.get('kernelrelease')]|join('') }}
+{%- if pillar.nova is defined and pillar.nova.compute is defined and pillar.nova.compute.get('networking', 'default') == "contrail" and pillar.nova.compute.get('version', 'ocata') not in ["juno", "kilo", "liberty", "mitaka", "newton"] %}
+ - contrail-nova-driver
+{%- endif %}
services:
{%- if version < 4.0 %}
['supervisor-vrouter']
diff --git a/opencontrail/meta/fluentd.yml b/opencontrail/meta/fluentd.yml
index b7591b1..2a8ae54 100644
--- a/opencontrail/meta/fluentd.yml
+++ b/opencontrail/meta/fluentd.yml
@@ -43,7 +43,7 @@
type: tail
tag: temp.opencontrail.main.*
{%- if version < 4.0 %}
- path: /var/log/contrail/contrail-api.log, /var/log/contrail/contrail-api-*.log, /var/log/contrail/contrail-analytics-api.log, /var/log/contrail/contrail-alarm-gen*.log, /var/log/contrail/contrail-*-stderr.log, /var/log/contrail/contrail-*svc-monitor*.log, /var/log/contrail/contrail-snmp*.log, /var/log/contrail/contrail-discovery.log, /var/log/contrail/contrail-schema.log, /var/log/contrail/contrail-topology.log, /var/log/contrail/device-manager-zk.log, /var/log/contrail/discovery.log
+ path: /var/log/contrail/contrail-api.log, /var/log/contrail/contrail-api-*.log, /var/log/contrail/contrail-analytics-api.log, /var/log/contrail/contrail-alarm-gen*.log, /var/log/contrail/contrail-*svc-monitor*.log, /var/log/contrail/contrail-snmp*.log, /var/log/contrail/contrail-discovery.log, /var/log/contrail/contrail-schema.log, /var/log/contrail/contrail-topology.log, /var/log/contrail/device-manager-zk.log, /var/log/contrail/discovery.log
{%- else %}
path: /var/log/contrail/contrail-api.log, /var/log/contrail/contrail-api-*.log, /var/log/contrail/contrail-svc-monitor.log, /var/log/contrail/contrail-schema.log, /var/log/contrail/device-manager-zk.log, /var/log/contrail/schema-zk.log, /var/log/contrail/svc-monitor-zk.log, /var/log/contrail/api-0-zk.log
{%- endif %}
@@ -56,6 +56,21 @@
keep_time_key: false
format_firstline: '/^[^ ]+ [^ ]+ [^ ]+/'
format: '/^(?<Timestamp>[^ ]+ [^ ]+ [^ ]+) \[(?<programname>[^ ]+)\]: (?<Payload>.*)/'
+ {%- if version < 4.0 %}
+ contrail_stderr:
+ type: tail
+ tag: temp.opencontrail.stderr.*
+ path: /var/log/contrail/contrail-*-stderr.log
+ path_key: log_location
+ pos_file: {{ positiondb }}/contrail.stderr.pos
+ parser:
+ type: multiline
+ time_format: '%Y-%m-%d %H:%M:%S'
+ time_key: Timestamp
+ keep_time_key: false
+ format_firstline: '/^wokeup and found a line/'
+ format: '/^(?<http_client_ip_address>[\d\.]+)\s\-\s\-\s\[(?<Timestamp>.*)\]\s(?<Payload>\"(?<http_method>[A-Z]+)\s(?<http_url>\S+)\s(?<http_version>[.\/\dHTFSP]+)\"\s(?<http_status>\d{3})\s(?<http_response_size>\d+)\s(?<http_response_time>\d.+))/'
+ {%- endif %}
filter:
enrich_main:
tag: temp.opencontrail.main.**
@@ -66,6 +81,17 @@
value: INFO
- name: Severity
value: 6
+ {%- if version < 4.0 %}
+ enrich_stderr:
+ tag: temp.opencontrail.stderr.**
+ type: record_transformer
+ enable_ruby: true
+ record:
+ - name: severity_label
+ value: ERROR
+ - name: Severity
+ value: 3
+ {%- endif %}
{%- if control.get('enabled', False) %}
enrich_collector:
tag: temp.opencontrail.collector.**