Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suse Linux Enterprise Server 11 SPX is failing for describe service resource. #997

Closed
jctux opened this issue Aug 30, 2016 · 1 comment · Fixed by #1007
Closed

Suse Linux Enterprise Server 11 SPX is failing for describe service resource. #997

jctux opened this issue Aug 30, 2016 · 1 comment · Fixed by #1007
Assignees
Labels
Type: Bug Feature not working as expected
Milestone

Comments

@jctux
Copy link

jctux commented Aug 30, 2016

Description

The resource describe service only works with the argument it { should be_installed }, for all others like {be_enabled} and {be_running}, the resource is giving wrong info.

InSpec and Platform Version

Host info

inspec version
0.32.0
Mac OS X El Capitan 10.11.6
RVM 1.26.11
rvm rubies =* ruby-2.2.2 [ x86_64 ]

Target info

Suse Linux Enterprise Server 11 SP2, 3 and 4

Replication Case

With this single test it will report that service is installed, but for be_enabled and be_running fails, even if the service is up and chkconfig reports on status.
test.rb
describe service('autofs') do
it { should be_installed }
it { should be_enabled }
it { should be_running }
end

Possible Solutions

If you have already ideas how to solve the issue, add them here.

Stacktrace

 $    inspec exec controls/automounter.rb -t ssh://i844059@mo-f691eaa45 -i ~/.ssh/id_rsa 
Target:  ssh://i844059@mo-f691eaa45:22
  ✖  autofs.0: Check for automounter (2 failed)
     ✖  expected that `Service autofs` is enabled
     ✖  expected that `Service autofs` is running
     ✔  Service autofs should be installed

Inside an ssh session on the target host
mo-f691eaa45:/home/i844059 # /etc/init.d/autofs status
Checking for service                        running
mo-f691eaa45:/home/i844059 # chkconfig --list autofs
autofs                    0:off  1:off  2:off  3:on   4:off  5:on   6:off
@chris-rock chris-rock added the Type: Bug Feature not working as expected label Aug 31, 2016
@chris-rock
Copy link
Contributor

@JuanMtz79 Thanks for reporting. Suse is storing the rc levels in /etc/init.d/rc*.d, but we were only expecting them in /etc/rc*.d. #1007 is up and fixes that issue.

@chris-rock chris-rock added this to the 0.33.0 milestone Sep 2, 2016
@chris-rock chris-rock self-assigned this Sep 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants