Skip to content

Commit

Permalink
Fixes voxpupuli#113.
Browse files Browse the repository at this point in the history
  • Loading branch information
dallinb committed Sep 23, 2015
1 parent 771bf06 commit 84ca9d4
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,10 @@ This is passed to the
[cassandra.yaml](http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html) file.
Default value '/var/lib/cassandra/commitlog'

##### `commitlog_directory_mode`
The mode for the directory specified in `commitlog_directory`.
Default value '0750'

##### `commitlog_sync`
This is passed to the
[cassandra.yaml](http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html) file.
Expand Down Expand Up @@ -552,6 +556,10 @@ This is passed to the
[cassandra.yaml](http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html) file.
Default value '['/var/lib/cassandra/data']'

##### `data_file_directories_mode`
The mode for the directories specified in `data_file_directories`.
Default value '0750'

##### `dc`
Sets the value for dc in *config_path*/*snitch_properties_file* see
http://docs.datastax.com/en/cassandra/2.1/cassandra/architecture/architectureSnitchesAbout_c.html
Expand Down Expand Up @@ -926,6 +934,10 @@ This is passed to the
[cassandra.yaml](http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html) file.
Default value '/var/lib/cassandra/saved_caches'

##### `saved_caches_directory_mode`
The mode for the directory specified in `saved_caches_directory`.
Default value '0750'

##### `seeds`
This is passed to the
[cassandra.yaml](http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html) file.
Expand Down
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
$column_index_size_in_kb = 64,
$commitlog_directory
= '/var/lib/cassandra/commitlog',
$commitlog_directory_mode = '0750',
$commitlog_sync_batch_window_in_ms = undef,
$commitlog_sync = undef,
$commitlog_total_space_in_mb = undef,
Expand All @@ -41,6 +42,7 @@
$cross_node_timeout = false,
$data_file_directories
= ['/var/lib/cassandra/data'],
$data_file_directories_mode = '0750',
$dc = 'DC1',
$dc_suffix = undef,
$disk_failure_policy = 'stop',
Expand Down Expand Up @@ -104,6 +106,7 @@
$rpc_server_type = 'sync',
$saved_caches_directory
= '/var/lib/cassandra/saved_caches',
$saved_caches_directory_mode = '0750',
$seeds = '127.0.0.1',
$server_encryption_internode = 'none',
$server_encryption_keystore = 'conf/.keystore',
Expand Down Expand Up @@ -187,6 +190,7 @@
ensure => directory,
owner => 'cassandra',
group => 'cassandra',
mode => $commitlog_directory_mode,
require => Package[$package_name],
notify => Service['cassandra'],
}
Expand All @@ -195,6 +199,7 @@
ensure => directory,
owner => 'cassandra',
group => 'cassandra',
mode => $data_file_directories_mode,
require => Package[$package_name],
notify => Service['cassandra'],
}
Expand All @@ -203,6 +208,7 @@
ensure => directory,
owner => 'cassandra',
group => 'cassandra',
mode => $saved_caches_directory_mode,
require => Package[$package_name],
notify => Service['cassandra'],
}
Expand Down
5 changes: 4 additions & 1 deletion spec/acceptance/cassandra_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
class { '::cassandra::datastax_repo': } ->
class { '::cassandra::java': } ->
class { 'cassandra':
cassandra_9822 => true
cassandra_9822 => true,
commitlog_directory_mode => '0770',
data_file_directories_mode => '0770',
saved_caches_directory_mode => '0770'
} ->
class { '::cassandra::optutils': } ->
class { '::cassandra::datastax_agent': } ->
Expand Down
3 changes: 3 additions & 0 deletions spec/classes/cassandra_redhat_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,23 @@
'ensure' => 'directory',
'owner' => 'cassandra',
'group' => 'cassandra',
'mode' => '0750',
})
}
it {
should contain_file('/var/lib/cassandra/commitlog').with({
'ensure' => 'directory',
'owner' => 'cassandra',
'group' => 'cassandra',
'mode' => '0750',
})
}
it {
should contain_file('/var/lib/cassandra/saved_caches').with({
'ensure' => 'directory',
'owner' => 'cassandra',
'group' => 'cassandra',
'mode' => '0750',
})
}
end
Expand Down
3 changes: 3 additions & 0 deletions spec/classes/cassandra_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
'cluster_name' => 'Test Cluster',
'column_index_size_in_kb' => 64,
'commitlog_directory' => '/var/lib/cassandra/commitlog',
'commitlog_directory_mode' => '0750',
'commit_failure_policy' => 'stop',
'compaction_throughput_mb_per_sec' => 16,
'concurrent_counter_writes' => 32,
Expand All @@ -56,6 +57,7 @@
'counter_write_request_timeout_in_ms' => 5000,
'cross_node_timeout' => false,
'data_file_directories' => ['/var/lib/cassandra/data'],
'data_file_directories_mode' => '0750',
'dc' => 'DC1',
'disk_failure_policy' => 'stop',
'dynamic_snitch_badness_threshold' => 0.1,
Expand Down Expand Up @@ -91,6 +93,7 @@
'rpc_port' => 9160,
'rpc_server_type' => 'sync',
'saved_caches_directory' => '/var/lib/cassandra/saved_caches',
'saved_caches_directory_mode' => '0750',
'seeds' => '127.0.0.1',
'server_encryption_internode' => 'none',
'server_encryption_keystore' => 'conf/.keystore',
Expand Down

0 comments on commit 84ca9d4

Please sign in to comment.