Modified juju Template file to set hugepages, vcpu-pin for DPDK.
-- Removed hugepages from nova-compute config.
-- Changed vcpu_pin config.
-- Updated config flags for both DPDK & No DPDK Case.
-- Updated dpdk_flag at the top level.
-- Set vcpu_pin at defaults/main.yml
Change-Id: I0cb45be08fa67e865ddde7f83997609e60d88cda
diff --git a/roles/juju-setup/defaults/main.yml b/roles/juju-setup/defaults/main.yml
index e01d658..1792108 100644
--- a/roles/juju-setup/defaults/main.yml
+++ b/roles/juju-setup/defaults/main.yml
@@ -14,3 +14,6 @@
site_suffix: "{{ site_name }}.test"
keystone_admin_password: "{{ lookup('password', credentials_dir ~ '/cord_keystone_admin chars=ascii_letters,digits') }}"
+
+enable_dpdk: False
+vcpu_pin_set: "^0,^2"
diff --git a/roles/juju-setup/templates/juju_config.yml.j2 b/roles/juju-setup/templates/juju_config.yml.j2
index e91e5c2..9e41347 100644
--- a/roles/juju-setup/templates/juju_config.yml.j2
+++ b/roles/juju-setup/templates/juju_config.yml.j2
@@ -39,12 +39,20 @@
config-flags: "force_config_drive=always"
console-access-protocol: novnc
network-manager: Neutron
+ {% if enable_dpdk -%}
+ scheduler-default-filters: "RetryFilter,AvailabilityZoneFilter,CoreFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter"
+ {% endif %}
nova-compute:
openstack-origin: "cloud:trusty-kilo"
virt-type: kvm
- config-flags: "firewall_driver=nova.virt.firewall.NoopFirewallDriver"
disable-neutron-security-groups: "True"
+ {% if enable_dpdk -%}
+ config-flags: "firewall_driver=nova.virt.firewall.NoopFirewallDriver,vcpu_pin_set={{ vcpu_pin_set }}"
+ {% else -%}
+ config-flags: "firewall_driver=nova.virt.firewall.NoopFirewallDriver"
+ {% endif %}
+
nrpe: {}