Re: [Pdns-users] pdns 3.1-4 (debian wheezy): zone2sql does not remove trailing '.'

2013-08-20 Thread Peter van Dijk
Hello Frank,

I would suggest changing the script to talk to SQL directly.

Kind regards,
-- 
Peter van Dijk
Netherlabs Computer Consulting BV - http://www.netherlabs.nl/

On Aug 20, 2013, at 9:49 , Frank van den Diepstraten wrote:

> Hi Peter,
> 
> I use this script to add complete subnets (/24s) with reverse and forward 
> DNS. 
> 
> We have 1 (main) domain and multiple services for customers, for every 
> service (i.e. ftth , dsl , colo etc) I add new reverse and forward DNS for 
> this (main) domain. This is done by a script using zone2sql.
> 
> If you know about another way to do this : I like to know as this can be a 
> solution too :)



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns 3.1-4 (debian wheezy): zone2sql does not remove trailing '.'

2013-08-20 Thread Frank van den Diepstraten
Hi Peter,

I use this script to add complete subnets (/24s) with reverse and forward DNS. 

We have 1 (main) domain and multiple services for customers, for every service 
(i.e. ftth , dsl , colo etc) I add new reverse and forward DNS for this (main) 
domain. This is done by a script using zone2sql.

If you know about another way to do this : I like to know as this can be a 
solution too :)

Regards,

Frank.

-Oorspronkelijk bericht-
Van: pdns-users-boun...@mailman.powerdns.com 
[mailto:pdns-users-boun...@mailman.powerdns.com] Namens Peter van Dijk
Verzonden: dinsdag 20 augustus 2013 9:43
Aan: pdns-users Users
Onderwerp: Re: [Pdns-users] pdns 3.1-4 (debian wheezy): zone2sql does not 
remove trailing '.'

Hello Frank,

putting double dots in the database certainly is not okay. When I said you 
could try to ignore it, I meant single dots.

I have to ask - why are you repeatedly exporting and importing zones?

Also, PowerDNS 3.2 and 3.3 will not send these broken packets (they will send 
SERVFAIL instead, which is not much more useful, of course).

Kind regards,
--
Peter van Dijk
Netherlabs Computer Consulting BV - http://www.netherlabs.nl/

On Aug 20, 2013, at 9:40 , Frank van den Diepstraten wrote:

> 
> Hi Peter,
> 
> I just tried to ignore this issue as you said it shouldt cause any problems. 
> But when I edited my zone and put it back in the database (with in the SOA 
> the 2 dots that are added by zone2sql) I get this:
> 
> :~$ host -t SOA domain.tld ip-of-the-ns-server ;; Got bad packet: 
> extra input data
> 109 bytes
> 0e e2 85 00 00 01 00 01 00 00 00 00 0c 77 76 64  .dom
> 65 76 61 63 68 74 6a 65 73 02 6e 6c 00 00 06 00  ain.tld.
> 01 c0 0c 00 06 00 01 00 00 0e 10 00 40 03 6e 73  @.ns
> 31 0c 63 6f 6e 63 65 70 74 73 2d 69 63 74 02 6e  1.domain.tld
> 6c 00 00 0a 70 6f 73 74 6d 61 73 74 65 72 08 63  l...postmaster.d
> 6f 6e 63 65 70 74 73 c0 3e 77 fc 1b d6 00 00 70  omain.>w...p
> 80 00 00 1c 20 00 09 3a 80 00 01 51 80   ...:...Q.
> 
> Doesnt seem to work fine...
> 
> Any clue?
> 
> -Oorspronkelijk bericht-
> Van: pdns-users-boun...@mailman.powerdns.com 
> [mailto:pdns-users-boun...@mailman.powerdns.com] Namens Peter van Dijk
> Verzonden: donderdag 15 augustus 2013 10:36
> Aan: pdns-users Users
> Onderwerp: Re: [Pdns-users] pdns 3.1-4 (debian wheezy): zone2sql does not 
> remove trailing '.'
> 
> Hello Frank,
> 
> On Aug 13, 2013, at 13:23 , Frank van den Diepstraten wrote:
> 
>> This is the SOA record from one of the domains in the server running version 
>> 3.1-4:
>> 
>> 4640410 | 2 | x.x.x.in-addr.arpa | SOA  | ns1.domain.tld 
>> postmaster.domain.tld 2013060405 28800 7200 604800 86400  | 3600 |0 |
>> NULL
>> 
>> Now when I use a script to write the zone to a file I have this output:
>> 
>> @   IN  SOA ns1.domain.tld. postmaster.domain.tld. (
>>2013060406 ; serial
>> 28800 ; refresh
>>  7200 ; retry
>>604800 ; expire
>> 86400); minimum
>> 
>> As you can see there are now trailing '.' Behind the domain and postmaster 
>> mailadres. As far as i now this is the normal behaviour. Now when I use 
>> zone2sql to make the right syntax to get the edited file back into the 
>> database this happens:
>> 
>> root@ns1:/tmp# zone2sql --gmysql --zone=/tmp/domain.1 
>> --zone-name=domain.tld insert into records (domain_id,
>> name,type,content,ttl,prio) select id ,'domain.tld', 'SOA', 
>> 'ns1.domain.tld. postmaster.domain.tld. 2013010901 28800 7200 604800 
>> 86400', 3600, 0 from domains where name='domain.tld';
>> 
>> When I manually remove the trailing dots out of the database the 
>> zone2sql script put the domainname instead, so thats nog solving the 
>> problem (this is what the SOA looks like when I remove the dots:
>> ns1.domain.tld.domain.tld. postmaster.domain.tld.domain.tld.)
>> 
>> As you can see the trailing dots are not being stripped by zone2sql which 
>> always was the case in the earlier versions. Is this a bug or is there 
>> somthing else I missed?
> 
> This is a change that indeed occurred between 2.9.22 and 3.0. The dot should 
> be removed but it does not cause any problems. Feel free to file a report at 
> https://github.com/PowerDNS/pdns/issues if you feel we should change this.
> 
> If this is actually causing you problems, please explain how and why!
> 
> Kind regards,
> --
> Peter van Dijk
> Netherlabs Computer Consulting BV - http://www.netherlabs.nl/
> 
> 
> ___
> Pdns-users mailing list
> Pdns-users@mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users



___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns 3.1-4 (debian wheezy): zone2sql does not remove trailing '.'

2013-08-20 Thread Peter van Dijk
Hello Frank,

putting double dots in the database certainly is not okay. When I said you 
could try to ignore it, I meant single dots.

I have to ask - why are you repeatedly exporting and importing zones?

Also, PowerDNS 3.2 and 3.3 will not send these broken packets (they will send 
SERVFAIL instead, which is not much more useful, of course).

Kind regards,
-- 
Peter van Dijk
Netherlabs Computer Consulting BV - http://www.netherlabs.nl/

On Aug 20, 2013, at 9:40 , Frank van den Diepstraten wrote:

> 
> Hi Peter,
> 
> I just tried to ignore this issue as you said it shouldt cause any problems. 
> But when I edited my zone and put it back in the database (with in the SOA 
> the 2 dots that are added by zone2sql) I get this:
> 
> :~$ host -t SOA domain.tld ip-of-the-ns-server
> ;; Got bad packet: extra input data
> 109 bytes
> 0e e2 85 00 00 01 00 01 00 00 00 00 0c 77 76 64  .dom
> 65 76 61 63 68 74 6a 65 73 02 6e 6c 00 00 06 00  ain.tld.
> 01 c0 0c 00 06 00 01 00 00 0e 10 00 40 03 6e 73  @.ns
> 31 0c 63 6f 6e 63 65 70 74 73 2d 69 63 74 02 6e  1.domain.tld
> 6c 00 00 0a 70 6f 73 74 6d 61 73 74 65 72 08 63  l...postmaster.d
> 6f 6e 63 65 70 74 73 c0 3e 77 fc 1b d6 00 00 70  omain.>w...p
> 80 00 00 1c 20 00 09 3a 80 00 01 51 80   ...:...Q.
> 
> Doesnt seem to work fine...
> 
> Any clue?
> 
> -Oorspronkelijk bericht-
> Van: pdns-users-boun...@mailman.powerdns.com 
> [mailto:pdns-users-boun...@mailman.powerdns.com] Namens Peter van Dijk
> Verzonden: donderdag 15 augustus 2013 10:36
> Aan: pdns-users Users
> Onderwerp: Re: [Pdns-users] pdns 3.1-4 (debian wheezy): zone2sql does not 
> remove trailing '.'
> 
> Hello Frank,
> 
> On Aug 13, 2013, at 13:23 , Frank van den Diepstraten wrote:
> 
>> This is the SOA record from one of the domains in the server running version 
>> 3.1-4:
>> 
>> 4640410 | 2 | x.x.x.in-addr.arpa | SOA  | ns1.domain.tld 
>> postmaster.domain.tld 2013060405 28800 7200 604800 86400  | 3600 |0 |
>> NULL
>> 
>> Now when I use a script to write the zone to a file I have this output:
>> 
>> @   IN  SOA ns1.domain.tld. postmaster.domain.tld. (
>>2013060406 ; serial
>> 28800 ; refresh
>>  7200 ; retry
>>604800 ; expire
>> 86400); minimum
>> 
>> As you can see there are now trailing '.' Behind the domain and postmaster 
>> mailadres. As far as i now this is the normal behaviour. Now when I use 
>> zone2sql to make the right syntax to get the edited file back into the 
>> database this happens:
>> 
>> root@ns1:/tmp# zone2sql --gmysql --zone=/tmp/domain.1 
>> --zone-name=domain.tld insert into records (domain_id, 
>> name,type,content,ttl,prio) select id ,'domain.tld', 'SOA', 
>> 'ns1.domain.tld. postmaster.domain.tld. 2013010901 28800 7200 604800 
>> 86400', 3600, 0 from domains where name='domain.tld';
>> 
>> When I manually remove the trailing dots out of the database the 
>> zone2sql script put the domainname instead, so thats nog solving the 
>> problem (this is what the SOA looks like when I remove the dots: 
>> ns1.domain.tld.domain.tld. postmaster.domain.tld.domain.tld.)
>> 
>> As you can see the trailing dots are not being stripped by zone2sql which 
>> always was the case in the earlier versions. Is this a bug or is there 
>> somthing else I missed?
> 
> This is a change that indeed occurred between 2.9.22 and 3.0. The dot should 
> be removed but it does not cause any problems. Feel free to file a report at 
> https://github.com/PowerDNS/pdns/issues if you feel we should change this.
> 
> If this is actually causing you problems, please explain how and why!
> 
> Kind regards,
> --
> Peter van Dijk
> Netherlabs Computer Consulting BV - http://www.netherlabs.nl/
> 
> 
> ___
> Pdns-users mailing list
> Pdns-users@mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users




signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns 3.1-4 (debian wheezy): zone2sql does not remove trailing '.'

2013-08-20 Thread Frank van den Diepstraten

Hi Peter,

I just tried to ignore this issue as you said it shouldt cause any problems. 
But when I edited my zone and put it back in the database (with in the SOA the 
2 dots that are added by zone2sql) I get this:

:~$ host -t SOA domain.tld ip-of-the-ns-server
;; Got bad packet: extra input data
109 bytes
0e e2 85 00 00 01 00 01 00 00 00 00 0c 77 76 64  .dom
65 76 61 63 68 74 6a 65 73 02 6e 6c 00 00 06 00  ain.tld.
01 c0 0c 00 06 00 01 00 00 0e 10 00 40 03 6e 73  @.ns
31 0c 63 6f 6e 63 65 70 74 73 2d 69 63 74 02 6e  1.domain.tld
6c 00 00 0a 70 6f 73 74 6d 61 73 74 65 72 08 63  l...postmaster.d
6f 6e 63 65 70 74 73 c0 3e 77 fc 1b d6 00 00 70  omain.>w...p
80 00 00 1c 20 00 09 3a 80 00 01 51 80   ...:...Q.

Doesnt seem to work fine...

Any clue?

-Oorspronkelijk bericht-
Van: pdns-users-boun...@mailman.powerdns.com 
[mailto:pdns-users-boun...@mailman.powerdns.com] Namens Peter van Dijk
Verzonden: donderdag 15 augustus 2013 10:36
Aan: pdns-users Users
Onderwerp: Re: [Pdns-users] pdns 3.1-4 (debian wheezy): zone2sql does not 
remove trailing '.'

Hello Frank,

On Aug 13, 2013, at 13:23 , Frank van den Diepstraten wrote:

> This is the SOA record from one of the domains in the server running version 
> 3.1-4:
>  
> 4640410 | 2 | x.x.x.in-addr.arpa | SOA  | ns1.domain.tld 
> postmaster.domain.tld 2013060405 28800 7200 604800 86400  | 3600 |0 | 
>NULL
>  
> Now when I use a script to write the zone to a file I have this output:
>  
> @   IN  SOA ns1.domain.tld. postmaster.domain.tld. (
> 2013060406 ; serial
>  28800 ; refresh
>   7200 ; retry
> 604800 ; expire
>  86400); minimum
>  
> As you can see there are now trailing '.' Behind the domain and postmaster 
> mailadres. As far as i now this is the normal behaviour. Now when I use 
> zone2sql to make the right syntax to get the edited file back into the 
> database this happens:
>  
> root@ns1:/tmp# zone2sql --gmysql --zone=/tmp/domain.1 
> --zone-name=domain.tld insert into records (domain_id, 
> name,type,content,ttl,prio) select id ,'domain.tld', 'SOA', 
> 'ns1.domain.tld. postmaster.domain.tld. 2013010901 28800 7200 604800 
> 86400', 3600, 0 from domains where name='domain.tld';
>  
> When I manually remove the trailing dots out of the database the 
> zone2sql script put the domainname instead, so thats nog solving the 
> problem (this is what the SOA looks like when I remove the dots: 
> ns1.domain.tld.domain.tld. postmaster.domain.tld.domain.tld.)
>  
> As you can see the trailing dots are not being stripped by zone2sql which 
> always was the case in the earlier versions. Is this a bug or is there 
> somthing else I missed?

This is a change that indeed occurred between 2.9.22 and 3.0. The dot should be 
removed but it does not cause any problems. Feel free to file a report at 
https://github.com/PowerDNS/pdns/issues if you feel we should change this.

If this is actually causing you problems, please explain how and why!

Kind regards,
--
Peter van Dijk
Netherlabs Computer Consulting BV - http://www.netherlabs.nl/


___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns 3.1-4 (debian wheezy): zone2sql does not remove trailing '.'

2013-08-15 Thread Frank van den Diepstraten
Thanks for your answer! 

In fact I use a script for adding bulk records into the database (reverse and 
forward for whole subnets). This script always worked fine. Now everytime I 
want to edit a zone it adds a '.' , so when I edit a zone 2 times, 2 dots are 
added behind the SOA, like this:

@   IN  SOA ns1.domain.tld.. postmaster.domain.tld..

After 4 times I get this:

@   IN  SOA ns1.domain.tld postmaster.domain.tld

Thats not the behaviour I want. 

If the only solution is to make a report I will do that, but perhaps the above 
example is making it more clear and another solution is possible.

Regards,

Frank.

-Oorspronkelijk bericht-
Van: pdns-users-boun...@mailman.powerdns.com 
[mailto:pdns-users-boun...@mailman.powerdns.com] Namens Peter van Dijk
Verzonden: donderdag 15 augustus 2013 10:36
Aan: pdns-users Users
Onderwerp: Re: [Pdns-users] pdns 3.1-4 (debian wheezy): zone2sql does not 
remove trailing '.'

Hello Frank,

On Aug 13, 2013, at 13:23 , Frank van den Diepstraten wrote:

> This is the SOA record from one of the domains in the server running version 
> 3.1-4:
>  
> 4640410 | 2 | x.x.x.in-addr.arpa | SOA  | ns1.domain.tld 
> postmaster.domain.tld 2013060405 28800 7200 604800 86400  | 3600 |0 | 
>NULL
>  
> Now when I use a script to write the zone to a file I have this output:
>  
> @   IN  SOA ns1.domain.tld. postmaster.domain.tld. (
> 2013060406 ; serial
>  28800 ; refresh
>   7200 ; retry
> 604800 ; expire
>  86400); minimum
>  
> As you can see there are now trailing '.' Behind the domain and postmaster 
> mailadres. As far as i now this is the normal behaviour. Now when I use 
> zone2sql to make the right syntax to get the edited file back into the 
> database this happens:
>  
> root@ns1:/tmp# zone2sql --gmysql --zone=/tmp/domain.1 
> --zone-name=domain.tld insert into records (domain_id, 
> name,type,content,ttl,prio) select id ,'domain.tld', 'SOA', 
> 'ns1.domain.tld. postmaster.domain.tld. 2013010901 28800 7200 604800 
> 86400', 3600, 0 from domains where name='domain.tld';
>  
> When I manually remove the trailing dots out of the database the 
> zone2sql script put the domainname instead, so thats nog solving the 
> problem (this is what the SOA looks like when I remove the dots: 
> ns1.domain.tld.domain.tld. postmaster.domain.tld.domain.tld.)
>  
> As you can see the trailing dots are not being stripped by zone2sql which 
> always was the case in the earlier versions. Is this a bug or is there 
> somthing else I missed?

This is a change that indeed occurred between 2.9.22 and 3.0. The dot should be 
removed but it does not cause any problems. Feel free to file a report at 
https://github.com/PowerDNS/pdns/issues if you feel we should change this.

If this is actually causing you problems, please explain how and why!

