summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Harbott <j.harbott@x-ion.de>2020-09-27 12:23:37 +0200
committerNicolas Bock <nicolas.bock@canonical.com>2021-02-16 23:05:16 +0000
commit39c2566fcd70f8e38ff898bb411aa6a63fe11a2c (patch)
treeb7b1392af353dc2bb84e078af2872c2b64bfb9a5
parentdbf90fe5df83b48aeaa28946c93e606933c99d8b (diff)
downloaddesignate-39c2566fcd70f8e38ff898bb411aa6a63fe11a2c.tar.gz
Fix pdns4 devstack plugin
We no longer need to deal with xenial or older distro versions, so we can assume that we can always install pdns4 from the distro directly and don't need the distro version check any longer. Drop a config option that was removed in pdns 4.2.x. Use mysql credentials correctly. Change-Id: I90af3a092296f943509833608f25522b6f8e9ab6 (cherry picked from commit 6f17fe10bb37d71944e16a422606ccf0f78c6771)
-rw-r--r--devstack/designate_plugins/backend-pdns422
1 files changed, 1 insertions, 21 deletions
diff --git a/devstack/designate_plugins/backend-pdns4 b/devstack/designate_plugins/backend-pdns4
index 577421ac..3b75b244 100644
--- a/devstack/designate_plugins/backend-pdns4
+++ b/devstack/designate_plugins/backend-pdns4
@@ -32,25 +32,6 @@ fi
# install_designate_backend - install any external requirements
function install_designate_backend {
if is_ubuntu; then
- GetOSVersion
- if [ "$os_CODENAME" = "trusty" ]; then
- sudo tee /etc/apt/sources.list.d/pdns.list > /dev/null <<EOF
-deb [arch=amd64] http://repo.powerdns.com/ubuntu trusty-auth-40 main
-EOF
- sudo tee /etc/apt/preferences.d/pdns > /dev/null <<EOF
-Package: pdns-*
-Pin: origin repo.powerdns.com
-Pin-Priority: 600
-EOF
- curl https://repo.powerdns.com/FD380FBB-pub.asc | sudo apt-key add - &&
- sudo apt-get update
- elif [ "$os_CODENAME" = "xenial" ]; then
- echo "Use PDNS4 from apt repo"
- elif [ "$os_CODENAME" = "bionic" ]; then
- echo "Use PDNS4 from apt repo"
- else
- die $LINENO "PDNS4 backend only supports bionic, trusty or xenial"
- fi
PDNS=pdns-server
else
die $LINENO "PDNS4 Backend plugin backend only supports Ubuntu"
@@ -118,7 +99,6 @@ slave=yes
cache-ttl=0
query-cache-ttl=0
negquery-cache-ttl=0
-out-of-zone-additional-processing=no
webserver=yes
webserver-address=$(ipv6_unquote $DESIGNATE_SERVICE_HOST)
webserver-allow-from=$(ipv6_unquote $DESIGNATE_SERVICE_HOST),127.0.0.1,::1
@@ -167,7 +147,7 @@ function init_designate_backend {
# (Re)create designate_pdns database
recreate_database designate_pdns utf8
if is_service_enabled mysql; then
- sudo mysql -u root designate_pdns < $DESIGNATE_PLUGINS/backend-pdns4-mysql-db.sql
+ sudo mysql -u$DATABASE_USER -p$DATABASE_PASSWORD -h$MYSQL_HOST designate_pdns < $DESIGNATE_PLUGINS/backend-pdns4-mysql-db.sql
elif is_service_enabled postgresql; then
sudo psql -U root -d designate_pdns -f $DESIGNATE_PLUGINS/backend-pdns4-pgsql-db.sql
else