New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
OpenVZ taking ages to assign an IP to a container
Hey,
Im using "vzctl set --ipadd --save" to add an IP address to a container, however once I do it it takes roughly two mins to finally return.
However, around 5 seconds after i've entered it, I can look at vzlist and enter the VPS and notice that its fine and its assigned it, so I am wondering why vzctl is taking ages to return the function after its done it?
Comments
run it through an strace
It's quite possible it's waiting on processes to finish reloading/etc to bind the address. If you got NAMED running, i've seen it hang pretty bad.
Ok i'll give it a go, its not a major issue, its just going to be a pain to implement in my scripts however.
Why does @Naruto Thank every post of yours?
Don't know
Heres the strace output, it was pretty fast this time though
http://pastebin.com/q4wm0KJL
Try strace -t next time, please Or strace -tt
Ok, I think I've fixed it.
However, is it me or do the CentOS templates off the OpenVZ website not have a /etc/network/interfaces file? The debian ones doo.
For CentOS it is /etc/sysconfig/network-scripts/ifcfg* instead
Then why does OpenVZ spit in this error and the VPSs don't have network on CentOS
CentOS networking is handled through the files in
/etc/sysconfig/network-scripts/
, ifcfg-eth0 in particular. They like being difficult like that :P@Daniel something is wrong with your vzctl. There is /etc/vz/dists/*.conf and /etc/vz/dists/scripts/ which makes vzctl behave in a different way (i.e. touch different files) depending on the distribution of the container.
I think I'm missing CentOS then
For CentOS it is redhat-add_ip.sh
Byt see in the /etc/vz/dists/ if there is a corresponding centos.conf
Also what exactly is the template name of that container?
i.e. grep OSTEMPLATE /etc/vz/conf/XXX.conf
Yes there is a centos.conf
Template name is centos-6-x86_64.tar.gz
I've noticed that the VPSs configuration file still contains the old template,
This is very strange because according to your strace vzctl thinks that this is a debian 6 VPS, see this line:
So it executes the scripts for debian VPS.
Edit it then, change OSTEMPLATE to centos-6-x86_64 and this should fix it.
Ok, I just gotta make a script that automates it
Stupid me, I forgot you can set --ostemplate with vzctl set, and I had just finished the sed command.
His signature is literally "Thanked by (1): Naruto.". If his post was really thanked, there wouldn't be a
Above it. (Unless there is a signature, which then it's below the signature)
Wasen't Naruto mant to be unbanned, I miss him.
Perhaps the reason why he keeps Thanking you. Best give @Chief a nudge
Unbanned!!!! wow...
"Last Active April 2"
Looks like Chief isn't showing up again lol
@DanielM That's @Daniels sig if you didn't notice..
Ahhh