Merge "added cors support into nova controller"
diff --git a/README.rst b/README.rst
index 3b769f4..252f845 100644
--- a/README.rst
+++ b/README.rst
@@ -368,6 +368,24 @@
# Then add your custom filter on the end (make sure to include all other ones that you need as well)
scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
+Hardware Trip/Unmap Support
+---------------------------
+
+To enable TRIM support for ephemeral images (thru nova managed images), libvirt has this option.
+
+.. code-block:: yaml
+
+ nova:
+ compute:
+ libvirt:
+ hw_disk_discard: unmap
+
+In order to actually utilize this feature, the following metadata must be set on the image as well, so the SCSI unmap is supported.
+
+.. code-block:: bash
+
+ glance image-update --property hw_scsi_model=virtio-scsi <image>
+ glance image-update --property hw_disk_bus=scsi <image>
Documentation and Bugs
======================
diff --git a/nova/controller.sls b/nova/controller.sls
index 556a42e..c212413 100644
--- a/nova/controller.sls
+++ b/nova/controller.sls
@@ -98,6 +98,11 @@
- pkg: nova_controller_packages
- pkg: nova_placement_package
+placement_config:
+ file.symlink:
+ - name: /etc/apache2/sites-enabled/nova-placement-api.conf
+ - target: /etc/apache2/sites-available/nova-placement-api.conf
+
nova_cell_create:
cmd.run:
- name: 'su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova'
diff --git a/nova/files/grafana_dashboards/nova_influxdb.json b/nova/files/grafana_dashboards/nova_influxdb.json
index 5c2b325..52c1757 100644
--- a/nova/files/grafana_dashboards/nova_influxdb.json
+++ b/nova/files/grafana_dashboards/nova_influxdb.json
@@ -2501,7 +2501,7 @@
],
"measurement": "openstack_nova_service",
"policy": "default",
- "query": "SELECT az as \"AZ\", state, last(value) FROM \"openstack_nova_service\" WHERE $timeFilter AND \"environment_label\" =~ /^$environment$/and service = 'compute' GROUP BY time($interval), hostname",
+ "query": "SELECT az as \"AZ\", state, last(value) FROM \"openstack_nova_service\" WHERE $timeFilter AND \"environment_label\" =~ /^$environment$/and service = 'compute' GROUP BY time($interval), hostname fill(null)",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
@@ -2984,7 +2984,7 @@
],
"measurement": "openstack_nova_service",
"policy": "default",
- "query": "SELECT az as \"AZ\", state, last(value) FROM \"openstack_nova_service\" WHERE $timeFilter AND \"environment_label\" =~ /^$environment$/and service = 'scheduler' GROUP BY time($interval), hostname",
+ "query": "SELECT az as \"AZ\", state, last(value) FROM \"openstack_nova_service\" WHERE $timeFilter AND \"environment_label\" =~ /^$environment$/and service = 'scheduler' GROUP BY time($interval), hostname fill(null)",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
@@ -3467,7 +3467,7 @@
],
"measurement": "openstack_nova_service",
"policy": "default",
- "query": "SELECT az as \"AZ\", state, last(value) FROM \"openstack_nova_service\" WHERE $timeFilter AND \"environment_label\" =~ /^$environment$/and service = 'conductor' GROUP BY time($interval), hostname",
+ "query": "SELECT az as \"AZ\", state, last(value) FROM \"openstack_nova_service\" WHERE $timeFilter AND \"environment_label\" =~ /^$environment$/and service = 'conductor' GROUP BY time($interval), hostname fill(null)",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
@@ -3950,7 +3950,7 @@
],
"measurement": "openstack_nova_service",
"policy": "default",
- "query": "SELECT az as \"AZ\", state, last(value) FROM \"openstack_nova_service\" WHERE $timeFilter AND \"environment_label\" =~ /^$environment$/and service = 'cert' GROUP BY time($interval), hostname",
+ "query": "SELECT az as \"AZ\", state, last(value) FROM \"openstack_nova_service\" WHERE $timeFilter AND \"environment_label\" =~ /^$environment$/and service = 'cert' GROUP BY time($interval), hostname fill(null)",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
@@ -4433,7 +4433,7 @@
],
"measurement": "openstack_nova_service",
"policy": "default",
- "query": "SELECT az as \"AZ\", state, last(value) FROM \"openstack_nova_service\" WHERE $timeFilter AND \"environment_label\" =~ /^$environment$/and service = 'consoleauth' GROUP BY time($interval), hostname",
+ "query": "SELECT az as \"AZ\", state, last(value) FROM \"openstack_nova_service\" WHERE $timeFilter AND \"environment_label\" =~ /^$environment$/and service = 'consoleauth' GROUP BY time($interval), hostname fill(null)",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
@@ -4589,7 +4589,7 @@
"valueMaps": [
{
"op": "=",
- "text": "0",
+ "text": "N/A",
"value": "null"
}
],
@@ -4639,18 +4639,12 @@
"$interval"
],
"type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
}
],
"groupByTags": [],
"measurement": "openstack_nova_instances",
"policy": "default",
- "query": "SELECT max(\"value\") FROM \"openstack_nova_instances\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'active' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "query": "SELECT max(\"value\") FROM \"openstack_nova_instances\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'active' AND $timeFilter GROUP BY time($interval)",
"rawQuery": false,
"refId": "A",
"resultFormat": "time_series",
@@ -4832,7 +4826,7 @@
"valueMaps": [
{
"op": "=",
- "text": "0",
+ "text": "N/A",
"value": "null"
}
],
@@ -4881,18 +4875,12 @@
"$interval"
],
"type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
}
],
"groupByTags": [],
"measurement": "openstack_nova_instances",
"policy": "default",
- "query": "SELECT max(\"value\") FROM \"openstack_nova_instances\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'error' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "query": "SELECT max(\"value\") FROM \"openstack_nova_instances\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'error' AND $timeFilter GROUP BY time($interval)",
"rawQuery": false,
"refId": "A",
"resultFormat": "time_series",
@@ -5122,18 +5110,12 @@
"$interval"
],
"type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
}
],
"groupByTags": [],
"measurement": "openstack_nova_instance_creation_time",
"policy": "default",
- "query": "SELECT mean(\"value\") FROM \"openstack_nova_instance_creation_time\" WHERE \"environment_label\" =~ /^$environment$/ AND $timeFilter GROUP BY time($interval) fill(0)",
+ "query": "SELECT mean(\"value\") FROM \"openstack_nova_instance_creation_time\" WHERE \"environment_label\" =~ /^$environment$/ AND $timeFilter GROUP BY time($interval)",
"rawQuery": false,
"refId": "A",
"resultFormat": "time_series",
@@ -5171,18 +5153,12 @@
"$interval"
],
"type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
}
],
"groupByTags": [],
"measurement": "openstack_nova_instance_creation_time",
"policy": "default",
- "query": "SELECT max(\"value\") FROM \"openstack_nova_instance_creation_time\" WHERE \"environment_label\" =~ /^$environment$/ AND $timeFilter GROUP BY time($interval) fill(0)",
+ "query": "SELECT max(\"value\") FROM \"openstack_nova_instance_creation_time\" WHERE \"environment_label\" =~ /^$environment$/ AND $timeFilter GROUP BY time($interval)",
"rawQuery": false,
"refId": "B",
"resultFormat": "time_series",
@@ -5220,18 +5196,12 @@
"$interval"
],
"type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
}
],
"groupByTags": [],
"measurement": "openstack_nova_instance_creation_time",
"policy": "default",
- "query": "SELECT min(\"value\") FROM \"openstack_nova_instance_creation_time\" WHERE \"environment_label\" =~ /^$environment$/ AND $timeFilter GROUP BY time($interval) fill(0)",
+ "query": "SELECT min(\"value\") FROM \"openstack_nova_instance_creation_time\" WHERE \"environment_label\" =~ /^$environment$/ AND $timeFilter GROUP BY time($interval)",
"rawQuery": false,
"refId": "C",
"resultFormat": "time_series",
diff --git a/nova/files/mitaka/nova-compute.conf.Debian b/nova/files/mitaka/nova-compute.conf.Debian
index 33ccb4a..ba9a0f0 100644
--- a/nova/files/mitaka/nova-compute.conf.Debian
+++ b/nova/files/mitaka/nova-compute.conf.Debian
@@ -126,6 +126,9 @@
libvirt_inject_password=false
libvirt_inject_key=false
{%- endif %}
+{%- if compute.libvirt.hw_disk_discard is defined %}
+hw_disk_discard={{ compute.libvirt.hw_disk_discard }}
+{%- endif %}
{%- if compute.get('libvirt', {}).uri is defined %}
connection_uri={{ compute.libvirt.uri }}
diff --git a/nova/files/newton/nova-compute.conf.Debian b/nova/files/newton/nova-compute.conf.Debian
index b0ce077..f49529f 100644
--- a/nova/files/newton/nova-compute.conf.Debian
+++ b/nova/files/newton/nova-compute.conf.Debian
@@ -140,6 +140,9 @@
libvirt_inject_password=false
libvirt_inject_key=false
{%- endif %}
+{%- if compute.libvirt.hw_disk_discard is defined %}
+hw_disk_discard={{ compute.libvirt.hw_disk_discard }}
+{%- endif %}
{%- if compute.get('libvirt', {}).uri is defined %}
connection_uri={{ compute.libvirt.uri }}
diff --git a/nova/files/ocata/nova-compute.conf.Debian b/nova/files/ocata/nova-compute.conf.Debian
index 4cfc6af..cc00305 100644
--- a/nova/files/ocata/nova-compute.conf.Debian
+++ b/nova/files/ocata/nova-compute.conf.Debian
@@ -6482,6 +6482,9 @@
# (string value)
# Allowed values: ignore, unmap
#hw_disk_discard=<None>
+{%- if compute.libvirt.hw_disk_discard is defined %}
+hw_disk_discard={{ compute.libvirt.hw_disk_discard }}
+{%- endif %}
# DEPRECATED: Allows image information files to be stored in non-standard
# locations (string value)
diff --git a/nova/map.jinja b/nova/map.jinja
index a1f7f26..4d56253 100644
--- a/nova/map.jinja
+++ b/nova/map.jinja
@@ -47,6 +47,7 @@
'libvirt_service': 'libvirt-bin',
'bind': compute_bind_defaults,
'debug': false,
+ 'libvirt': [],
'notification': false,
'availability_zone': None,
'aggregates': [],
@@ -66,6 +67,7 @@
'libvirt_service': 'libvirtd',
'bind': compute_bind_defaults,
'debug': false,
+ 'libvirt': [],
'notification': false,
'availability_zone': None,
'identity': {
diff --git a/nova/meta/heka.yml b/nova/meta/heka.yml
index 7452e9b..6121039 100644
--- a/nova/meta/heka.yml
+++ b/nova/meta/heka.yml
@@ -433,6 +433,7 @@
{%- for nova_service in ('cert', 'consoleauth', 'conductor', 'scheduler') %}
- nova_{{ nova_service }}
{%- endfor %}
+ - haproxy_nova-control
dimension:
cluster_name: nova-control
nagios_host: 00-top-clusters
diff --git a/tests/pillar/compute_cluster.sls b/tests/pillar/compute_cluster.sls
index bd61ecc..c3a2485 100644
--- a/tests/pillar/compute_cluster.sls
+++ b/tests/pillar/compute_cluster.sls
@@ -64,3 +64,5 @@
port: 11211
- host: 127.0.2.1
port: 11211
+ libvirt:
+ hw_disk_discard: unmap