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

Looks like supports is ignored from tar files #360

Closed
chris-rock opened this issue Jan 14, 2016 · 2 comments
Closed

Looks like supports is ignored from tar files #360

chris-rock opened this issue Jan 14, 2016 · 2 comments
Assignees
Labels
Type: Bug Feature not working as expected
Milestone

Comments

@chris-rock
Copy link
Contributor

I run the example profile on Mac, where the inspec.yml contains

supports:
  - os-family: linux

The tests are not executed:

$ inspec exec profile.tar.gz
..

Finished in 0.00308 seconds (files took 0.49697 seconds to load)
2 examples, 0 failures

If I generate an archive with inspec archive, the tests are executed:

$ inspec exec examples/profile 


Finished in 0.00042 seconds (files took 0.3386 seconds to load)
0 examples, 0 failures

This also highlights the importance for #354. Otherwise the user is not able to track down, why tests are not executed.

@chris-rock chris-rock added the Type: Bug Feature not working as expected label Jan 14, 2016
@chris-rock chris-rock self-assigned this Jan 25, 2016
@chris-rock chris-rock added this to the 0.9.12 milestone Jan 29, 2016
@conorsch
Copy link

conorsch commented Feb 2, 2016

Running into this issue with a Linux host as well. Yes, the inspec.yml file declares support for Linux. I'm also seeing debug output about No controls or tests were defined, even though they're clearly there.

W, [2016-02-01T18:15:12.313742 #1573]  WARN -- : Missing profile copyright in inspec.yml
W, [2016-02-01T18:15:12.313824 #1573]  WARN -- : No controls or tests were defined.
I, [2016-02-01T18:15:12.316651 #1573]  INFO -- : Profile check finished. Generate archive /home/conor/.gem/ruby/2.1.0/gems/inspec-0.9.11/elk.tar.gz.
D, [2016-02-01T18:15:12.317509 #1573] DEBUG -- : Add the following files to archive:
D, [2016-02-01T18:15:12.317551 #1573] DEBUG -- :     controls
D, [2016-02-01T18:15:12.317594 #1573] DEBUG -- :     controls/kibana_spec.rb
D, [2016-02-01T18:15:12.317622 #1573] DEBUG -- :     controls/tls_spec.rb
D, [2016-02-01T18:15:12.317650 #1573] DEBUG -- :     controls/logstash_spec.rb
D, [2016-02-01T18:15:12.317679 #1573] DEBUG -- :     controls/nginx_spec.rb
D, [2016-02-01T18:15:12.317706 #1573] DEBUG -- :     controls/elasticsearch_spec.rb
D, [2016-02-01T18:15:12.317733 #1573] DEBUG -- :     inspec.yml
I, [2016-02-01T18:15:12.338399 #1573]  INFO -- : Finished archive generation.

Unfortunately, even running against the archive doesn't solve the problem—at least not when I'm using SSH:

$ inspec exec --backend ssh --host <REDACTED> --user conor -i ~<REDACTED> /home/conor/.gem/ruby/2.1.0/gems/inspec-0.9.11/elk.tar.gz

[..snip..]
Finished in 0.00027 seconds (files took 8.12 seconds to load)
0 examples, 0 failures

zlib(finalizer): the stream was freed prematurely.

For both the archive and the local directory, running them with the local backend shows test discovery working fine. It's only the SSH backend that skips the discovery phase silently.

Let me know if I can provide more data.

@chris-rock
Copy link
Contributor Author

fixed with #413

@conorsch please re-open if this still persist with the latest version

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

No branches or pull requests

2 participants