[668] in Moira
Re: Hosttable in Moira
daemon@ATHENA.MIT.EDU (Jeffrey I. Schiller)
Tue Oct 19 16:46:01 1993
Date: Tue, 19 Oct 93 16:45:36 -0400
From: Jeffrey I. Schiller <jis@MIT.EDU>
To: mar@MIT.EDU
Cc: moiradev@MIT.EDU, ops@MIT.EDU, network@MIT.EDU
In-Reply-To: <9310191915.AA05858@gulch.MIT.EDU> (message from Mark Rosenstein on Tue, 19 Oct 93 15:15:14 EDT)
Date: Tue, 19 Oct 93 15:15:14 EDT
From: Mark Rosenstein <mar@MIT.EDU>
... -Mark
create table machine
(
name VARCHAR(32) NOT NULL WITH DEFAULT,
mach_id INTEGER NOT NULL WITH DEFAULT,
vendor CHAR(16) NOT NULL WITH DEFAULT,
model CHAR(24) NOT NULL WITH DEFAULT,
os CHAR(16) NOT NULL WITH DEFAULT,
location CHAR(16) NOT NULL WITH DEFAULT,
contact CHAR(32) NOT NULL WITH DEFAULT,
--> use INTEGER2 NOT NULL WITH DEFAULT,
status INTEGER1 NOT NULL WITH DEFAULT,
statuschange DATE NOT NULL WITH DEFAULT,
snet_id INTEGER NOT NULL WITH DEFAULT,
address CHAR(16) NOT NULL WITH DEFAULT,
owner_type CHAR(8) NOT NULL WITH DEFAULT,
owner_id INTEGER NOT NULL WITH DEFAULT,
acomment INTEGER NOT NULL WITH DEFAULT,
ocomment INTEGER NOT NULL WITH DEFAULT,
created DATE NOT NULL WITH DEFAULT,
creator INTEGER NOT NULL WITH DEFAULT,
inuse DATE NOT NULL WITH DEFAULT,
modtime DATE NOT NULL WITH DEFAULT,
modby INTEGER NOT NULL WITH DEFAULT,
modwith CHAR(8) NOT NULL WITH DEFAULT
);
Is an "INTEGER2" only 16 bits? If so, could we use a 32 bit field? I
have a suspicious feeling that we will discover that we really need 32
bits!
...
add_host(name, vendor, model, os, location, contact, use, status, subnet,
address, owner_type, owner_name, admincomment, opcomment)
Name will be upcased and must be unique among hosts and host
aliases. They also must meet the following sanity check: must start
with a letter, remaining chars letter, numbers, and hyphen, must not
end with a hyphen. Vendor, model, os, and location will be upcased.
Use is an integer whose values are determined by the client (if entity
performing the query is not on the query ACL, the use field must be
zero). Status must be 1 (active) or 3 (reserved). Address must be
unique among hosts, or "unqiue" or "unassigned". Subnet must name an
existing subnet. The owner_type must be USER, LIST, KERBEROS, or
NONE, and the owner_name must name a valid instance of that type.
Statuschange, created, and modtime will be set to the current time.
Creator and modby will be set to the user.
Can we override the name sanity check. I believe we currently have a few
( :-( ) "illegal" names in the current MIT host table. I have no problem
with adding these few hosts manually using Ingres. However if we go
this route, then *only* add_host should do the sanity checking on proposed
host name. The other queries should accept any name, just in case we wish
to manipulate the record of one of these illegally named hosts.
How about also allowing subnet to be "unassigned." This would permit us to
create a record for a machine even before we have figured out where it
is going to go. This will also allow us to pre-reserve a name before we
know where it is going to reside.
How do I force a machine to have a particular IP address? Perhaps a force
flag should be added that is only permitted to be used by someone on the
query ACL?
...
update_host(name, newname, vendor, model, os, location, contact, use,
status, subnet, address, owner_type, owner_name, acomment, ocomment, inuse)
newname must either match the old name, or be unique among
hosts and host aliases. use may not be changed except by someone on
the query ACL. status may be set to 1 (active), 3 (reserved) or 4
(deleted). address may only be changed to "unassigned" or "unique"
(which assigns a unique address). If status changes, statuschange
will be set to the current date. All other fields are as in add_host.
How do I force a machine to have a particular IP address? Perhaps a force
flag should be added that is only permitted to be used by someone on the
query ACL? [Same Question as in add_host() above]
...
delete_host(name)
name must match exactly one entry. If the status on that
entry is 4 (deleted), then the entry will be deleted.
Who can use this query?
-Jeff