Merge "Replace deprecated docker Salt modules"
diff --git a/metadata/service/client/cluster.yml b/metadata/service/client/cluster.yml
index 8d0595f..3cfd124 100644
--- a/metadata/service/client/cluster.yml
+++ b/metadata/service/client/cluster.yml
@@ -5,6 +5,7 @@
opencontrail_version: 3.0
opencontrail_identity_port: 35357
opencontrail_identity_version: '2.0'
+ openstack_control_address: 127.0.0.1
opencontrail:
client:
enabled: True
diff --git a/metadata/service/control/cluster.yml b/metadata/service/control/cluster.yml
index 749ccfa..c33d67e 100644
--- a/metadata/service/control/cluster.yml
+++ b/metadata/service/control/cluster.yml
@@ -7,6 +7,8 @@
opencontrail_version: 2.2
opencontrail_identity_port: 35357
opencontrail_identity_version: '2.0'
+ keystone_admin_password: 'none'
+ keystone_service_token: 'none'
opencontrail:
common:
version: ${_param:opencontrail_version}
diff --git a/metadata/service/control/control.yml b/metadata/service/control/control.yml
index a29f7dd..7728a2e 100644
--- a/metadata/service/control/control.yml
+++ b/metadata/service/control/control.yml
@@ -7,6 +7,8 @@
opencontrail_version: 2.2
opencontrail_identity_port: 35357
opencontrail_identity_version: '2.0'
+ keystone_admin_password: 'none'
+ keystone_service_token: 'none'
opencontrail:
common:
version: ${_param:opencontrail_version}
diff --git a/opencontrail/collector.sls b/opencontrail/collector.sls
index 5a4958e..8930565 100644
--- a/opencontrail/collector.sls
+++ b/opencontrail/collector.sls
@@ -73,6 +73,16 @@
- template: jinja
{%- endif %}
+{%- if collector.version >= 4.0 %}
+docker-compose-contrail-collector-env:
+ file.managed:
+ - name: /etc/docker/compose/opencontrail/contrail.env
+ - contents:
+ - "CONTRAIL_UID={{ salt['user.info']('contrail').get('uid', 0) }}"
+ - "CONTRAIL_GID={{ salt['user.info']('contrail').get('uid', 0) }}"
+ - makedirs: true
+{%- endif %}
+
{%- if collector.version == 3.0 %}
/etc/contrail/supervisord_analytics_files/contrail-analytics-nodemgr.ini:
diff --git a/opencontrail/control.sls b/opencontrail/control.sls
index cd635bf..266ab5b 100644
--- a/opencontrail/control.sls
+++ b/opencontrail/control.sls
@@ -69,6 +69,16 @@
file.managed:
- source: salt://opencontrail/files/{{ control.version }}/contrail-issu.conf
- template: jinja
+
+docker-compose-contrail-control-env:
+ file.managed:
+ - name: /etc/docker/compose/opencontrail/contrail.env
+ - contents:
+ - "CONTRAIL_UID={{ salt['user.info']('contrail').get('uid', 0) }}"
+ - "CONTRAIL_GID={{ salt['user.info']('contrail').get('uid', 0) }}"
+ - makedirs: true
+ - require:
+ - user: user_contrail
{%- endif %}
{%- if control.version == 3.0 and control.get('dns', {}).get('forwarders', False) %}
diff --git a/opencontrail/database.sls b/opencontrail/database.sls
index 43589be..9b2e06b 100644
--- a/opencontrail/database.sls
+++ b/opencontrail/database.sls
@@ -61,6 +61,13 @@
- template: jinja
- makedirs: true
+docker-compose-contrail-database-env:
+ file.managed:
+ - name: /etc/docker/compose/opencontrail/contrail.env
+ - contents:
+ - "CONTRAIL_UID={{ salt['user.info']('contrail').get('uid', 0) }}"
+ - "CONTRAIL_GID={{ salt['user.info']('contrail').get('uid', 0) }}"
+ - makedirs: true
{% endif %}
{{ database.cassandra_config }}logback.xml:
diff --git a/opencontrail/files/4.0/client_vnc_api_lib.ini b/opencontrail/files/4.0/client_vnc_api_lib.ini
index e193fdb..77e3b92 100644
--- a/opencontrail/files/4.0/client_vnc_api_lib.ini
+++ b/opencontrail/files/4.0/client_vnc_api_lib.ini
@@ -24,3 +24,4 @@
{%- else %}
AUTHN_URL = /v2.0/tokens
{%- endif %}
+{%- endif %}
diff --git a/opencontrail/files/4.0/contrail-config-nodemgr.conf b/opencontrail/files/4.0/contrail-config-nodemgr.conf
index d5d632f..f7f8034 100644
--- a/opencontrail/files/4.0/contrail-config-nodemgr.conf
+++ b/opencontrail/files/4.0/contrail-config-nodemgr.conf
@@ -1,3 +1,8 @@
{%- from "opencontrail/map.jinja" import config with context %}
+{%- if pillar.opencontrail.database is defined and config.version >= 4.0 %}
+[DEFAULTS]
+minimum_diskGB={{ pillar.opencontrail.database.get('minimum_disk', 80) }}
+{%- endif %}
+
[COLLECTOR]
server_list={% for member in config.analytics.members %}{{ member.host }}:8086 {% endfor %}
diff --git a/opencontrail/files/grafana_dashboards/contrail_vrouter_prometheus.json b/opencontrail/files/grafana_dashboards/contrail_vrouter_prometheus.json
index 4ff377e..c5fc292 100644
--- a/opencontrail/files/grafana_dashboards/contrail_vrouter_prometheus.json
+++ b/opencontrail/files/grafana_dashboards/contrail_vrouter_prometheus.json
@@ -95,7 +95,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "sum(http_response_status{service=\"contrail-vrouter\"} == 1) / count(libvirt_up)",
+ "expr": "sum(http_response_status{service=\"contrail-vrouter\"} == 1) / count(http_response_status{service=\"contrail-vrouter\"})",
"format": "time_series",
"intervalFactor": 1,
"refId": "A"
diff --git a/opencontrail/meta/fluentd.yml b/opencontrail/meta/fluentd.yml
index e279825..b7591b1 100644
--- a/opencontrail/meta/fluentd.yml
+++ b/opencontrail/meta/fluentd.yml
@@ -1,5 +1,5 @@
{%- if pillar.get('fluentd', {}).get('agent', {}).get('enabled', False) %}
-{%- from "opencontrail/map.jinja" import control, collector, compute, config, database, web with context %}
+{%- from "opencontrail/map.jinja" import control, collector, compute, config, database, version, web with context %}
{%- set positiondb = pillar.fluentd.agent.dir.positiondb %}
agent:
config:
@@ -11,7 +11,11 @@
contrail_collector:
type: tail
tag: temp.opencontrail.collector.*
+ {%- if version < 4.0 %}
path: /var/log/contrail/contrail-collector.log, /var/log/contrail/contrail-control.log, /var/log/contrail/contrail-dns.log, /var/log/contrail/contrail-query-engine.log
+ {%- else %}
+ path: /var/log/contrail/contrail-control.log, /var/log/contrail/contrail-dns.log
+ {%- endif %}
path_key: log_location
pos_file: {{ positiondb }}/contrail.collector.pos
parser:
@@ -21,6 +25,7 @@
keep_time_key: false
format: '/^(?<Timestamp>[^ ]+ [^ ]+ [^ ]+ [^ ]+)\s+?(?<Hostname>[^ ]+) \[Thread \d+?, Pid (?<Pid>[^ ]+)\]: (?<Payload>.*)$/'
{%- endif %}
+ {%- if version < 4.0 %}
contrail_supervisord:
type: tail
tag: temp.opencontrail.supervisord.*
@@ -33,10 +38,15 @@
time_key: Timestamp
keep_time_key: false
format: '/^(?<Timestamp>[^ ]+ [^ ]+) (?<orig_severity_label>[^ ]+) (?<Payload>.*)$/'
+ {%- endif %}
contrail_main:
type: tail
tag: temp.opencontrail.main.*
- path: /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
+ {%- 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
+ {%- 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 %}
path_key: log_location
pos_file: {{ positiondb }}/contrail.main.pos
parser:
@@ -69,6 +79,7 @@
- name: programname
value: '${ tag_parts[5] }'
{%- endif %}
+ {%- if version < 4.0 %}
enrich_supervisord:
tag: temp.opencontrail.supervisord.**
type: record_transformer
@@ -81,6 +92,7 @@
value: ${ {'BLAT'=>7,'TRAC'=>7,'DEBG'=>7,'INFO'=>6,'WARN'=>4,'ERRO'=>3,'CRIT'=>2}[record['orig_severity_label']].to_i }
- name: programname
value: 'contrail-${ tag_parts[5] }'
+ {%- endif %}
match:
cast_service_tag:
tag: 'temp.opencontrail.**'
@@ -98,7 +110,11 @@
input:
tail_cassandra_log_files:
type: tail
+ {%- if version < 4.0 %}
path: /var/log/cassandra/*.log
+ {% else %}
+ path: /var/log/contrail/cassandra-status.log
+ {% endif %}
tag: temp.cassandra
pos_file: {{ positiondb }}/cassandra.pos
path_key: log_location
@@ -159,6 +175,7 @@
type: relabel
label: default_output
{%- endif %}
+ {%- if version < 4.0 %}
{%- if control.get('enabled', False) %}
ifmap:
input:
@@ -198,6 +215,7 @@
type: relabel
label: default_output
{%- endif %}
+ {%- endif %}
{%- if web.get('enabled', False) and web.get('cache', {}).get('engine', '') == 'redis' %}
redis:
input: