Skip to content

Commit 0ab8ef8

Browse files
authored
Merge pull request #10 from kplimack/quotes
Quotes MySQL password.
2 parents 1d49f97 + a9c3d9a commit 0ab8ef8

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ cloudstack CHANGELOG
33

44
This file is used to list changes made in each version of the co-cloudstack cookbook.
55

6+
4.0.8
7+
-----
8+
- put mysql password in single-quotes, otherwise some hardened passwords are not interpreted correctly and logins fail.
9+
610
4.0.7
711
-----
812
- pdion891 - add support for CentOS 7 for ACS 4.10 with JDK8

metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
license 'Apache 2.0'
55
description 'Installs/Configures cloudstack'
66
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
7-
version '4.0.7'
7+
version '4.0.8'
88

99
source_url 'https://github.com/cloudops/cookbook_cloudstack'
1010
issues_url 'https://github.com/cloudops/cookbook_cloudstack/issues'

providers/system_template.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
def load_current_resource
4242
@current_resource = Chef::Resource::CloudstackSystemTemplate.new(@new_resource.name)
4343
@current_resource.name(@new_resource.name)
44-
@current_resource.url(@new_resource.url)
44+
@current_resource.url(@new_resource.url)
4545
@current_resource.hypervisor(@new_resource.hypervisor)
4646
@current_resource.nfs_path(@new_resource.nfs_path)
4747
@current_resource.nfs_server(@new_resource.nfs_server)
@@ -55,7 +55,7 @@ def load_current_resource
5555
else
5656
if db_exist?(@current_resource.db_host, @current_resource.db_user, @current_resource.db_password)
5757
if @current_resource.url.nil?
58-
cmd = Mixlib::ShellOut.new("mysql -h #{@current_resource.db_host} --user=#{@current_resource.db_user} --password=#{@current_resource.db_password} --skip-column-names -U cloud -e 'select max(url) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type = \"#{@current_resource.hypervisor}\" and removed is null'")
58+
cmd = Mixlib::ShellOut.new("mysql -h #{@current_resource.db_host} --user=#{@current_resource.db_user} --password='#{@current_resource.db_password}' --skip-column-names -U cloud -e 'select max(url) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type = \"#{@current_resource.hypervisor}\" and removed is null'")
5959
cmd.run_command
6060
cmd.error!
6161
@current_resource.url(cmd.stdout.chomp)
@@ -74,4 +74,3 @@ def load_current_resource
7474
end
7575

7676
end
77-

0 commit comments

Comments
 (0)