Kind regards,
--
Peter van Dijk
Netherlabs Computer Consulting BV - http://www.netherlabs.nl/


___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns 3.1-4 (debian wheezy): zone2sql does not remove trailing '.'

2013-08-15 Thread Peter van Dijk
Hello Frank,

On Aug 13, 2013, at 13:23 , Frank van den Diepstraten wrote:

> This is the SOA record from one of the domains in the server running version 
> 3.1-4:
>  
> 4640410 | 2 | x.x.x.in-addr.arpa | SOA  | ns1.domain.tld 
> postmaster.domain.tld 2013060405 28800 7200 604800 86400  | 3600 |0 | 
>NULL
>  
> Now when I use a script to write the zone to a file I have this output:
>  
> @   IN  SOA ns1.domain.tld. postmaster.domain.tld. (
> 2013060406 ; serial
>  28800 ; refresh
>   7200 ; retry
> 604800 ; expire
>  86400); minimum
>  
> As you can see there are now trailing ‘.’ Behind the domain and postmaster 
> mailadres. As far as i now this is the normal behaviour. Now when I use 
> zone2sql to make the right syntax to get the edited file back into the 
> database this happens:
>  
> root@ns1:/tmp# zone2sql --gmysql --zone=/tmp/domain.1 --zone-name=domain.tld
> insert into records (domain_id, name,type,content,ttl,prio) select id 
> ,'domain.tld', 'SOA', 'ns1.domain.tld. postmaster.domain.tld. 2013010901 
> 28800 7200 604800 86400', 3600, 0 from domains where name='domain.tld';
>  
> When I manually remove the trailing dots out of the database the zone2sql 
> script put the domainname instead, so thats nog solving the problem (this is 
> what the SOA looks like when I remove the dots: ns1.domain.tld.domain.tld. 
> postmaster.domain.tld.domain.tld.)
>  
> As you can see the trailing dots are not being stripped by zone2sql which 
> always was the case in the earlier versions. Is this a bug or is there 
> somthing else I missed?

This is a change that indeed occurred between 2.9.22 and 3.0. The dot should be 
removed but it does not cause any problems. Feel free to file a report at 
https://github.com/PowerDNS/pdns/issues if you feel we should change this.

If this is actually causing you problems, please explain how and why!

Kind regards,
-- 
Peter van Dijk
Netherlabs Computer Consulting BV - http://www.netherlabs.nl/


___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


[Pdns-users] pdns 3.1-4 (debian wheezy): zone2sql does not remove trailing '.'

2013-08-13 Thread Frank van den Diepstraten

Hi all,

I upgraded my debian system to wheezy with pdns-server 3.1-4 (came from 
2.9.22-8 which was the latest squeeze version). Everything  looked fine, but 
when I started using the zone2sql script I saw the following problem:

This is the SOA record from one of the domains in the server running version 
3.1-4:

4640410 | 2 | x.x.x.in-addr.arpa | SOA  | ns1.domain.tld 
postmaster.domain.tld 2013060405 28800 7200 604800 86400  | 3600 |0 |   
 NULL

Now when I use a script to write the zone to a file I have this output:

@   IN  SOA ns1.domain.tld. postmaster.domain.tld. (
2013060406 ; serial
 28800 ; refresh
  7200 ; retry
604800 ; expire
 86400); minimum

As you can see there are now trailing '.' Behind the domain and postmaster 
mailadres. As far as i now this is the normal behaviour. Now when I use 
zone2sql to make the right syntax to get the edited file back into the database 
this happens:

root@ns1:/tmp# zone2sql --gmysql --zone=/tmp/domain.1 --zone-name=domain.tld
insert into records (domain_id, name,type,content,ttl,prio) select id 
,'domain.tld', 'SOA', 'ns1.domain.tld. postmaster.domain.tld. 2013010901 28800 
7200 604800 86400', 3600, 0 from domains where name='domain.tld';

When I manually remove the trailing dots out of the database the zone2sql 
script put the domainname instead, so thats nog solving the problem (this is 
what the SOA looks like when I remove the dots: ns1.domain.tld.domain.tld. 
postmaster.domain.tld.domain.tld.)

As you can see the trailing dots are not being stripped by zone2sql which 
always was the case in the earlier versions. Is this a bug or is there somthing 
else I missed?

Regards,

Frank.






Met vriendelijke groet,
Frank van den Diepstraten
System engineer

[cid:image001.png@01CE973F.0F477C40]

E: 
frank.van.den.diepstra...@telfortglasvezel.nl
T: +31 (0)76 - 750 1694
<>___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users