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

cannot upload meta profile to Automate #1631

Closed
jeremymv2 opened this issue Apr 5, 2017 · 4 comments · Fixed by #1646
Closed

cannot upload meta profile to Automate #1631

jeremymv2 opened this issue Apr 5, 2017 · 4 comments · Fixed by #1646
Assignees

Comments

@jeremymv2
Copy link
Contributor

Description

Uploading a meta profile to Automate does not work with inspec 1.19.1, however it does work with inspec 1.11.0 from chefdk 1.2.22.

InSpec and Platform Version

1.19.1

Replication Case

~/Devel/compliance-profiles.sav (test_upload *%)$ /opt/chefdk/bin/inspec version
1.11.0

Your version of InSpec is out of date! The latest version is 1.19.1.
~/Devel/compliance-profiles.sav (test_upload *%)$ /opt/chefdk/bin/inspec compliance upload meta-profile.tar.gz --overwrite
I, [2017-04-05T08:47:35.826510 #6236]  INFO -- : Checking profile in meta-profile.tar.gz
I, [2017-04-05T08:47:35.826627 #6236]  INFO -- : Metadata OK.
I, [2017-04-05T08:47:38.983669 #6236]  INFO -- : Found 79 controls.
W, [2017-04-05T08:47:38.983775 #6236]  WARN -- : Control tls1.2 has no description
W, [2017-04-05T08:47:38.983792 #6236]  WARN -- : Control tls1.2 has no tests defined
W, [2017-04-05T08:47:38.983802 #6236]  WARN -- : Control ssl2 has no description
W, [2017-04-05T08:47:38.983811 #6236]  WARN -- : Control ssl2 has no tests defined
W, [2017-04-05T08:47:38.983854 #6236]  WARN -- : Control ssl3 has no description
W, [2017-04-05T08:47:38.983862 #6236]  WARN -- : Control ssl3 has no tests defined
W, [2017-04-05T08:47:38.983870 #6236]  WARN -- : Control tls1.0 has no description
W, [2017-04-05T08:47:38.983877 #6236]  WARN -- : Control tls1.0 has no tests defined
W, [2017-04-05T08:47:38.983884 #6236]  WARN -- : Control tls1.1 has no description
W, [2017-04-05T08:47:38.983891 #6236]  WARN -- : Control tls1.1 has no tests defined
W, [2017-04-05T08:47:38.983898 #6236]  WARN -- : Control rc4 has no description
W, [2017-04-05T08:47:38.983906 #6236]  WARN -- : Control rc4 has no tests defined
W, [2017-04-05T08:47:38.983913 #6236]  WARN -- : Control verify-kb has no description
W, [2017-04-05T08:47:38.983923 #6236]  WARN -- : Control important-count has no description
W, [2017-04-05T08:47:38.983931 #6236]  WARN -- : Control important-patches has no description
W, [2017-04-05T08:47:38.983938 #6236]  WARN -- : Control important-patches has no tests defined
W, [2017-04-05T08:47:38.983946 #6236]  WARN -- : Control optional-count has no description
W, [2017-04-05T08:47:38.983954 #6236]  WARN -- : Control optional-patches has no description
W, [2017-04-05T08:47:38.984033 #6236]  WARN -- : Control optional-patches has no tests defined
Profile is valid
Start upload to admin/meta-profile
Uploading to Chef Automate
Successfully uploaded profile
~/Devel/compliance-profiles.sav (test_upload *%)$ inspec version
WARN: Unresolved specs during Gem::Specification.reset:
      net-ssh (< 5.0, >= 2.6.5, >= 2.9)
      ffi (>= 1.0.1)
      builder (>= 2.1.2)
      diff-lcs (< 2.0, >= 1.2.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
1.19.1
~/Devel/compliance-profiles.sav (test_upload *%)$ inspec compliance upload meta-profile.tar.gz --overwrite
WARN: Unresolved specs during Gem::Specification.reset:
      net-ssh (< 5.0, >= 2.6.5, >= 2.9)
      ffi (>= 1.0.1)
      builder (>= 2.1.2)
      diff-lcs (< 2.0, >= 1.2.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/train-0.22.1/lib/train.rb:122:in `validate_backend': Cannot determine backend from target configuration "meta-profile.tar.gz". Valid example: ssh://192.168.0.1. (Train::UserError)
	from /Users/jmiller/.chefdk/gem/ruby/2.3.0/gems/inspec-1.19.1/lib/inspec/backend.rb:17:in `create'
	from /Users/jmiller/.chefdk/gem/ruby/2.3.0/gems/inspec-1.19.1/lib/inspec/profile.rb:92:in `initialize'
	from /Users/jmiller/.chefdk/gem/ruby/2.3.0/gems/inspec-1.19.1/lib/inspec/profile.rb:63:in `new'
	from /Users/jmiller/.chefdk/gem/ruby/2.3.0/gems/inspec-1.19.1/lib/inspec/profile.rb:63:in `for_path'
	from /Users/jmiller/.chefdk/gem/ruby/2.3.0/gems/inspec-1.19.1/lib/inspec/profile.rb:69:in `for_fetcher'
	from /Users/jmiller/.chefdk/gem/ruby/2.3.0/gems/inspec-1.19.1/lib/inspec/profile.rb:75:in `for_target'
	from /Users/jmiller/.chefdk/gem/ruby/2.3.0/gems/inspec-1.19.1/lib/bundles/inspec-compliance/cli.rb:165:in `upload'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:235:in `block in subcommand'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /Users/jmiller/.chefdk/gem/ruby/2.3.0/gems/inspec-1.19.1/bin/inspec:12:in `<main>'
~/Devel/compliance-profiles.sav (test_upload *%)$ chef -v
Chef Development Kit Version: 1.2.22
chef-client version: 12.18.31
delivery version: master (0b746cafed65a9ea1a79de3cc546e7922de9187c)
berks version: 2017-04-05T08:49:35.714968 6305] 2017-04-05T08:49:35.715121 6305] 2017-04-05T08:49:35.715230 6305] 2017-04-05T08:49:35.715331 6305] 2017-04-05T08:49:35.745557 6305] 2017-04-05T08:49:35.745687 6305] 5.6.0
kitchen version: 1.15.0
~/Devel/compliance-profiles.sav (test_upload *%)$

Possible Solutions

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

Stacktrace

Please include the stacktrace output or link to a gist of it, if there is one.

@chris-rock
Copy link
Contributor

@jeremymv2 Not sure why this is happening. I think we need to look at the specific profile. Can you share this somehow? Even non-public?

@jeremymv2
Copy link
Contributor Author

jeremymv2 commented Apr 5, 2017

@chris-rock
Here is the profile I am referencing:
meta-profile.tar.gz

Strange error indeed..

@ndobson
Copy link

ndobson commented Apr 11, 2017

I'm having the same error trying to upload to compliance server with version 1.19.1

inspec compliance upload . --overwrite
Dependencies for profile . successfully vendored to vendor
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/train-0.23.0/lib/train.rb:122:in `validate_backend': Cannot determine backend from target configuration ".". Valid example: ssh://192.168.0.1. (Train::UserError)
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/inspec-1.19.1/lib/inspec/backend.rb:17:in `create'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/inspec-1.19.1/lib/inspec/profile.rb:92:in `initialize'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/inspec-1.19.1/lib/inspec/profile.rb:63:in `new'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/inspec-1.19.1/lib/inspec/profile.rb:63:in `for_path'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/inspec-1.19.1/lib/inspec/profile.rb:69:in `for_fetcher'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/inspec-1.19.1/lib/inspec/profile.rb:75:in `for_target'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/inspec-1.19.1/lib/bundles/inspec-compliance/cli.rb:165:in `upload'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:235:in `block in subcommand'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/inspec-1.19.1/bin/inspec:12:in `<top (required)>'
	from /opt/chefdk/bin/inspec:57:in `load'
	from /opt/chefdk/bin/inspec:57:in `<main>'
inspec version
1.19.1

Your version of InSpec is out of date! The latest version is 1.19.2.

@ndobson
Copy link

ndobson commented Apr 11, 2017

Thanks for the quick attention @jeremymv2 !

@chris-rock chris-rock self-assigned this Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants