Skip to content

Commit

Permalink
Use configured port everywhere we talk to postgres
Browse files Browse the repository at this point in the history
ChangeLog-Entry: Issue 459: Use configured port everywhere we talk to postgres
  • Loading branch information
Marc Paradise committed Sep 25, 2015
1 parent e3fa72d commit 8681f9d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ output_directory: '/tmp/opscode-platform-test'

db_driver: "postgres"
db_host: '<%= node['private_chef']['postgresql']['vip'] %>'
db_port: '<%= node['private_chef']['postgresql']['port'] %>'
db_user: '<%= node['private_chef']['opscode-erchef']['sql_user'] %>'
db_password: '<%= node['private_chef']['opscode-erchef']['sql_password'] %>'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
{ip_mode, [ <%=PrivateChef['use_ipv6'] ? "ipv6,ipv4" : "ipv4" %> ] },
%% Database connection parameters
{db_host, "<%= node['private_chef']['postgresql']['vip'] %>"},
{db_port, 5432},
{db_port, <%= node['private_chef']['postgresql']['port'] %>},
{db_user, "<%= node['private_chef']['opscode-erchef']['sql_user'] %>"},
{db_pass, "<%= node['private_chef']['opscode-erchef']['sql_password'] %>"},
{db_name, "opscode_chef" },
Expand Down
2 changes: 1 addition & 1 deletion src/chef-server-bootstrap/bin/bootstrap-platform
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class BootstrapPlatform
def bootstrap
config = YAML.load_file(@config_file)

db = Sequel.connect("#{config['db_driver']}://#{config['db_user']}:#{config['db_password']}@#{config['db_host']}/opscode_chef")
db = Sequel.connect("#{config['db_driver']}://#{config['db_user']}:#{config['db_password']}@#{config['db_host']}:#{config['db_port']}/opscode_chef")

#################################
# create superuser authz object #
Expand Down

0 comments on commit 8681f9d

Please sign in to comment.