diff --git a/CHANGELOG.md b/CHANGELOG.md index f00813dc..7bb7ba15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ This file is used to list changes made in each version of cookbook-openstack-common. +## 0.4.6: +### Bug +* Ensuring `#db_uri` returns a valid sqlite connection string + * relative path example: 'path' = 'path/to/foo.db' -- will return sqlite:///foo.db + * absolute path example: 'path' = '/path/to/foo.db' -- will return sqlite:////foo.db + ## 0.4.5: * Added `openstack-common::set_endpoints_by_interface` to enable using `bind_interface` with endpoints rather than hard-code the IP addresses in an diff --git a/libraries/endpoints.rb b/libraries/endpoints.rb index 92812fa1..6b1de45d 100644 --- a/libraries/endpoints.rb +++ b/libraries/endpoints.rb @@ -69,8 +69,11 @@ module ::Openstack result = "#{type}://#{user}:#{pass}@#{host}:#{port}/#{name}" when "sqlite" # SQLite uses filepaths not db name + # README(galstrom): 3 slashes is a relative path, 4 slashes is an absolute path + # example: info['path'] = 'path/to/foo.db' -- will return sqlite:///foo.db + # example: info['path'] = '/path/to/foo.db' -- will return sqlite:////foo.db path = info['path'] - result = "sqlite://#{path}" + result = "sqlite:///#{path}" end end end diff --git a/metadata.rb b/metadata.rb index f29fc398..2ecf91b9 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ maintainer_email "cookbooks@lists.tfoundry.com" license "Apache 2.0" description "Common OpenStack attributes, libraries and recipes." long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version "0.4.5" +version "0.4.6" recipe "openstack-common", "Installs/Configures common recipes" recipe "openstack-common::set_endpoints_by_interface", "Set endpoints by interface"