Move to memory_lock
This commit is contained in:
parent
7efec96ea9
commit
4edc56f104
8 changed files with 18 additions and 19 deletions
|
|
@ -4,7 +4,7 @@
|
|||
hosts: localhost
|
||||
roles:
|
||||
#expand to all available parameters
|
||||
- { role: elasticsearch, es_instance_name: "node1", es_data_dirs: ["/opt/elasticsearch/data-1","/opt/elasticsearch/data-2"], es_log_dir: "/opt/elasticsearch/logs", es_work_dir: "/opt/elasticsearch/temp", es_user_id: 333, es_group_id: 333, es_config: {node.name: "node1", cluster.name: "custom-cluster", discovery.zen.ping.unicast.hosts: "localhost:9301", http.port: 9201, transport.tcp.port: 9301, node.data: false, node.master: true, bootstrap.mlockall: true, discovery.zen.ping.multicast.enabled: false } }
|
||||
- { role: elasticsearch, es_instance_name: "node1", es_data_dirs: ["/opt/elasticsearch/data-1","/opt/elasticsearch/data-2"], es_log_dir: "/opt/elasticsearch/logs", es_work_dir: "/opt/elasticsearch/temp", es_user_id: 333, es_group_id: 333, es_config: {node.name: "node1", cluster.name: "custom-cluster", discovery.zen.ping.unicast.hosts: "localhost:9301", http.port: 9201, transport.tcp.port: 9301, node.data: false, node.master: true, bootstrap.memory_lock: true, discovery.zen.ping.multicast.enabled: false } }
|
||||
vars:
|
||||
es_scripts: false
|
||||
es_templates: false
|
||||
|
|
|
|||
|
|
@ -35,11 +35,10 @@ shared_examples 'config::init' do |es_version|
|
|||
it { should contain 'discovery.zen.ping.multicast.enabled: false' }
|
||||
it { should contain 'cluster.name: custom-cluster' }
|
||||
it { should contain 'node.name: node1' }
|
||||
it { should contain 'bootstrap.mlockall: true' }
|
||||
it { should contain 'bootstrap.memory_lock: true' }
|
||||
it { should contain 'discovery.zen.ping.unicast.hosts: localhost:9301' }
|
||||
it { should contain 'path.conf: /etc/elasticsearch/node1' }
|
||||
it { should contain 'path.data: /opt/elasticsearch/data-1/localhost-node1,/opt/elasticsearch/data-2/localhost-node1' }
|
||||
it { should contain 'path.work: /opt/elasticsearch/temp/localhost-node1' }
|
||||
it { should contain 'path.logs: /opt/elasticsearch/logs/localhost-node1' }
|
||||
end
|
||||
|
||||
|
|
@ -77,7 +76,7 @@ shared_examples 'config::init' do |es_version|
|
|||
end
|
||||
|
||||
#test to make sure mlock was applied
|
||||
describe command('curl -s "localhost:9201/_nodes/process?pretty" | grep mlockall') do
|
||||
describe command('curl -s "localhost:9201/_nodes/process?pretty" | grep memory_lock') do
|
||||
its(:stdout) { should match /true/ }
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ shared_examples 'multi::init' do |es_version,plugins|
|
|||
it { should contain 'node.master: false' }
|
||||
it { should contain 'discovery.zen.ping.multicast.enabled: false' }
|
||||
it { should contain 'node.name: localhost-node1' }
|
||||
it { should_not contain 'bootstrap.mlockall: true' }
|
||||
it { should_not contain 'bootstrap.memory_lock: true' }
|
||||
it { should contain 'path.conf: /etc/elasticsearch/node1' }
|
||||
it { should contain 'path.data: /opt/elasticsearch/data-1/localhost-node1,/opt/elasticsearch/data-2/localhost-node1' }
|
||||
it { should contain 'path.work: /tmp/elasticsearch/localhost-node1' }
|
||||
|
|
@ -44,7 +44,7 @@ shared_examples 'multi::init' do |es_version,plugins|
|
|||
it { should contain 'node.master: true' }
|
||||
it { should contain 'discovery.zen.ping.multicast.enabled: false' }
|
||||
it { should contain 'node.name: localhost-master' }
|
||||
it { should contain 'bootstrap.mlockall: true' }
|
||||
it { should contain 'bootstrap.memory_lock: true' }
|
||||
it { should contain 'path.conf: /etc/elasticsearch/master' }
|
||||
it { should contain 'path.data: /opt/elasticsearch/master/localhost-master' }
|
||||
it { should contain 'path.work: /tmp/elasticsearch/localhost-master' }
|
||||
|
|
@ -146,13 +146,13 @@ shared_examples 'multi::init' do |es_version,plugins|
|
|||
end
|
||||
|
||||
#test to make sure mlock was applied
|
||||
describe command('curl -s "localhost:9200/_nodes/localhost-master/process?pretty=true" | grep mlockall') do
|
||||
describe command('curl -s "localhost:9200/_nodes/localhost-master/process?pretty=true" | grep memory_lock') do
|
||||
its(:stdout) { should match /true/ }
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
||||
|
||||
#test to make sure mlock was not applied
|
||||
describe command('curl -s "localhost:9201/_nodes/localhost-node1/process?pretty=true" | grep mlockall') do
|
||||
describe command('curl -s "localhost:9201/_nodes/localhost-node1/process?pretty=true" | grep memory_lock') do
|
||||
its(:stdout) { should match /false/ }
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
- name: Elasticsearch Multi tests
|
||||
hosts: localhost
|
||||
roles:
|
||||
- { role: elasticsearch, es_instance_name: "master", es_data_dirs: ["/opt/elasticsearch/master"], es_heap_size: "1g", es_config: { "discovery.zen.ping.multicast.enabled": false, discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9200, transport.tcp.port: 9300, node.data: false, node.master: true, bootstrap.mlockall: true, discovery.zen.ping.multicast.enabled: false } }
|
||||
- { role: elasticsearch, es_instance_name: "master", es_data_dirs: ["/opt/elasticsearch/master"], es_heap_size: "1g", es_config: { "discovery.zen.ping.multicast.enabled": false, discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9200, transport.tcp.port: 9300, node.data: false, node.master: true, bootstrap.memory_lock: true, discovery.zen.ping.multicast.enabled: false } }
|
||||
- { role: elasticsearch, es_instance_name: "node1", es_data_dirs: "/opt/elasticsearch/data-1,/opt/elasticsearch/data-2", es_config: { "discovery.zen.ping.multicast.enabled": false, discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9201, transport.tcp.port: 9301, node.data: true, node.master: false, discovery.zen.ping.multicast.enabled: false } }
|
||||
vars:
|
||||
es_scripts: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue