Regardless of the version of xCAT we have used in the past, my coworkers
and I have noticed that running "makedns" with any following options can be
dangerous for us, because something happens where it will wipe out all the
records in DNS. If we run "makedns" with no options generally any new nodes
that have been added to /etc/hosts will be parsed and added appropriately.
Maybe I am misunderstanding what happens when the command is run.

Here is a recent example. My entry for a new node "xcat-serv1" for some
reason didn't have the reverse lookup from the IP in the DNS file for that
subnet (db.10.20), and so I decided to try to remove just the DNS entry for
that node and then re-add it. Here is what I ran:

----
# makedns -d xcat-serv1
Handling xcat-serv1 in /etc/hosts.
Getting reverse zones, this may take several minutes for a large cluster.
Completed getting reverse zones.
Updating zones.
Completed updating zones.
Updating DNS records, this may take several minutes for a large cluster.
Completed updating DNS records.
----

Then I ran it with the "-n" parameter to re-add that node (with
XCATBYPASS=1):

----
# export XCATBYPASS=1
[root@x3650-head01 centos]# makedns -n xcat-serv1
Unrecognized escape \h passed through at
/opt/xcat/lib/perl/xCAT/zvmUtils.pm line 2408.
Subroutine handled_commands redefined at /opt/xcat/lib/perl/xCAT_plugin/
hosts.pm line 28.
Subroutine delnode redefined at /opt/xcat/lib/perl/xCAT_plugin/hosts.pmline 33.
Subroutine addnode redefined at /opt/xcat/lib/perl/xCAT_plugin/hosts.pmline 58.
Subroutine build_line redefined at
/opt/xcat/lib/perl/xCAT_plugin/hosts.pmline 117.
Subroutine addotherinterfaces redefined at /opt/xcat/lib/perl/xCAT_plugin/
hosts.pm line 182.
Subroutine delotherinterfaces redefined at /opt/xcat/lib/perl/xCAT_plugin/
hosts.pm line 209.
Subroutine add_hosts_content redefined at /opt/xcat/lib/perl/xCAT_plugin/
hosts.pm line 234.
Subroutine process_request redefined at /opt/xcat/lib/perl/xCAT_plugin/
hosts.pm line 305.
Subroutine writeout redefined at
/opt/xcat/lib/perl/xCAT_plugin/hosts.pmline 511.
Subroutine donics redefined at /opt/xcat/lib/perl/xCAT_plugin/hosts.pm line
545.
Subroutine getIPdomain redefined at
/opt/xcat/lib/perl/xCAT_plugin/hosts.pmline 801.
Handling xcat-serv1 in /etc/hosts.
Getting reverse zones, this may take several minutes for a large cluster.
Completed getting reverse zones.
Stopping named: .                                          [  OK  ]
Updating zones.
Completed updating zones.
Restarting named
Restarting named complete
Updating DNS records, this may take several minutes for a large cluster.
Completed updating DNS records.
DNS setup is completed
....
....
----

When I did an 'ls' in /var/named many records were missing and the ones
still left we virtually empty except one entry for the headnode:

BEFORE:

# ls /var/named
data      db.10.29      db.10.40      db.127.0.0    db.172.26.41  db.172.29
 db.192.168.100  db.haig   db.morgan.haib.org.jnl
db.10.29.jnl  db.10.60      db.172.20     db.172.26.42  db.172.30  db.cache
       db.morgan           slaves
db.10.20  db.10.30      db.10.60.jnl  db.172.26.40  db.172.26.43  db.172.40
 db.haib         db.morgan.haib.org

AFTER:
# ls /var/named
data      db.10.20.jnl  db.10.29.jnl  db.10.30.jnl  db.10.40.jnl
 db.10.60.jnl  db.172.26.41  db.172.26.43        db.morgan.haib.org.jnl
db.10.20  db.10.29      db.10.30      db.10.40      db.10.60
 db.172.26.40  db.172.26.42  db.morgan.haib.org  slaves


As you can see several files are missing, Luckily I made a full backup
yesterday and was able to restore the old files.

>From /var/log/messages you can see the initial deletion message for
"xcat-serv1":

----
Jan 16 10:32:55 x3650-head01 named[8249]: client 10.20.0.1#56080: updating
zone '40.10.IN-ADDR.ARPA/IN': adding an RR at '11.102.40.10.IN-ADDR.ARPA'
PTR
Jan 16 10:32:55 x3650-head01 named[8249]: client 10.20.0.1#56080: updating
zone '40.10.IN-ADDR.ARPA/IN': adding an RR at '7.101.40.10.IN-ADDR.ARPA' PTR
Jan 16 10:32:55 x3650-head01 named[8249]: client 10.20.0.1#56080: updating
zone '40.10.IN-ADDR.ARPA/IN': adding an RR at '10.102.40.10.IN-ADDR.ARPA'
PTR
Jan 16 10:32:55 x3650-head01 named[8249]: client 10.20.0.1#56080: updating
zone '40.10.IN-ADDR.ARPA/IN': adding an RR at '27.102.40.10.IN-ADDR.ARPA'
PTR
Jan 16 10:32:55 x3650-head01 named[8249]: client 10.20.0.1#56080: updating
zone '40.10.IN-ADDR.ARPA/IN': adding an RR at '33.101.40.10.IN-ADDR.ARPA'
PTR
Jan 16 10:32:55 x3650-head01 named[8249]: client 10.20.0.1#56080: updating
zone '40.10.IN-ADDR.ARPA/IN': adding an RR at '1.102.40.10.IN-ADDR.ARPA' PTR
Jan 16 10:32:55 x3650-head01 named[8249]: client 10.20.0.1#56080: updating
zone

Then for the makedens -a xcat-serv you actually see it update EVERY ZONE:

Jan 16 10:32:42 x3650-head01 named[8249]: client 10.20.0.1#43788: updating
zone '30.10.IN-ADDR.ARPA/IN': adding an RR at '1.50.30.10.IN-ADDR.ARPA' PTR
Jan 16 10:32:42 x3650-head01 named[8249]: client 10.20.0.1#43788: updating
zone '30.10.IN-ADDR.ARPA/IN': adding an RR at '4.50.30.10.IN-ADDR.ARPA' PTR
Jan 16 10:32:42 x3650-head01 named[8249]: client 10.20.0.1#43788: updating
zone '30.10.IN-ADDR.ARPA/IN': adding an RR at '2.2.30.10.IN-ADDR.ARPA' PTR
Jan 16 10:32:42 x3650-head01 named[8249]: client 10.20.0.1#43788: updating
zone '30.10.IN-ADDR.ARPA/IN': adding an RR at '3.50.30.10.IN-ADDR.ARPA' PTR
Jan 16 10:32:42 x3650-head01 named[8249]: client 10.20.0.1#43788: updating
zone '30.10.IN-ADDR.ARPA/IN': adding an RR at '1.2.30.10.IN-ADDR.ARPA' PTR
Jan 16 10:32:42 x3650-head01 named[8249]: client 10.20.0.1#43788: updating
zone '30.10.IN-ADDR.ARPA/IN': adding an RR at '2.50.30.10.IN-ADDR.ARPA' PTR
....
[long list]
----

After this is when I listed and saw files missing and most of the records
empty. My guess is the "-d" wiped out all the records somehow and not just
"xcat-serv1". Either that or the makedns -a deleted all the records in
order to recreate them. But why would it affect ALL the records when I
specifically typed "xcat-serv1"? I tried a plain "makedns" with no options
after this and it also says "adding an RR at" (is that even the expected
message?) for all the IPs and zones but nothing actually gets added. What
is up with that? If it just something with our installation or does makedns
do this foe other people as well?

Regards,
Josh
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to