#netapp (7-mode 8.2.5) as a dhcp client?

1 messages · Page 1 of 1 (latest)

hushed solar
#

Please remind me if it's possible to use a dhcp server to assign ip@ to ontap's network interfaces in 7-mode (8.2.5)?
note: I'm not talking about when I'm setting up the netapp, let's pretend here that the netapp is already running ontap.

#

netapp (7-mode 8.2.5) as a dhcp client?

pearl star
#

not possible AFAIR

hushed solar
#

thanks

#

although isn't /etc/rc like a script anyway? couldn't /etc/rc invoke a binary or other shell script on the filesystem to ifconfig the interfaces to whatever values another shell script might provide? maybe this other shell script can run a dhcp query (maybe I'll have to compile a freebsd 8.1 binary for that); just thinking.

#

is /etc/rc just a shell script, can it invoke other binaries or scripts? @pearl star

hushed solar
#

hmm, no, in fact /etc/rc is just whatever commands are allowed by ontap; it can't run arbitrary scripts or binaries.

#

unless you know of a way to run binaries stored on the OS filesystem from ontap (other than systemshell which wouldn't work here because it needs an interactive session)

hushed solar
#

maybe sh -c? but that's sandboxed to only a few binaries, haven't looked into adding some into this chroot.

main dock
#

That’s not true. /etc/rc is a script on 7 mode. I know there was a way to “re-run” after setup from the cli. I used to put sleep commands in there to.

pearl star
#

You can only add commands to/etc/rc that you can use in the shell. Sleep is a normal ONTAP command, so it works. I don't think you can add arbitrary scripts, and you definitely can't call any binaries

main dock
#

I forgot how I would re-run the/etc/rc (I know…probably simple but haven’t done it in 15 years) but the same way if I recall worked on a file of commands (scripts) and agree that it only works with ONTAP binaries

hushed solar
#

thanks!

pearl star
#

yeah, maybe you can actually call scripts (does source or . exist in the 7-mode shell? I don't have a system handy that I could power up and try)

hushed solar
#

source does exist

#

toaster*> source /etc/a.sh
wget not found. Type '?' for a list of commands
/usr/bin/wget not found. Type '?' for a list of commands
/mroot/usr/bin/wget not found. Type '?' for a list of commands

#

nope

main dock
#

Right. Wget is not an ONTAP binary. Only ONTAP binaries/commands may be used or scripts of ONTAP binaries

pearl star
#

basically you can use all commands that help shows you, and nothing more

main dock
#

Including “priv set dig”
I remember having to actually do that in /etc/rc to bypass some silly issue

pearl star
#

yeah, but I think help also shows priv, doesn't it?

#

you need priv set diag in /etc/rc if you want to do a setflag on every boot, for example

hushed solar
#

what about sh -c?

#

alternatively, running a binary from xinetd? (/etc/xinetd.d)

pearl star
#

there is no sh. I mean, there is (in BSD) but the 7-mode shell cannot run BSD commands. It can only run its internal commands (those that you see via help)...

#

there is also no xinetd. ONTAP is not UNIX 😉

#

that being said, I don't know if you have the systemshell in newer 7-mode versions (I only have a 7.3.7 system with the monolithic kernel for testing), you might be able to cobble something together with that. But it's unsupported and you can completely destroy your system with that, so I wouldn't suggest it

solemn plover
#

What are you trying to achieve @hushed solar ?

hushed solar
#

@solemn plover get a dhcp lease on e0a and e0M

#

@pearl star yes I've been using systemshell, where xinetd is.

solemn plover
hushed solar
#

because it's more convenient for me

#

I will see if I can do it somewhere in init scripts from systemshell

solemn plover
hushed solar
#

no prob

pearl star
#

I don't think xinetd is enabled/running by default. You need to make sure to run it in the correct vserver context too, otherwise it will have the wrong network interfaces

#

also, any changes you make to the init scripts will probably be overwritten by the next ONTAP update so you might need to redo them periodically

solemn plover
hushed solar
#

I don't have vFilers

main dock
pearl star
# solemn plover That is assuming vFilers are being used

not vfiler, vserver. I'm not sure how the 7-mode personality of the newer ONTAPs works, but I'm pretty sure you still have multiple "vserver contexts" in the BSD shell, for example to separate out the ACP, OS2SP and MCC (if used) networks so that they don't interfere with the user-visible network configurations

#

these are quite similar to BSD jails and make sure you can use IP addresses that are also used "internally" in ONTAP (like the 10.x.x.x that is used for OS2SP, or the 192.168.x.x that is used for ACP)

hushed solar
#

yeah jails essentially

#

yep

pearl star
#

the command is vcontext run IIRC

hushed solar
#

vcontext not found. Type '?' for a list of commands

pearl star
#

it's a BSD command

hushed solar
#

ah thanks

pearl star
#

so, systemshell

hushed solar
#

yup

pearl star
#

I don't think it is documented very well but you can infer a lot of its parameters and usage from the various scripts lying around in /mroot etc.

#

poking around in systemshell is fun. I still want to write up some documentation of that when I ever get around to doing it 🙂

#

but it's also quite easy to beak things, so use a simulator or nonproduction system for testing

hushed solar
#

not too worried about that, it's a lab setup

solemn plover
#

I thought everything sat in the vFiler0 context when you weren't using multistore

pearl star
#

that's only what you see from within the ONTAP 7-mode shell. under the hood, these vfiler contexts need to be represented somehow in the BSD kernel, and ONTAP does that by using something similar to BSD jails that is (confusingly) named "vcontext" for "vserver context". I guess it is a relic of the Spinnaker stack back in the GX days. It's not exactly BSD jails but it works very similar. Note that there was also an (unrelated?) "Linux-vserver" project in the 90s that did something similar on Linux, long before containers came back into fashion in the late 2000's.

hushed solar
#

@pearl star was Ontap always on FBSD, even 5.x and all?

pearl star
#

no. only 8.x is based on FreeBSD. earlier releases were monolithic kernels that included everything

#

much/most of that still lives on in the maytag.ko FreeBSD module