Subscribe cgrulesengd to the file changes
This commit fix behavior when new processes aren't catched by Control Groups Engine Daemon. Change-Id: I1a5d5eaa15e1f3f52a97793ae6f69704d893a630 Closes-bug: #1558432
This commit is contained in:
parent
dca0b94434
commit
f68cfa86c1
|
@ -0,0 +1 @@
|
|||
spec/fixtures
|
|
@ -0,0 +1,2 @@
|
|||
-f doc
|
||||
-c
|
|
@ -17,7 +17,8 @@ class cgroups(
|
|||
inherits cgroups::params
|
||||
{
|
||||
validate_hash($cgroups_set)
|
||||
ensure_packages($packages)
|
||||
ensure_packages($packages, { tag => 'cgroups' })
|
||||
|
||||
|
||||
File {
|
||||
ensure => file,
|
||||
|
@ -28,20 +29,36 @@ class cgroups(
|
|||
|
||||
file { '/etc/cgconfig.conf':
|
||||
content => template('cgroups/cgconfig.conf.erb'),
|
||||
tag => 'cgroups',
|
||||
}
|
||||
|
||||
file { '/etc/cgrules.conf':
|
||||
content => template('cgroups/cgrules.conf.erb'),
|
||||
tag => 'cgroups',
|
||||
}
|
||||
|
||||
class { '::cgroups::service':
|
||||
cgroups_settings => $cgroups_set,
|
||||
}
|
||||
|
||||
Package<||> ->
|
||||
File<||> ->
|
||||
File <| tag == 'cgroups' |> ~>
|
||||
Service['cgrulesengd']
|
||||
|
||||
Package <| tag == 'cgroups' |> ~>
|
||||
Service['cgrulesengd']
|
||||
|
||||
Package <| tag == 'cgroups' |> ->
|
||||
File <| tag == 'cgroups' |>
|
||||
|
||||
File <| tag == 'cgroups' |> ->
|
||||
Service['cgroup-lite']
|
||||
|
||||
Service['cgroup-lite'] ->
|
||||
Service['cgconfigparser']
|
||||
|
||||
Service['cgconfigparser'] ->
|
||||
Cgclassify<||> ->
|
||||
Cgclassify <||>
|
||||
|
||||
Cgclassify <||> ->
|
||||
Service['cgrulesengd']
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ describe 'cgroups', :type => :class do
|
|||
:owner => 'root',
|
||||
:group => 'root',
|
||||
:mode => '0644',
|
||||
:tag => 'cgroups',
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -31,9 +32,8 @@ describe 'cgroups', :type => :class do
|
|||
end
|
||||
|
||||
%w(/etc/cgconfig.conf /etc/cgrules.conf).each do |cg_file|
|
||||
it { is_expected.to contain_file(cg_file).with(
|
||||
file_defaults
|
||||
) }
|
||||
it { is_expected.to contain_file(cg_file).that_notifies('Service[cgrulesengd]').with(file_defaults) }
|
||||
it { p catalogue.resource 'file', cg_file }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue