Andrew Bogott has submitted this change and it was merged.

Change subject: Add support for a pdns db admin account.
......................................................................


Add support for a pdns db admin account.

This will be used when running the designate upgrade scripts and such.

This patch also does a bit of cleanup, pulling db usernames from
the private repo rather than hard-coding.

Bug:  T92984
Change-Id: I8d66b8d52bdebcc05ac7247a659aef8a4fb508be
---
M manifests/role/designate.pp
M modules/openstack/templates/icehouse/designate/designate.conf.erb
2 files changed, 8 insertions(+), 3 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/designate.pp b/manifests/role/designate.pp
index 12f0ef5..612b47d 100644
--- a/manifests/role/designate.pp
+++ b/manifests/role/designate.pp
@@ -5,11 +5,13 @@
 
     $commondesignateconfig = {
         db_name =>      'designate',
-        db_user =>      'designate',
+        db_user =>      $passwords::designate::db_user,
         db_pass =>      $passwords::designate::db_pass,
         pdns_db_name => 'pdns',
-        pdns_db_user => 'pdns',
+        pdns_db_user => $passwords::pdns::db_user,
         pdns_db_pass => $passwords::pdns::db_pass,
+        pdns_db_admin_user => $passwords::pdns::db_admin_user,
+        pdns_db_admin_pass => $passwords::pdns::db_admin_pass,
     }
 }
 
diff --git a/modules/openstack/templates/icehouse/designate/designate.conf.erb 
b/modules/openstack/templates/icehouse/designate/designate.conf.erb
index 7555db2..b7c3079 100644
--- a/modules/openstack/templates/icehouse/designate/designate.conf.erb
+++ b/modules/openstack/templates/icehouse/designate/designate.conf.erb
@@ -234,10 +234,13 @@
 #############################
 
 [backend:powerdns]
-database_connection = mysql://<%= designateconfig["pdns_db_user"] %>:<%= 
designateconfig["pdns_db_pass"] %>@<%= designateconfig["db_host"] %>/<%= 
designateconfig["pdns_db_name"] %>
 connection_debug = 100
 connection_trace = True
 sqlite_synchronous = True
 idle_timeout = 3600
 max_retries = 10
 retry_interval = 10
+database_connection = mysql://<%= designateconfig["pdns_db_user"] %>:<%= 
designateconfig["pdns_db_pass"] %>@<%= designateconfig["db_host"] %>/<%= 
designateconfig["pdns_db_name"] %>
+# This is an alternate db account with more rights -- this setting should
+#  be used when running the db-sync command and the like during upgrades.
+#database_connection = mysql://<%= designateconfig["pdns_db_admin_user"] 
%>:<%= designateconfig["pdns_db_admin_pass"] %>@<%= designateconfig["db_host"] 
%>/<%= designateconfig["pdns_db_name"] %>

-- 
To view, visit https://gerrit.wikimedia.org/r/197367
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d66b8d52bdebcc05ac7247a659aef8a4fb508be
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to