Merge pull request #11 from damjanek/master

Create aggregates + add hosts to aggregates
diff --git a/README.rst b/README.rst
index 8ced57b..d6d5dd8 100644
--- a/README.rst
+++ b/README.rst
@@ -338,6 +338,21 @@
         - path: /mnt/hugepages_1GB
         - path: /mnt/hugepages_2MB
 
+Custom Scheduler filters
+------------------------
+
+If you have a custom filter, that needs to be included in the scheduler, then you can include it like so:
+
+.. code-block:: yaml
+
+  nova:
+    controller:
+      scheduler_custom_filters:
+      - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
+
+      # 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"
+
 
 Documentation and Bugs
 ======================
diff --git a/nova/files/juno/nova-controller.conf.Debian b/nova/files/juno/nova-controller.conf.Debian
index 8e8d138..0415ff6 100644
--- a/nova/files/juno/nova-controller.conf.Debian
+++ b/nova/files/juno/nova-controller.conf.Debian
@@ -70,7 +70,6 @@
 security_group_api = neutron
 
 rpc_backend = nova.rpc.impl_kombu
-start_guests_on_host_boot=truembu
 
 {%- if controller.cache is defined %}
 memcached_servers={%- for member in controller.cache.members %}{{ member.host }}:11211{% if not loop.last %},{% endif %}{%- endfor %}
@@ -114,7 +113,6 @@
 {%- endif %}
 
 allow_resize_to_same_host=True
-start_guests_on_host_boot=true
 
 rpc_cast_timeout = 30
 rpc_conn_pool_size = 300
diff --git a/nova/files/kilo/nova-controller.conf.Debian b/nova/files/kilo/nova-controller.conf.Debian
index e61da50..99dfe00 100644
--- a/nova/files/kilo/nova-controller.conf.Debian
+++ b/nova/files/kilo/nova-controller.conf.Debian
@@ -72,7 +72,6 @@
 security_group_api = neutron
 
 rpc_backend = nova.rpc.impl_kombu
-start_guests_on_host_boot=truembu
 
 {%- if controller.cache is defined %}
 memcached_servers={%- for member in controller.cache.members %}{{ member.host }}:11211{% if not loop.last %},{% endif %}{%- endfor %}
@@ -103,7 +102,6 @@
 {%- endif %}
 
 allow_resize_to_same_host=True
-start_guests_on_host_boot=true
 
 rpc_cast_timeout = 30
 rpc_conn_pool_size = 300
diff --git a/nova/files/liberty/nova-compute.conf.Debian b/nova/files/liberty/nova-compute.conf.Debian
index 4df50c7..283f9c4 100644
--- a/nova/files/liberty/nova-compute.conf.Debian
+++ b/nova/files/liberty/nova-compute.conf.Debian
@@ -92,7 +92,7 @@
 block_device_allocate_retries=600
 block_device_allocate_retries_interval=10
 
-resume_guests_state_on_host_boot = True
+resume_guests_state_on_host_boot = {{ compute.get('resume_guests_state_on_host_boot', True) }}
 service_down_time = 90
 
 {% if pillar.ceilometer is defined %}
@@ -125,8 +125,6 @@
 notification_driver = messagingv2
 {%- endif %}
 
-resume_guests_state_on_host_boot = {{ compute.get('resume_guests_state_on_host_boot', False) }}
-
 {%- if compute.identity.get('version', 2) == 2 %}
 
 [keystone_authtoken]
diff --git a/nova/files/liberty/nova-controller.conf.Debian b/nova/files/liberty/nova-controller.conf.Debian
index bf7d9dd..1109fa4 100644
--- a/nova/files/liberty/nova-controller.conf.Debian
+++ b/nova/files/liberty/nova-controller.conf.Debian
@@ -73,7 +73,6 @@
 security_group_api = neutron
 
 rpc_backend = nova.rpc.impl_kombu
-start_guests_on_host_boot=true
 
 {%- if controller.cache is defined %}
 memcached_servers={%- for member in controller.cache.members %}{{ member.host }}:11211{% if not loop.last %},{% endif %}{%- endfor %}
@@ -105,7 +104,6 @@
 {%- endif %}
 
 allow_resize_to_same_host=True
-start_guests_on_host_boot=true
 
 rpc_cast_timeout = 30
 rpc_conn_pool_size = 300
diff --git a/nova/files/mitaka/nova-compute.conf.Debian b/nova/files/mitaka/nova-compute.conf.Debian
index c2f522d..33ccb4a 100644
--- a/nova/files/mitaka/nova-compute.conf.Debian
+++ b/nova/files/mitaka/nova-compute.conf.Debian
@@ -56,7 +56,7 @@
 block_device_allocate_retries=600
 block_device_allocate_retries_interval=10
 
-resume_guests_state_on_host_boot = True
+resume_guests_state_on_host_boot = {{ compute.get('resume_guests_state_on_host_boot', True) }}
 service_down_time = 90
 
 {% if pillar.ceilometer is defined %}
