Home » General » Support » *SOLVED* startup scripts, network setup
*SOLVED* startup scripts, network setup [message #6498] |
Tue, 19 September 2006 11:28 |
szocske
Messages: 35 Registered: September 2006
|
Member |
|
|
Hi!
I am looking for any documentation (preferably something comprehensive like the old PDF manual, which seems outdated in this regard) on the VPE startup mechanisms, and the scripts involved.
My current suspicion about the startup mechanism is the following:
On vzctl start VEID, the file /etc/vz/conf/VEID.conf is consulted for config options. One of these is "OSTEMPLATE", in my case with value "debian-3.1-i386-minimal".
Prefix matching is done on this string with the filenames in /etc/vz/dists/*.conf. In my case, debian-3.1.conf is the best match. It contains further config options, like ADD_IP or POST_CREATE, which contain script names, relative to the path /etc/vz/dists/scripts.
On these events, the corresponding scripts are run inside the given virtual environment.
So, the question is: is the above correct? What is the VEID.start script I have been advised to use, and where is it supposed to be placed?
Second: Where can I configure what scripts to run on the host machine (or HW node, excuse my Xenism...) on VE startup? I must add veth-s to a bridge.
Thanks for all the help and the great product:
Gabor Szokoli
[Updated on: Tue, 19 September 2006 14:02] Report message to a moderator
|
|
|
|
Re: startup scripts, network setup [message #6501 is a reply to message #6500] |
Tue, 19 September 2006 12:27 |
szocske
Messages: 35 Registered: September 2006
|
Member |
|
|
vass wrote on Tue, 19 September 2006 08:01 | Hello,
At the moment there is no such script. There are plans about creating such file in the near future. BTW, what name for the this file do you suggest? We have som disputes about it...
|
I don't think I have the experience to make an insightful suggestion, but I'd be happy with a _HOST postfix after the existing option names, like ADD_IP_HOST=debian_add_ip_host.sh, POST_CREATE_HOST=debian_postcreate_host.sh, etc...
It's not that urgent though, we can use wrapper scripts for VE startup, or ssh back to the host from POST_CREATE.
Seriously though, prefix matching on the OSTEMPLATE?
Do all partially matching .conf files get loaded, (debian.conf and debian-3.1.conf in my case) or best match only?
Is there a list of all possible parameter names for the VEID.conf and the dist/distname.conf files somewhere, btw? And could I theoretically duplicate entries between them, and if yes, which overrides the other?
Thank you for your time:
Gabor Szokoli
|
|
|
Re: startup scripts, network setup [message #6505 is a reply to message #6501] |
Tue, 19 September 2006 13:19 |
Vasily Tarasov
Messages: 1345 Registered: January 2006
|
Senior Member |
|
|
Quote: | I don't think I have the experience to make an insightful suggestion, but I'd be happy with a _HOST postfix after the existing option names, like ADD_IP_HOST=debian_add_ip_host.sh, POST_CREATE_HOST=debian_postcreate_host.sh, etc...
|
AFAIK there will be only one file like <veid>.start but it will be ran on HN. Something <veid>.host-start...
Quote: | Do all partially matching .conf files get loaded, (debian.conf and debian-3.1.conf in my case) or best match only?
|
The rule is the following:
Suppose name of template is "debian-3.1"
If file debian-3.1.conf exists it will be loaded, no other files will be processed. But if debian-3.1.conf doesn't exist, then ostemplate name "debian-3.1" will be truncated till first occurance of "-" from the end. From "debian-3.1" we have "debian", thus debian.conf file will be loaded. Id debian.conf doesn't exist default file will be loaded.
Quote: |
Is there a list of all possible parameter names for the VEID.conf and the dist/distname.conf files somewhere, btw? And could I theoretically duplicate entries between them, and if yes, which overrides the other?
|
man vps.conf gives the list.
dist/distname.conf and vps.conf have different parameters. So no duplicating, overriding is possible.
HTH,
vass.
HTH,
vass.
|
|
|
|
|
|
Re: startup scripts, network setup [message #6687 is a reply to message #6683] |
Thu, 21 September 2006 10:56 |
szocske
Messages: 35 Registered: September 2006
|
Member |
|
|
vass wrote on Thu, 21 September 2006 05:36 |
Well, I suppose the logic of man developers was something like that:
|
OK, OK, since then I realised I can't even write
VETH="veth$VEID.0 ... "
Quote: |
As concerns
Quote: |
This made me wonder: how wold you formulate a generic VETH= line, where some bytes of the MAC address are VEID-derived thus unique?
|
Sorry. I don't understand you quite. AFAIK MAC address for veth device can be set by user with hand, no relationship with VEID...
|
True.
But MAC addresses must be unique: this is the only reason for separate VEID.conf files in our setup.
I'd like to be able to write something like this:
VETH=" veth${VEID}.0,10.20.30.40.$VEID_LOWBYTE.$VEID_HIBYTE,eth0,10 .20.30.41.$VEID_LOWBYTE.$VEID_HIBYTE "
|
|
|
|
Goto Forum:
Current Time: Sun Nov 03 10:14:22 GMT 2024
Total time taken to generate the page: 0.03707 seconds
|