From 38d49a4b6e46fbac082057646323ee3801a2475b Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 15 Sep 2024 22:44:22 +0900 Subject: [PATCH] Drop redundant defaults of state_path These exactly match the service default value. Change-Id: I652adf06d4dfca3fcd79c1c2d8113c3b0b9b22e5 --- manifests/agents/dhcp.pp | 5 +++-- manifests/agents/ml2/ovn.pp | 4 ++-- manifests/agents/ovn_metadata.pp | 4 ++-- spec/classes/neutron_agents_dhcp_spec.rb | 3 +-- spec/classes/neutron_agents_ml2_ovn_spec.rb | 2 +- spec/classes/neutron_agents_ovn_metadata_spec.rb | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/manifests/agents/dhcp.pp b/manifests/agents/dhcp.pp index d25274014..597a2e062 100644 --- a/manifests/agents/dhcp.pp +++ b/manifests/agents/dhcp.pp @@ -20,7 +20,8 @@ # # [*state_path*] # (optional) Where to store dnsmasq state files. This directory must be -# writable by the user executing the agent. Defaults to '/var/lib/neutron'. +# writable by the user executing the agent. +# Defaults to $facts['os_service_default']. # # [*resync_interval*] # (optional) The DHCP agent will resync its state with Neutron to recover @@ -130,7 +131,7 @@ class neutron::agents::dhcp ( Boolean $enabled = true, Boolean $manage_service = true, $debug = $facts['os_service_default'], - $state_path = '/var/lib/neutron', + $state_path = $facts['os_service_default'], $resync_interval = $facts['os_service_default'], $interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver', $dhcp_driver = $facts['os_service_default'], diff --git a/manifests/agents/ml2/ovn.pp b/manifests/agents/ml2/ovn.pp index f9bf4d8d6..073adbf4a 100644 --- a/manifests/agents/ml2/ovn.pp +++ b/manifests/agents/ml2/ovn.pp @@ -97,7 +97,7 @@ # [*state_path*] # (optional) Where to store state files. This directory must be writable # by the user executing the agent -# Defaults to '/var/lib/neutron'. +# Defaults to $facts['os_service_default']. # # [*purge_config*] # (optional) Whether to set only the specified config options @@ -126,7 +126,7 @@ class neutron::agents::ml2::ovn ( $ovsdb_probe_interval = $facts['os_service_default'], $root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf', $root_helper_daemon = $facts['os_service_default'], - $state_path = '/var/lib/neutron', + $state_path = $facts['os_service_default'], Boolean $purge_config = false, ) { diff --git a/manifests/agents/ovn_metadata.pp b/manifests/agents/ovn_metadata.pp index d3819b965..87da09501 100644 --- a/manifests/agents/ovn_metadata.pp +++ b/manifests/agents/ovn_metadata.pp @@ -112,7 +112,7 @@ # [*state_path*] # (optional) Where to store state files. This directory must be writable # by the user executing the agent -# Defaults to: '/var/lib/neutron'. +# Defaults to $facts['os_service_default']. # # [*purge_config*] # (optional) Whether to set only the specified config options @@ -145,7 +145,7 @@ class neutron::agents::ovn_metadata ( $ovsdb_probe_interval = $facts['os_service_default'], $root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf', $root_helper_daemon = $facts['os_service_default'], - $state_path = '/var/lib/neutron', + $state_path = $facts['os_service_default'], Boolean $purge_config = false, ) { diff --git a/spec/classes/neutron_agents_dhcp_spec.rb b/spec/classes/neutron_agents_dhcp_spec.rb index 02162389a..cc5e246ea 100644 --- a/spec/classes/neutron_agents_dhcp_spec.rb +++ b/spec/classes/neutron_agents_dhcp_spec.rb @@ -13,7 +13,6 @@ describe 'neutron::agents::dhcp' do { :package_ensure => 'present', :enabled => true, - :state_path => '/var/lib/neutron', :interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver', :root_helper => 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf', :enable_isolated_metadata => false, @@ -32,7 +31,7 @@ describe 'neutron::agents::dhcp' do it 'configures dhcp_agent.ini' do should contain_neutron_dhcp_agent_config('DEFAULT/debug').with_value(''); - should contain_neutron_dhcp_agent_config('DEFAULT/state_path').with_value(p[:state_path]); + should contain_neutron_dhcp_agent_config('DEFAULT/state_path').with_value(''); should contain_neutron_dhcp_agent_config('DEFAULT/resync_interval').with_value(''); should contain_neutron_dhcp_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]); should contain_neutron_dhcp_agent_config('DEFAULT/dhcp_driver').with_value(''); diff --git a/spec/classes/neutron_agents_ml2_ovn_spec.rb b/spec/classes/neutron_agents_ml2_ovn_spec.rb index a8cf1f352..06efb3acd 100644 --- a/spec/classes/neutron_agents_ml2_ovn_spec.rb +++ b/spec/classes/neutron_agents_ml2_ovn_spec.rb @@ -37,7 +37,7 @@ describe 'neutron::agents::ml2::ovn' do it 'configures ovn_agent.ini' do should contain_neutron_agent_ovn('DEFAULT/debug').with(:value => '') - should contain_neutron_agent_ovn('DEFAULT/state_path').with(:value => '/var/lib/neutron') + should contain_neutron_agent_ovn('DEFAULT/state_path').with(:value => '') should contain_neutron_agent_ovn('agent/extensions').with(:value => '') should contain_neutron_agent_ovn('agent/root_helper').with(:value => 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf') should contain_neutron_agent_ovn('agent/root_helper_daemon').with(:value => '') diff --git a/spec/classes/neutron_agents_ovn_metadata_spec.rb b/spec/classes/neutron_agents_ovn_metadata_spec.rb index ed6863285..ed49f7d70 100644 --- a/spec/classes/neutron_agents_ovn_metadata_spec.rb +++ b/spec/classes/neutron_agents_ovn_metadata_spec.rb @@ -52,7 +52,7 @@ describe 'neutron::agents::ovn_metadata' do should contain_ovn_metadata_agent_config('DEFAULT/metadata_workers').with(:value => '') should contain_ovn_metadata_agent_config('DEFAULT/metadata_backlog').with(:value => '') should contain_ovn_metadata_agent_config('DEFAULT/nova_metadata_insecure').with(:value => '') - should contain_ovn_metadata_agent_config('DEFAULT/state_path').with(:value => '/var/lib/neutron') + should contain_ovn_metadata_agent_config('DEFAULT/state_path').with(:value => '') should contain_ovn_metadata_agent_config('DEFAULT/metadata_proxy_shared_secret').with(:value => params[:shared_secret]).with_secret(true) should contain_ovn_metadata_agent_config('agent/root_helper').with(:value => 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf') should contain_ovn_metadata_agent_config('agent/root_helper_daemon').with(:value => '')