@@ -72,8 +72,6 @@
 notify_on_state_change = vm_and_task_state
 {%- endif %}
 
-resume_guests_state_on_host_boot = {{ compute.get('resume_guests_state_on_host_boot', False) }}
-
 [oslo_concurrency]
 lock_path = /var/lib/nova/tmp
 
diff --git a/nova/files/mitaka/nova-controller.conf.Debian b/nova/files/mitaka/nova-controller.conf.Debian
index 2711cb8..094ec5d 100644
--- a/nova/files/mitaka/nova-controller.conf.Debian
+++ b/nova/files/mitaka/nova-controller.conf.Debian
@@ -22,6 +22,9 @@
 scheduler_default_filters = {{ controller.scheduler_default_filters }}
 scheduler_available_filters = nova.scheduler.filters.all_filters
 scheduler_available_filters = nova.scheduler.filters.pci_passthrough_filter.PciPassthroughFilter
+{% for filter in controller.get('scheduler_custom_filters', []) %}
+scheduler_available_filters = {{ filter }}
+{% endif %}
 scheduler_driver = filter_scheduler
 allow_resize_to_same_host = True
 osapi_max_limit = {{ controller.osapi_max_limit|default('1000') }}
@@ -58,7 +61,6 @@
 {%- endif %}
 
 allow_resize_to_same_host=True
-start_guests_on_host_boot=true
 
 rpc_cast_timeout = 30
 rpc_response_timeout = 3600
diff --git a/nova/files/newton/nova-compute.conf.Debian b/nova/files/newton/nova-compute.conf.Debian
index 2c1a7a0..b0ce077 100644
--- a/nova/files/newton/nova-compute.conf.Debian
+++ b/nova/files/newton/nova-compute.conf.Debian
@@ -58,7 +58,7 @@
 block_device_allocate_retries=600
 block_device_allocate_retries_interval=10
 
-resume_guests_state_on_host_boot = True
+resume_guests_state_on_host_boot = {{ compute.get('resume_guests_state_on_host_boot', True) }}
 service_down_time = 90
 
 {%- if compute.message_queue.members is defined %}
@@ -86,8 +86,6 @@
 notify_on_state_change = vm_and_task_state
 {%- endif %}
 
-resume_guests_state_on_host_boot = {{ compute.get('resume_guests_state_on_host_boot', False) }}
-
 [oslo_concurrency]
 lock_path = /var/lib/nova/tmp
 
diff --git a/nova/files/newton/nova-controller.conf.Debian b/nova/files/newton/nova-controller.conf.Debian
index 7f87aa4..c8382d7 100644
--- a/nova/files/newton/nova-controller.conf.Debian
+++ b/nova/files/newton/nova-controller.conf.Debian
@@ -62,8 +62,6 @@
 
 
 allow_resize_to_same_host=True
-start_guests_on_host_boot=true
-resume_guests_state_on_host_boot=true
 
 rpc_cast_timeout = 30
 rpc_response_timeout = 3600
diff --git a/nova/files/newton/nova-controller.conf.RedHat b/nova/files/newton/nova-controller.conf.RedHat
index 7f87aa4..c8382d7 100644
--- a/nova/files/newton/nova-controller.conf.RedHat
+++ b/nova/files/newton/nova-controller.conf.RedHat
@@ -62,8 +62,6 @@
 
 
 allow_resize_to_same_host=True
-start_guests_on_host_boot=true
-resume_guests_state_on_host_boot=true
 
 rpc_cast_timeout = 30
 rpc_response_timeout = 3600
diff --git a/nova/files/ocata/nova-compute.conf.Debian b/nova/files/ocata/nova-compute.conf.Debian
index 55d89a2..7039384 100644
--- a/nova/files/ocata/nova-compute.conf.Debian
+++ b/nova/files/ocata/nova-compute.conf.Debian
@@ -669,7 +669,7 @@
 # resume their state each time the compute node boots or restarts.
 #  (boolean value)
 #resume_guests_state_on_host_boot=false
-resume_guests_state_on_host_boot=true
+resume_guests_state_on_host_boot={{ compute.get('resume_guests_state_on_host_boot', True) }}
 
 #
 # Number of times to retry network allocation. It is required to attempt network
diff --git a/nova/files/ocata/nova-controller.conf.Debian b/nova/files/ocata/nova-controller.conf.Debian
index ef773b1..473d42c 100644
--- a/nova/files/ocata/nova-controller.conf.Debian
+++ b/nova/files/ocata/nova-controller.conf.Debian
@@ -652,14 +652,6 @@
 #live_migration_retry_count=30
 
 #
-# This option specifies whether to start guests that were running before the
-# host rebooted. It ensures that all of the instances on a Nova compute node
-# resume their state each time the compute node boots or restarts.
-#  (boolean value)
-#resume_guests_state_on_host_boot=false
-resume_guests_state_on_host_boot=true
-
-#
 # Number of times to retry network allocation. It is required to attempt network
 # allocation retries if the virtual interface plug fails.
 #