Apple Enterprise - NeXTanswers Support Archive
Enterprise
[Index]
[Download]


Search NeXTanswers for:

NEXTSTEP 3.3 NetInfo Clone Bug



Creation Date: April 24, 1995
Keywords:
NeXTSTEP, clone, nidomain

Disclaimer

This document pertains to the NeXTSTEP 3.3 operating system. NeXTSTEP 3.3 is no longer a supported Apple product. This information is provided only as a convenience to our customers who have not yet upgraded their systems, and may not apply to OPENSTEP, WebObjects, or any other product of Apple Enterprise Software.

Question

Why can SimpleNetworkStarter create a NetInfo clone on Intel hardware, but using NetInfoManager doesn't work in NEXTSTEP 3.3 for Intel?

Answer

When you use the "Manage Hierarchy" menu in NetInfoManager to make a clone, it actually invokes nidomain -c. When nidomain -c invokes netinfod -c, a byte ordering problem occurs: the byte order of the master's address is reversed.


For example, you clone the /ts domain on the local host rhino. The master of /ts is running on sabre, with a tag of network. Assuming you want to your clone domain to have the same tag as the master, uniform tagging, the nidomain command that gets invoked is:

nidomain -c network sabre/network

nidomain will translate sabre to the IP address 192.42.172.66, and will invoke netinfod as:

/usr/etc/netinfod -c sabre 66.172.42.192 network network

The arguments after the -c are the master's host's name, the master's host's IP address, the master's tag, and the new clone's tag. The bug is the reversed byte ordering of the IP address after "sabre".


Solution



-Copying the Database

Login as root and launch Terminal. If you just tried using NetInfoManager's Manage Hierarchy menu to create the clone, kill (kill -TERM) the netinfod -c process.

rhino] ps -aux | grep netinfod
root 3938 1.6 0.6 1.66M 200K p3 S 0:00 grep netinfod
root 219 0.0 1.3 1.64M 424K ? SW 0:12 /usr/etc/netinfod local
root 220 0.0 0.8 2.22M 264K ? SW 0:03 /usr/etc/netinfod -c sabre 66

rhino] kill -TERM 220

Now change directory to /etc/netinfo, remove network.nidb (or network.mov, or network.tmp) if it exists and run netinfod -c by hand, giving the IP address of the master's host in the correct order. The arguments after the -c are the master's host's name, the master's host's IP address, the master's tag, and the new clone's tag.

rhino]/usr/etc/netinfod -c sabre 192.42.172.66 network network &

-Adding the Serves Property

Next, add a serves property of ./network to the /machines/rhino entry of the NetInfo domain you are cloning.

rhino] niutil -appendprop -t saber/network /machines/rhino serves ./network

Do the following until you get ./network on the serves: line in the output,

rhino] niutil -read -t localhost/network /machines/rhino

Once the database is updated, reboot the clone machine because the new netinfod, the one started by hand with /usr/etc/netinfod -c, isn't a child of nibindd.

Reminder: If you have a three level or greater NetInfo hierarchy, you may need to modify the child as well as the parent domains. See the System Administration Guide, Chapter 10: Configuring a Large Network, located online in /NextLibrary/Documentation/NextAdmin.


OpenStep | Alliances | Training | Tech Support | Where to Buy