diff --git a/deployment/puppet/osnailyfacter/modular/netconfig/netconfig.pp b/deployment/puppet/osnailyfacter/modular/netconfig/netconfig.pp index ab539558c1..87f87dee17 100644 --- a/deployment/puppet/osnailyfacter/modular/netconfig/netconfig.pp +++ b/deployment/puppet/osnailyfacter/modular/netconfig/netconfig.pp @@ -56,6 +56,11 @@ if hiera('set_rps', true) { value => cpu_affinity_hex($::processorcount), sysfs => '/sys/class/net/*/queues/rx-*/rps_cpus', exclude => '/sys/class/net/lo/*', + } +} else { + sysfs_config_value { 'rps_cpus' : + ensure => 'absent', + name => '/etc/sysfs.d/rps_cpus.conf', } } @@ -67,6 +72,11 @@ if hiera('set_xps', true) { sysfs => '/sys/class/net/*/queues/tx-*/xps_cpus', exclude => '/sys/class/net/lo/*', } +} else { + sysfs_config_value { 'xps_cpus' : + ensure => 'absent', + name => '/etc/sysfs.d/xps_cpus.conf', + } } if !defined(Package['irqbalance']) { diff --git a/tests/noop/spec/hosts/netconfig/netconfig_spec.rb b/tests/noop/spec/hosts/netconfig/netconfig_spec.rb index 8176f7dc17..de8051dd7a 100644 --- a/tests/noop/spec/hosts/netconfig/netconfig_spec.rb +++ b/tests/noop/spec/hosts/netconfig/netconfig_spec.rb @@ -38,6 +38,11 @@ describe manifest do 'exclude' => '/sys/class/net/lo/*', )} + else + it { should contain_sysfs_config_value('rps_cpus').with( + 'ensure' => 'absent', + 'name' => '/etc/sysfs.d/rps_cpus.conf', + )} end if set_xps it { should contain_sysfs_config_value('xps_cpus').with( @@ -46,6 +51,11 @@ describe manifest do 'sysfs' => '/sys/class/net/*/queues/tx-*/xps_cpus', 'exclude' => '/sys/class/net/lo/*', )} + else + it { should contain_sysfs_config_value('xps_cpus').with( + 'ensure' => 'absent', + 'name' => '/etc/sysfs.d/xps_cpus.conf', + )} end if enable_dpdk it 'should set dpdk-specific options for OVS' do