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

Fix os exception in mysql resource #1012

Merged
merged 1 commit into from
Sep 4, 2016
Merged

Fix os exception in mysql resource #1012

merged 1 commit into from
Sep 4, 2016

Conversation

alexpop
Copy link
Contributor

@alexpop alexpop commented Sep 2, 2016

Fixes the following exception:

$ ~/git/inspec/bin/inspec version
0.32.0

$ ~/git/inspec/bin/inspec exec /tmp/profile.rb --sudo --password 'xxx' -t ssh://vagrant@192.168.56.78
WARN: Unresolved specs during Gem::Specification.reset:
      mixlib-shellout (~> 2.0)
      net-ssh (< 4.0, >= 2.6.5, >= 2.9)
      httpclient (>= 2.2.0.2, ~> 2.2)
      excon (>= 0.38.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/Users/apop/git/inspec/lib/resources/mysql.rb:36:in `init_ubuntu': undefined local variable or method `os' for MySQL:Inspec::Resource::Registry::Mysql (NameError)
  from /Users/apop/git/inspec/lib/resources/mysql.rb:16:in `initialize'
  from /Users/apop/git/inspec/lib/inspec/plugins/resource.rb:34:in `initialize'
  from /Users/apop/git/inspec/lib/inspec/resource.rb:31:in `new'
  from /Users/apop/git/inspec/lib/inspec/resource.rb:31:in `block (3 levels) in create_dsl'
  from /tmp/profile.rb:12:in `block in load'
  from /Users/apop/git/inspec/lib/inspec/rule.rb:33:in `instance_eval'
  from /Users/apop/git/inspec/lib/inspec/rule.rb:33:in `initialize'
  from /Users/apop/git/inspec/lib/inspec/profile_context.rb:202:in `new'
  from /Users/apop/git/inspec/lib/inspec/profile_context.rb:202:in `block (2 levels) in create_context'
  from /tmp/profile.rb:5:in `load'
  from /Users/apop/git/inspec/lib/inspec/profile_context.rb:90:in `instance_eval'
  from /Users/apop/git/inspec/lib/inspec/profile_context.rb:90:in `load'
  from /Users/apop/git/inspec/lib/inspec/profile_context.rb:55:in `block in load_tests'
  from /Users/apop/git/inspec/lib/inspec/profile_context.rb:52:in `each'
  from /Users/apop/git/inspec/lib/inspec/profile_context.rb:52:in `load_tests'
  from /Users/apop/git/inspec/lib/inspec/runner.rb:152:in `add_content_from_profile'
  from /Users/apop/git/inspec/lib/inspec/runner.rb:133:in `add_profile'
  from /Users/apop/git/inspec/lib/inspec/runner.rb:126:in `add_target'
  from /Users/apop/git/inspec/lib/inspec/base_cli.rb:73:in `block in run_tests'
  from /Users/apop/git/inspec/lib/inspec/base_cli.rb:73:in `each'
  from /Users/apop/git/inspec/lib/inspec/base_cli.rb:73:in `run_tests'
  from /Users/apop/git/inspec/lib/inspec/cli.rb:149:in `exec'
  from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
  from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
  from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
  from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
  from /Users/apop/git/inspec/bin/inspec:9:in `<main>'

@alexpop alexpop added the Type: Bug Feature not working as expected label Sep 2, 2016
@alexpop
Copy link
Contributor Author

alexpop commented Sep 2, 2016

@scarolan ^

@chris-rock
Copy link
Contributor

Great catch @alexpop

@chris-rock chris-rock merged commit f418e87 into master Sep 4, 2016
@chris-rock chris-rock deleted the ap/mysql-os-fix branch September 4, 2016 14:51
@chris-rock chris-rock modified the milestone: 0.33.0 Sep 5, 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 this pull request may close these issues.

None yet

3 participants