bflad / chef-mysql_connector Goto Github PK
View Code? Open in Web Editor NEWChef Cookbook for MySQL Connectors
License: Other
Chef Cookbook for MySQL Connectors
License: Other
Whenever I try to install mysql_connector_j
, I have this error:
[2014-01-11T16:54:22+00:00] FATAL: Chef::Exceptions::ValidationFailed: mysql_connector_j[/opt/atlassian/jira/lib](jira::linux_installer line 56) had an error: Chef::Exceptions::ValidationFailed: Option source must be a kind of String! You passed ["http://cdn.mysql.com/Downloads/Connector-J/mysql-connector-java-5.1.28.tar.gz", "http://cdn.mysql.com/archives/mysql-connector-java-5.1/mysql-connector-java-5.1.28.tar.gz"].
The reason is:
https://github.com/bflad/chef-mysql_connector/blob/master/providers/j.rb#L16
remote_file "#{Chef::Config[:file_cache_path]}/#{node['mysql_connector']['j']['tar_file']}" do
source [node['mysql_connector']['j']['url'], node['mysql_connector']['j']['archive_url']]
checksum node['mysql_connector']['j']['checksum']
mode 00644
action :create
end
source
line should be a string
Hi,
Looks like http://cdn.mysql.com url does not longer exist. (confirmation elsewhere on web: https://aur.archlinux.org/packages/mysql-connector-java/)
So now correct url is http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.29.tar.gz
MD5 checksum: 58d44ae8d20fe86bba321640ea781c53
GnuPG Signature: iD8DBQBS6Mr3jHGNO1By4fURAg5GAKCZeYuvfI9RPdZeEjuob2Q0DEtuNQCeIyEz
(ref: https://dev.mysql.com/downloads/connector/j/)
Em
I'll try to provide a demonstration and fix when I can, but I've noticed that if path
is a non-existing directory in a chefspec test, then Ruby tries to stat it anyway, and the test fails.
part of my role definition:
....
"mysql_connector":
{
"j":
{
"install_paths": ["/var/lib/mysql_connector"],
"version": "5.0.8"
}
},
....
For some reason, the archive name is generated with error: mysql-connector-java-5.0.8/mysql-connector-java-5.1.28-bin.jar
Exception information:
[2014-01-12T15:08:26+00:00] DEBUG: Mixlib::ShellOut::ShellCommandFailed: execute[mysql-connector-java-/opt/atlassian/jira/lib](/tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql_connector/providers/j.rb line 22) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of tar --strip-components=1 -xzf mysql-connector-java-5.1.28.tar.gz -C /opt/atlassian/jira/lib mysql-connector-java-5.0.8/mysql-connector-java-5.1.28-bin.jar ----
STDOUT:
STDERR: tar: mysql-connector-java-5.0.8/mysql-connector-java-5.1.28-bin.jar: Not found in archive
tar: Exiting with failure status due to previous errors
---- End output of tar --strip-components=1 -xzf mysql-connector-java-5.1.28.tar.gz -C /opt/atlassian/jira/lib mysql-connector-java-5.0.8/mysql-connector-java-5.1.28-bin.jar ----
Ran tar --strip-components=1 -xzf mysql-connector-java-5.1.28.tar.gz -C /opt/atlassian/jira/lib mysql-connector-java-5.0.8/mysql-connector-java-5.1.28-bin.jar returned 2
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout.rb:248:in invalid!' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout.rb:234:in
error!'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/shell_out.rb:36:in shell_out!' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/provider/execute.rb:62:in
action_run'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/why_run.rb:63:in call' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/why_run.rb:63:in
converge!'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/why_run.rb:61:in each' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/why_run.rb:61:in
converge!'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/provider.rb:136:in converge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/provider.rb:125:in
run_action'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource.rb:593:in run_action' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.rb:49:in
run_action'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.rb:81:in converge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.rb:81:in
each'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.rb:81:in converge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_collection.rb:94:in
execute_each_resource'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in call' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in
call_iterator_block'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in step' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in
iterate'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in each_with_index' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_collection.rb:92:in
execute_each_resource'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.rb:80:in converge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/client.rb:378:in
converge'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/client.rb:420:in do_run' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/client.rb:176:in
run'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/application/solo.rb:230:in run_application' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/application/solo.rb:218:in
loop'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/application/solo.rb:218:in run_application' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/application.rb:70:in
run'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/chef-solo:25
/opt/vagrant_ruby/bin/chef-solo:19:in `load'
/opt/vagrant_ruby/bin/chef-solo:19
[2014-01-12T15:08:26+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[mysql-connector-java-/opt/atlassian/jira/lib](/tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql_connector/providers/j.rb line 22) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of tar --strip-components=1 -xzf mysql-connector-java-5.1.28.tar.gz -C /opt/atlassian/jira/lib mysql-connector-java-5.0.8/mysql-connector-java-5.1.28-bin.jar ----
STDOUT:
STDERR: tar: mysql-connector-java-5.0.8/mysql-connector-java-5.1.28-bin.jar: Not found in archive
tar: Exiting with failure status due to previous errors
---- End output of tar --strip-components=1 -xzf mysql-connector-java-5.1.28.tar.gz -C /opt/atlassian/jira/lib mysql-connector-java-5.0.8/mysql-connector-java-5.1.28-bin.jar ----
Ran tar --strip-components=1 -xzf mysql-connector-java-5.1.28.tar.gz -C /opt/atlassian/jira/lib mysql-connector-java-5.0.8/mysql-connector-java-5.1.28-bin.jar returned 2
In my context, I need to control owner and group of the jar. I cannot with the current version.
The mysql-connector-java-x.x.x.tar.gz is not downloaded once there is a file on the cache location.
The checksum check is never executed when there is already a cache file.
Output:
[2013-12-26T10:01:10+00:00] INFO: Processing remote_file[/tmp/vagrant-cache/mysql-connector-java-5.1.26.tar.gz] action create_if_missing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql_connector/providers/j.rb line 34)
[2013-12-26T10:01:10+00:00] DEBUG: remote_file[/tmp/vagrant-cache/mysql-connector-java-5.1.26.tar.gz] exists at /tmp/vagrant-cache/mysql-connector-java-5.1.26.tar.gz taking no action.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.