Single slave zone definition for two view (cache file name problem)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Single slave zone definition for two view (cache file name problem)

Konstantin Stefanov
Hello.

After upgrading from BIND 4.6 to 4.10.2, named requires that different
slave zone have separate file for cache.

With 4.6 I had the following config:

named.conf:

view "internal" {
        match /* match condition */;
        include "common.zones";
};

view "external" {
        match /* match condition */;
        include "common.zones";
};

common.zones:

zone "aaa.example.org" {
        type slave;
        file "slave/aaa.example.org";
        masters {MASTERIP;};
};

It worked fine with 4.6 (although it was considered incorrect).

After upgrade to 4.10 named started complaining:

common.zones:3: writeable file 'slave/aaa.example.org': already in use:
common.zones:3

As I understand, now I need to have separate files for different views.

But is there a way to have them automatically assigned and to write
something like:

file "slave/aaa.example.org.${view_name}"

or any other way to have only one defininition for common zones?

I found 'in-view' option, but again it requires two definitions for
every zone: one with "file" and "masters" directives, and another with
"in-view" option. Moreover, these two definitions must be in different
files, as I have to include one in first view, and another (with
'in-view') in all other views, so I have to keep two separate files
synced with one another.

So is it possible to have only one definition for slave zones that are
shared between different views?

--
Konstantin Stefanov,

Research Computing Center
M.V Lomonosov Moscow State University
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

RE: Single slave zone definition for two view (cache file name problem)

Lightner, Jeffrey
4.x would be quite ancient.   Where are you getting those version numbers?   You should be using 9.x these days so I suspect the BIND version isn't what you think it is.    Is it possible the version you're reporting is you OS rather than your BIND?

What is reported when you run "named -v"?

Anyway what we do is in our views is simply name the internal zone files the same as external and prepend internal- to the name.

e.g. myzone.com = external zone file
internal-myzone.com = internal zone file.

If they're the same you can simply copy from one to the other.   Sometimes they are not the same which is why you have views in the first place.




-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Constantin Stefanov
Sent: Tuesday, March 17, 2015 10:37 AM
To: [hidden email]
Subject: Single slave zone definition for two view (cache file name problem)

Hello.

After upgrading from BIND 4.6 to 4.10.2, named requires that different slave zone have separate file for cache.

With 4.6 I had the following config:

named.conf:

view "internal" {
        match /* match condition */;
        include "common.zones";
};

view "external" {
        match /* match condition */;
        include "common.zones";
};

common.zones:

zone "aaa.example.org" {
        type slave;
        file "slave/aaa.example.org";
        masters {MASTERIP;};
};

It worked fine with 4.6 (although it was considered incorrect).

After upgrade to 4.10 named started complaining:

common.zones:3: writeable file 'slave/aaa.example.org': already in use:
common.zones:3

As I understand, now I need to have separate files for different views.

But is there a way to have them automatically assigned and to write something like:

file "slave/aaa.example.org.${view_name}"

or any other way to have only one defininition for common zones?

I found 'in-view' option, but again it requires two definitions for every zone: one with "file" and "masters" directives, and another with "in-view" option. Moreover, these two definitions must be in different files, as I have to include one in first view, and another (with
'in-view') in all other views, so I have to keep two separate files synced with one another.

So is it possible to have only one definition for slave zones that are shared between different views?

--
Konstantin Stefanov,

Research Computing Center
M.V Lomonosov Moscow State University
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

/dev/rob0
In reply to this post by Konstantin Stefanov
On Tue, Mar 17, 2015 at 05:36:57PM +0300, Constantin Stefanov wrote:
> After upgrading from BIND 4.6 to 4.10.2, named requires that
> different slave zone have separate file for cache.

Surely you mean s/4/9/g, and yes, this is true.

> With 4.6 I had the following config:
>
> named.conf:
>
> view "internal" {
> match /* match condition */;
> include "common.zones";
> };
>
> view "external" {
> match /* match condition */;
> include "common.zones";
> };
>
> common.zones:
>
> zone "aaa.example.org" {
> type slave;
> file "slave/aaa.example.org";
> masters {MASTERIP;};
> };
>
> It worked fine with 4.6 (although it was considered incorrect).
>
> After upgrade to 4.10 named started complaining:
>
> common.zones:3: writeable file 'slave/aaa.example.org': already in
> use: common.zones:3
>
> As I understand, now I need to have separate files for different
> views.
>
> But is there a way to have them automatically assigned and to write
> something like:
>
> file "slave/aaa.example.org.${view_name}"
>
> or any other way to have only one defininition for common zones?

