From e433bdaeec1e88d0317cd3e5305f88c3b42410b0 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Sun, 26 Feb 2023 01:17:34 +1000 Subject: [PATCH] Fix for pdns startup --- Jenkinsfile | 6 +++++- docker/dev/pdns-db.sql | 24 ++++++++++++------------ docker/docker-compose.ci.yml | 2 +- docker/docker-compose.dev.yml | 2 +- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 737b8ed..1e39e99 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -112,12 +112,16 @@ pipeline { // Dumps to analyze later sh 'mkdir -p debug' sh 'docker-compose cp fullstack:/data/logs/acme.sh.log debug/acme.sh.log' - sh 'docker logs $(docker-compose ps -q fullstack) > debug/docker_fullstack.log' + sh 'docker-compose logs fullstack > debug/docker_compose_fullstack.log' sh 'docker logs $(docker-compose ps -q stepca) > debug/docker_stepca.log' + sh 'docker-compose logs stepca > debug/docker_compose_stepca.log' sh 'docker logs $(docker-compose ps -q pdns) > debug/docker_pdns.log' + sh 'docker-compose logs pdns > debug/docker_compose_pdns.log' sh 'docker logs $(docker-compose ps -q pdns-db) > debug/docker_pdns-db.log' + sh 'docker-compose logs pdns-db > debug/docker_compose_pdns-db.log' sh 'docker logs $(docker-compose ps -q dnsrouter) > debug/docker_dnsrouter.log' + sh 'docker-compose logs dnsrouter > debug/docker_compose_dnsrouter.log' junit 'test/results/junit/*' } } diff --git a/docker/dev/pdns-db.sql b/docker/dev/pdns-db.sql index dd7f293..1793f27 100644 --- a/docker/dev/pdns-db.sql +++ b/docker/dev/pdns-db.sql @@ -4,12 +4,12 @@ CREATE TABLE `comments` ( `name` varchar(255) NOT NULL, `type` varchar(10) NOT NULL, `modified_at` int(11) NOT NULL, - `account` varchar(40) CHARACTER SET utf8mb3 DEFAULT NULL, - `comment` text CHARACTER SET utf8mb3 NOT NULL, + `account` varchar(40) DEFAULT NULL, + `comment` text NOT NULL, PRIMARY KEY (`id`), KEY `comments_name_type_idx` (`name`,`type`), KEY `comments_order_idx` (`domain_id`,`modified_at`) -); +) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE `cryptokeys` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -20,7 +20,7 @@ CREATE TABLE `cryptokeys` ( `content` text DEFAULT NULL, PRIMARY KEY (`id`), KEY `domainidindex` (`domain_id`) -); +) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE `domainmetadata` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -29,7 +29,7 @@ CREATE TABLE `domainmetadata` ( `content` text DEFAULT NULL, PRIMARY KEY (`id`), KEY `domainmetadata_idx` (`domain_id`,`kind`) -); +) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `domainmetadata` VALUES (1,1,'SOA-EDIT-API','DEFAULT'); @@ -40,10 +40,10 @@ CREATE TABLE `domains` ( `last_check` int(11) DEFAULT NULL, `type` varchar(6) NOT NULL, `notified_serial` int(10) unsigned DEFAULT NULL, - `account` varchar(40) CHARACTER SET utf8mb3 DEFAULT NULL, + `account` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name_index` (`name`) -); +) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `domains` VALUES (1,'example.com','',NULL,'NATIVE',NULL,''); @@ -56,13 +56,13 @@ CREATE TABLE `records` ( `ttl` int(11) DEFAULT NULL, `prio` int(11) DEFAULT NULL, `disabled` tinyint(1) DEFAULT 0, - `ordername` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, + `ordername` varchar(255) DEFAULT NULL, `auth` tinyint(1) DEFAULT 1, PRIMARY KEY (`id`), KEY `nametype_index` (`name`,`type`), KEY `domain_id` (`domain_id`), KEY `ordername` (`ordername`) -); +) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `records` VALUES (1,1,'example.com','NS','ns1.pdns',1500,0,0,NULL,1), @@ -73,9 +73,9 @@ INSERT INTO `records` VALUES CREATE TABLE `supermasters` ( `ip` varchar(64) NOT NULL, `nameserver` varchar(255) NOT NULL, - `account` varchar(40) CHARACTER SET utf8mb3 NOT NULL, + `account` varchar(40) NOT NULL, PRIMARY KEY (`ip`,`nameserver`) -); +) DEFAULT CHARSET=latin1; CREATE TABLE `tsigkeys` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -84,4 +84,4 @@ CREATE TABLE `tsigkeys` ( `secret` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `namealgoindex` (`name`,`algorithm`) -); +) ENGINE=MyISAM DEFAULT CHARSET=latin1; diff --git a/docker/docker-compose.ci.yml b/docker/docker-compose.ci.yml index 42596b9..acc0dbe 100644 --- a/docker/docker-compose.ci.yml +++ b/docker/docker-compose.ci.yml @@ -67,7 +67,7 @@ services: volumes: - pdns_mysql_vol:/var/lib/mysql - '/etc/localtime:/etc/localtime:ro' - - ./dev/pdns-db.sql:/docker-entrypoint-initdb.d/01_init.sql:ro + - './dev/pdns-db.sql:/docker-entrypoint-initdb.d/01_init.sql:ro' dnsrouter: image: jc21/dnsrouter diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index a12a269..3c1f9f4 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -114,7 +114,7 @@ services: volumes: - npm_pdns_mysql_vol:/var/lib/mysql - /etc/localtime:/etc/localtime:ro - - ./dev/pdns-db.sql:/docker-entrypoint-initdb.d/01_init.sql:ro + - './dev/pdns-db.sql:/docker-entrypoint-initdb.d/01_init.sql:ro' npm-dnsrouter: image: jc21/dnsrouter