Here is an easy suggestion:

view "common" {
        match-clients { none; };

        zone "example.com" {
                type slave;
                file "common/example.com";
                masters { example.com-masters; };
        };
        // repeat for other common zones
};

And then your other views can be defined and use the include file as
before, with each zone being:

        in-view "common";

> I found 'in-view' option, but again it requires two definitions for
> every zone: one with "file" and "masters" directives, and another
> with "in-view" option. Moreover, these two definitions must be in
> different files, as I have to include one in first view, and
> another (with 'in-view') in all other views, so I have to keep two
> separate files synced with one another.
>
> So is it possible to have only one definition for slave zones that
> are shared between different views?

Hmmm.  I am not sure if there is a good workaround for that.  But
there are tools like make(1) which can do this for you?  I would
suggest a script to generate the common.zones file from whatever
you're using for the "common" view.

Maybe someone else will have a better suggestion?
--
  http://rob0.nodns4.us/
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Tony Finch
In reply to this post by Konstantin Stefanov
Constantin Stefanov <[hidden email]> wrote:
>
> I found 'in-view' option, but again it requires two definitions for
> every zone: one with "file" and "masters" directives, and another with
> "in-view" option. Moreover, these two definitions must be in different
> files, as I have to include one in first view, and another (with
> 'in-view') in all other views, so I have to keep two separate files
> synced with one another.

I have a similar situation on my workstation server, except in my case the
recursive view needs static-stub configurations for each zone in the
authoritative view.

I have a script called named-listzones (attached) which reads named.conf
and outputs a list of zone name, view, and type. A bit of seddery in the
rc script re-generates the static-stub zone configuration whenever named
is started or reloaded.

named-listzones | sed '
/ auth master$/bp
/ auth slave$/bp
d
:p
s// { type static-stub; server-addresses { ::1; }; };/
s/^/zone /
/"[.]"/d
' >named.static-stub

Tony.
--
f.anthony.n.finch  <[hidden email]>  http://dotat.at/
Biscay, Fitzroy: East or northeast 5 or 6, occasionally 7 in south Fitzroy.
Moderate or rough. Showers. Moderate or good.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users

named-listzones (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Konstantin Stefanov
In reply to this post by Lightner, Jeffrey


On 17.03.2015 18:05, Lightner, Jeff wrote:
> 4.x would be quite ancient.   Where are you getting those version
> numbers?   You should be using 9.x these days so I suspect the BIND
> version isn't what you think it is.    Is it possible the version
> you're reporting is you OS rather than your BIND?
>
> What is reported when you run "named -v"?
I mistyped, I meant 9.6, sorry.

> Anyway what we do is in our views is simply name the internal zone
> files the same as external and prepend internal- to the name.
>
> e.g. myzone.com = external zone file internal-myzone.com = internal
> zone file.
>
> If they're the same you can simply copy from one to the other.
> Sometimes they are not the same which is why you have views in the
> first place.
These files are created by named itself, so I can't simplycopy them. The
question is not where to get the files, the question is how to simplify
config. With 9.6 I could have only one definition for a zone shared
between 2 views, although it was considered incorrect.
After upgrade to 9.10 old config does not work and I see no way to keep
the config as simple.


The question is - how to make the config simple, as was available before
upgrade.

>
> -----Original Message----- From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Constantin
> Stefanov Sent: Tuesday, March 17, 2015 10:37 AM To:
> [hidden email] Subject: Single slave zone definition for
> two view (cache file name problem)
>
> Hello.
>
> After upgrading from BIND 4.6 to 4.10.2, named requires that
> different slave zone have separate file for cache.
>
> With 4.6 I had the following config:
>
> named.conf:
>
> view "internal" { match /* match condition */; include
> "common.zones"; };
>
> view "external" { match /* match condition */; include
> "common.zones"; };
>
> common.zones:
>
> zone "aaa.example.org" { type slave; file "slave/aaa.example.org";
> masters {MASTERIP;}; };
>
> It worked fine with 4.6 (although it was considered incorrect).
>
> After upgrade to 4.10 named started complaining:
>
> common.zones:3: writeable file 'slave/aaa.example.org': already in
> use: common.zones:3
>
> As I understand, now I need to have separate files for different
> views.
>
> But is there a way to have them automatically assigned and to write
> something like:
>
> file "slave/aaa.example.org.${view_name}"
>
> or any other way to have only one defininition for common zones?
>
> I found 'in-view' option, but again it requires two definitions for
> every zone: one with "file" and "masters" directives, and another
> with "in-view" option. Moreover, these two definitions must be in
> different files, as I have to include one in first view, and another
> (with 'in-view') in all other views, so I have to keep two separate
> files synced with one another.
>
> So is it possible to have only one definition for slave zones that
> are shared between different views?
>
> -- Konstantin Stefanov,
>
> Research Computing Center M.V Lomonosov Moscow State University
> _______________________________________________ Please visit
> https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from
> this list
>
> bind-users mailing list [hidden email]
> https://lists.isc.org/mailman/listinfo/bind-users 
> _______________________________________________ Please visit
> https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from
> this list
>
> bind-users mailing list [hidden email]
> https://lists.isc.org/mailman/listinfo/bind-users
>

--
Konstantin Stefanov,

Research Computing Center
M.V Lomonosov Moscow State University
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Konstantin Stefanov
In reply to this post by Tony Finch


On 17.03.2015 19:34, Tony Finch wrote:

> Constantin Stefanov <[hidden email]> wrote:
>>
>> I found 'in-view' option, but again it requires two definitions for
>> every zone: one with "file" and "masters" directives, and another with
>> "in-view" option. Moreover, these two definitions must be in different
>> files, as I have to include one in first view, and another (with
>> 'in-view') in all other views, so I have to keep two separate files
>> synced with one another.
>
> I have a similar situation on my workstation server, except in my case the
> recursive view needs static-stub configurations for each zone in the
> authoritative view.
>
> I have a script called named-listzones (attached) which reads named.conf
> and outputs a list of zone name, view, and type. A bit of seddery in the
> rc script re-generates the static-stub zone configuration whenever named
> is started or reloaded.
Tony, thanks for the script.

I am doing something like that myself now, and using make as suggested
in neighbour letter is a way, too.

My grievance is that previously it worked without any scripting, and now
the scripting is required. Maybe I do not see something?

--
Konstantin Stefanov,

Research Computing Center
M.V Lomonosov Moscow State University
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Konstantin Stefanov
In reply to this post by /dev/rob0
On 17.03.2015 18:32, /dev/rob0 wrote:
> On Tue, Mar 17, 2015 at 05:36:57PM +0300, Constantin Stefanov wrote:
>> After upgrading from BIND 4.6 to 4.10.2, named requires that
>> different slave zone have separate file for cache.
>
> Surely you mean s/4/9/g, and yes, this is true.
Of course, sorry.

>> With 4.6 I had the following config:
>>
>> named.conf:
>>
>> view "internal" {
>> match /* match condition */;
>> include "common.zones";
>> };
>>
>> view "external" {
>> match /* match condition */;
>> include "common.zones";
>> };
>>
>> common.zones:
>>
>> zone "aaa.example.org" {
>> type slave;
>> file "slave/aaa.example.org";
>> masters {MASTERIP;};
>> };
>>
>> It worked fine with 4.6 (although it was considered incorrect).
>>
>> After upgrade to 4.10 named started complaining:
>>
>> common.zones:3: writeable file 'slave/aaa.example.org': already in
>> use: common.zones:3
>>
>> As I understand, now I need to have separate files for different
>> views.
>>
>> But is there a way to have them automatically assigned and to write
>> something like:
>>
>> file "slave/aaa.example.org.${view_name}"
>>
>> or any other way to have only one defininition for common zones?
>
> Here is an easy suggestion:
>
> view "common" {
> match-clients { none; };
>
> zone "example.com" {
> type slave;
> file "common/example.com";
> masters { example.com-masters; };
> };
> // repeat for other common zones
> };
>
> And then your other views can be defined and use the include file as
> before, with each zone being:
>
> in-view "common";
>
>> I found 'in-view' option, but again it requires two definitions for
>> every zone: one with "file" and "masters" directives, and another
>> with "in-view" option. Moreover, these two definitions must be in
>> different files, as I have to include one in first view, and
>> another (with 'in-view') in all other views, so I have to keep two
>> separate files synced with one another.
>>
>> So is it possible to have only one definition for slave zones that
>> are shared between different views?
>
> Hmmm.  I am not sure if there is a good workaround for that.  But
> there are tools like make(1) which can do this for you?  I would
> suggest a script to generate the common.zones file from whatever
> you're using for the "common" view.
>
> Maybe someone else will have a better suggestion?
Well, using make and scripting is certainly an option, but not having to
use it is better in my opinion. And as I said in another letter, with
9.6 there was no need for scripting.

I do not generate "common.zones", I write it by hand. And now I have to
make a script that generates another "common.zones.internal" from
previous "common.zones" or generate them both from comon source.

I any case it is unnecessary (in my view) complication caused by
upgrade, I would call it a regression, as I used this config for at
least five years, and now I have to invent something.

So I am asking for better solution, too. But reading docs and googling
did not give me a clue.

--
Konstantin Stefanov,

Research Computing Center
M.V Lomonosov Moscow State University
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Mark Andrews


Referencing the same writable file in multiple places in named can:

* lead to corrupted journals
* the wrong zone content being published in the wrong view
* named not being able to serve zone content when restarted when the
  master is down
* content not showing up in a timely manner
* extra zone transfers recovering from the above

If you failed to experience one or more of these you were lucky.
There is a good chance that some of these things were happening and
you were not even aware.

We got bug reports about all of these events that were caused by
the same writable file being referenced multiple times.

Referencing the same writeable file multiple times has never been
a supported configuration.  This is now being caught.

Mark
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: [hidden email]
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Konstantin Stefanov
I see why it may lead to problems.

But in fact the configuration with only one writable file referenced
several times is suported now. If I write:

view "view1" {
        zone "aaa.exampe.org" {
                masters {IP;};
                file "slave/aaa.exmaple.org";
        };
};

view "view2" {
        zone "aaa.exampe.org" {
                in-view "view1";
        };
};

then both views will refernce ther same writable file, won't they? Or am
I missing something about "in-view" directive?

And if I'm right, the only question is how to simplify the configuration
so not to have two definitions in two files for every slave zone which
is shared between views.


On 18.03.2015 1:25, Mark Andrews wrote:

> Referencing the same writable file in multiple places in named can:
>
> * lead to corrupted journals
> * the wrong zone content being published in the wrong view
> * named not being able to serve zone content when restarted when the
>   master is down
> * content not showing up in a timely manner
> * extra zone transfers recovering from the above
>
> If you failed to experience one or more of these you were lucky.
> There is a good chance that some of these things were happening and
> you were not even aware.
>
> We got bug reports about all of these events that were caused by
> the same writable file being referenced multiple times.
>
> Referencing the same writeable file multiple times has never been
> a supported configuration.  This is now being caught.
>
> Mark
>

--
Константин Стефанов,

Лаборатория параллельных информационных технологий НИВЦ МГУ

тел. +7 (495) 939-23-41
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Matus UHLAR - fantomas
On 18.03.15 11:48, Constantin Stefanov wrote:

>But in fact the configuration with only one writable file referenced
>several times is suported now. If I write:
>
>view "view1" {
> zone "aaa.exampe.org" {
> masters {IP;};
> file "slave/aaa.exmaple.org";
> };
>};
>
>view "view2" {
> zone "aaa.exampe.org" {
> in-view "view1";
> };
>};
>
>then both views will refernce ther same writable file, won't they? Or am
>I missing something about "in-view" directive?
>
>And if I'm right, the only question is how to simplify the configuration
>so not to have two definitions in two files for every slave zone which
>is shared between views.

maybe you could put all those zone definitions into one file and include it
in each view.

the only other way is stop using views...
--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
On the other hand, you have different fingers.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Konstantin Stefanov
On 18.03.2015 11:56, Matus UHLAR - fantomas wrote:

> On 18.03.15 11:48, Constantin Stefanov wrote:
>> But in fact the configuration with only one writable file referenced
>> several times is suported now. If I write:
>>
>> view "view1" {
>> zone "aaa.exampe.org" {
>> masters {IP;};
>> file "slave/aaa.exmaple.org";
>> };
>> };
>>
>> view "view2" {
>> zone "aaa.exampe.org" {
>> in-view "view1";
>> };
>> };
>>
>> then both views will refernce ther same writable file, won't they? Or am
>> I missing something about "in-view" directive?
>>
>> And if I'm right, the only question is how to simplify the configuration
>> so not to have two definitions in two files for every slave zone which
>> is shared between views.
>
> maybe you could put all those zone definitions into one file and include it
> in each view.
I can't. It stopped working after upgrade to 9.10, but worked before
with 9.6. And the question is how to keep the config as simple as it was
before upgrade.

> the only other way is stop using views...
>

--
Konstantin Stefanov,

Research Computing Center
M.V Lomonosov Moscow State University
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Matus UHLAR - fantomas
>> On 18.03.15 11:48, Constantin Stefanov wrote:
>>> then both views will refernce ther same writable file, won't they? Or am
>>> I missing something about "in-view" directive?

>On 18.03.2015 11:56, Matus UHLAR - fantomas wrote:
>> maybe you could put all those zone definitions into one file and include it
>> in each view.

On 18.03.15 12:05, Constantin Stefanov wrote:
>I can't. It stopped working after upgrade to 9.10, but worked before
>with 9.6. And the question is how to keep the config as simple as it was
>before upgrade.

I mean, the "in-view" definitions...

>> the only other way is stop using views...

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I just got lost in thought. It was unfamiliar territory.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Konstantin Stefanov
On 18.03.2015 13:02, Matus UHLAR - fantomas wrote:

>>> On 18.03.15 11:48, Constantin Stefanov wrote:
>>>> then both views will refernce ther same writable file, won't they? Or am
>>>> I missing something about "in-view" directive?
>
>> On 18.03.2015 11:56, Matus UHLAR - fantomas wrote:
>>> maybe you could put all those zone definitions into one file and include it
>>> in each view.
>
> On 18.03.15 12:05, Constantin Stefanov wrote:
>> I can't. It stopped working after upgrade to 9.10, but worked before
>> with 9.6. And the question is how to keep the config as simple as it was
>> before upgrade.
>
> I mean, the "in-view" definitions...
So now I have to have two definitions for every slave zone in different
files. Well, it is the thing I did, but I do not like it.

Requirement to have 2 synced definitions in 2 different places leads to
bugs.

>
>>> the only other way is stop using views...
>

--
Konstantin Stefanov,

Research Computing Center
M.V Lomonosov Moscow State University
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Matus UHLAR - fantomas
>On 18.03.2015 13:02, Matus UHLAR - fantomas wrote:
>>>> On 18.03.15 11:48, Constantin Stefanov wrote:
>>>>> then both views will refernce ther same writable file, won't they? Or am
>>>>> I missing something about "in-view" directive?
>>
>>> On 18.03.2015 11:56, Matus UHLAR - fantomas wrote:
>>>> maybe you could put all those zone definitions into one file and include it
>>>> in each view.
>>
>> On 18.03.15 12:05, Constantin Stefanov wrote:
>>> I can't. It stopped working after upgrade to 9.10, but worked before
>>> with 9.6. And the question is how to keep the config as simple as it was
>>> before upgrade.
>>
>> I mean, the "in-view" definitions...

On 18.03.15 13:10, Konstantin Stefanov wrote:
>So now I have to have two definitions for every slave zone in different
>files. Well, it is the thing I did, but I do not like it.
>
>Requirement to have 2 synced definitions in 2 different places leads to
>bugs.

and what did you have before?
multiple definitions of the same zones with the same filenames, which leads
to bugs (although you were lucky not to encounter them)

now you can have:

definitions of zones with filename in one general view

file with definitions of zones with "in-view".

multiple inclusions of the file in multiple views.

>>>> the only other way is stop using views...
... you still can stop using views.

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
99 percent of lawyers give the rest a bad name.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Konstantin Stefanov
On 18.03.2015 13:22, Matus UHLAR - fantomas wrote:

>>> On 18.03.15 12:05, Constantin Stefanov wrote:
>>>> I can't. It stopped working after upgrade to 9.10, but worked before
>>>> with 9.6. And the question is how to keep the config as simple as it was
>>>> before upgrade.
>>>
>>> I mean, the "in-view" definitions...
>
> On 18.03.15 13:10, Konstantin Stefanov wrote:
>> So now I have to have two definitions for every slave zone in different
>> files. Well, it is the thing I did, but I do not like it.
>>
>> Requirement to have 2 synced definitions in 2 different places leads to
>> bugs.
>
> and what did you have before?
> multiple definitions of the same zones with the same filenames, which leads
> to bugs (although you were lucky not to encounter them)
Yes, I was lucky and everything worked for me as I thought it had to be.

>
> now you can have:
>
> definitions of zones with filename in one general view
>
> file with definitions of zones with "in-view".
>
> multiple inclusions of the file in multiple views.
And now I am unlucky as I have to make my cofig more complex, confusing
and bug-prone to achieve the same effect.

But I'm lucky enough to have three options to choose how to spoil my config.

>
>>>>> the only other way is stop using views...
> ... you still can stop using views.
And I can still stop using DNS.

If I only could stop using views, I would not ask the question.

--
Konstantin Stefanov,

Research Computing Center
M.V Lomonosov Moscow State University
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

RE: Single slave zone definition for two view (cache file name problem)

Lightner, Jeffrey
It isn't really that hard to maintain two separate zone files for each domain.   We've been doing it for years.

It isn't really clear why you're using views if all your zone files are the same as you seem to imply.   Here we do views specifically because for some domains the zone files DO need to be different between internal and external views.    While others are the same as I noted before it is very easy to simply edit one file then copy it to the other.    


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Konstantin Stefanov
Sent: Wednesday, March 18, 2015 6:31 AM
To: [hidden email]
Subject: Re: Single slave zone definition for two view (cache file name problem)

On 18.03.2015 13:22, Matus UHLAR - fantomas wrote:

>>> On 18.03.15 12:05, Constantin Stefanov wrote:
>>>> I can't. It stopped working after upgrade to 9.10, but worked
>>>> before with 9.6. And the question is how to keep the config as
>>>> simple as it was before upgrade.
>>>
>>> I mean, the "in-view" definitions...
>
> On 18.03.15 13:10, Konstantin Stefanov wrote:
>> So now I have to have two definitions for every slave zone in
>> different files. Well, it is the thing I did, but I do not like it.
>>
>> Requirement to have 2 synced definitions in 2 different places leads
>> to bugs.
>
> and what did you have before?
> multiple definitions of the same zones with the same filenames, which
> leads to bugs (although you were lucky not to encounter them)
Yes, I was lucky and everything worked for me as I thought it had to be.

>
> now you can have:
>
> definitions of zones with filename in one general view
>
> file with definitions of zones with "in-view".
>
> multiple inclusions of the file in multiple views.
And now I am unlucky as I have to make my cofig more complex, confusing and bug-prone to achieve the same effect.

But I'm lucky enough to have three options to choose how to spoil my config.

>
>>>>> the only other way is stop using views...
> ... you still can stop using views.
And I can still stop using DNS.

If I only could stop using views, I would not ask the question.

--
Konstantin Stefanov,

Research Computing Center
M.V Lomonosov Moscow State University
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Konstantin Stefanov
On 18.03.2015 16:12, Lightner, Jeff wrote:
> It isn't really that hard to maintain two separate zone files for
> each domain. We've been doing it for years.
It isn't. But maintaining one file is easier. And having to maintain two
after five years everything worked fine with one is annoying.

> It isn't really clear why you're using views if all your zone files
> are the same as you seem to imply. Here we do views specifically because
> for some domains the zone files DO need to be different between internal
> and external views. While others are the same as I noted before it is
> very easy to simply edit one file then copy it to the other.
Not all my zones are identical, but most, and there is quite a bunch of
them. The problem is that two files for identical zones can't be the
same as they used to be. They must differ in file names for slave zone
caches, or have 'in-view' directive. So simply copying does not work,
otherwise 'include' would work fine.

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Konstantin Stefanov
> Sent: Wednesday, March 18, 2015 6:31 AM
> To: [hidden email]
> Subject: Re: Single slave zone definition for two view (cache file name problem)
>
> On 18.03.2015 13:22, Matus UHLAR - fantomas wrote:
>>>> On 18.03.15 12:05, Constantin Stefanov wrote:
>>>>> I can't. It stopped working after upgrade to 9.10, but worked
>>>>> before with 9.6. And the question is how to keep the config as
>>>>> simple as it was before upgrade.
>>>>
>>>> I mean, the "in-view" definitions...
>>
>> On 18.03.15 13:10, Konstantin Stefanov wrote:
>>> So now I have to have two definitions for every slave zone in
>>> different files. Well, it is the thing I did, but I do not like it.
>>>
>>> Requirement to have 2 synced definitions in 2 different places leads
>>> to bugs.
>>
>> and what did you have before?
>> multiple definitions of the same zones with the same filenames, which
>> leads to bugs (although you were lucky not to encounter them)
> Yes, I was lucky and everything worked for me as I thought it had to be.
>
>>
>> now you can have:
>>
>> definitions of zones with filename in one general view
>>
>> file with definitions of zones with "in-view".
>>
>> multiple inclusions of the file in multiple views.
> And now I am unlucky as I have to make my cofig more complex, confusing and bug-prone to achieve the same effect.
>
> But I'm lucky enough to have three options to choose how to spoil my config.
>
>>
>>>>>> the only other way is stop using views...
>> ... you still can stop using views.
> And I can still stop using DNS.
>
> If I only could stop using views, I would not ask the question.
>
> --
> Konstantin Stefanov,
>
> Research Computing Center
> M.V Lomonosov Moscow State University
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>
> bind-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/bind-users
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>
> bind-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/bind-users
>

--
Konstantin Stefanov,

Research Computing Center
M.V Lomonosov Moscow State University
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Steven Carr
On 18 March 2015 at 13:30, Konstantin Stefanov <[hidden email]> wrote:
> It isn't. But maintaining one file is easier. And having to maintain two
> after five years everything worked fine with one is annoying.

This highlights the need for a test environment, don't apply untested
updates to production systems, it'll help you avoid running into
issues like this where something in the product has changed and then
you're forced to cobble together an ad-hoc solution to "just fix it"
on-the-fly.

> Not all my zones are identical, but most, and there is quite a bunch of
> them. The problem is that two files for identical zones can't be the
> same as they used to be. They must differ in file names for slave zone
> caches, or have 'in-view' directive. So simply copying does not work,
> otherwise 'include' would work fine.

Not sure whether BIND would detect this or not but what about using a
hard link? Underlying file would be the same but filenames different
(though with the caveat of "these should be read-only master zones, no
DDNS, not a slave zone")

Steve
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Konstantin Stefanov
On 18.03.2015 16:55, Steven Carr wrote:
> On 18 March 2015 at 13:30, Konstantin Stefanov <[hidden email]> wrote:
>> It isn't. But maintaining one file is easier. And having to maintain two
>> after five years everything worked fine with one is annoying.
>
> This highlights the need for a test environment, don't apply untested
> updates to production systems, it'll help you avoid running into
> issues like this where something in the product has changed and then
> you're forced to cobble together an ad-hoc solution to "just fix it"
> on-the-fly.
Did I say it is happening in production? I think I didn't, because it is
a copy to test the upgrade, production is still running OK with 9.6.

>> Not all my zones are identical, but most, and there is quite a bunch of
>> them. The problem is that two files for identical zones can't be the
>> same as they used to be. They must differ in file names for slave zone
>> caches, or have 'in-view' directive. So simply copying does not work,
>> otherwise 'include' would work fine.
>
> Not sure whether BIND would detect this or not but what about using a
> hard link? Underlying file would be the same but filenames different
> (though with the caveat of "these should be read-only master zones, no
> DDNS, not a slave zone")
The issue is that named started to detect it since, if I'm not mistaken,
9.7. It happened because such config was leading to bugs, but instead of
fixing the bugs, the whole feature was prohibited.

Hardlinks is not a solution. I do not care about additional disk space,
what I care about is the need to have two configs with different file
names (again the case with hardlinks) instead of one as it was with 9.6

--
Konstantin Stefanov,

Research Computing Center
M.V Lomonosov Moscow State University
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Single slave zone definition for two view (cache file name problem)

Matus UHLAR - fantomas
rOn 18.03.15 17:10, Konstantin Stefanov wrote:
>The issue is that named started to detect it since, if I'm not mistaken,
>9.7. It happened because such config was leading to bugs, but instead of
>fixing the bugs, the whole feature was prohibited.

those bugs _were_ fixed: the in-view statement and prevention from using
the same file multiple times (I remember discussion about issues coming from
those here on the list).

you are complaining about your broken configuration worked.
Sorry, I gave up arguing with you.
--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I wonder how much deeper the ocean would be without sponges.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
12