OpenVZ Forum


Home » General » Support » *SOLVED* CentOS5 Template Metadata package?
Re: *SOLVED* CentOS5 Template Metadata package? [message #15997 is a reply to message #15996] Fri, 17 August 2007 22:11 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
If you post the "standard" one, I can try it out and see what happens.

--David
Re: *SOLVED* CentOS5 Template Metadata package? [message #16005 is a reply to message #15997] Sat, 18 August 2007 13:45 Go to previous messageGo to next message
tpso
Messages: 19
Registered: September 2006
Location: Denmark
Junior Member
Hi David

I have put the default version on my server:

http://www.sonnet.dk/centos-5-i386-default.tar.gz

approx. 125Mb

/tpso
Re: *SOLVED* CentOS5 Template Metadata package? [message #16160 is a reply to message #12854] Sat, 25 August 2007 17:15 Go to previous messageGo to next message
tomp is currently offline  tomp
Messages: 64
Registered: August 2007
Member
I also encountered this problem using the meta data rpm of the openvz site.

I noticed that unlike the centos 4 meta data package, the centos 5 one was installing the udev package, and that simply disabling udev from running fixed the pty issue.

However I wanted udev not to be installed in the first place, so I added the following line to the bottom of "install-post" in the meta data directory:

$RPM --root $VE_ROOT -e udev --nodeps

[Updated on: Sat, 25 August 2007 17:16]

Report message to a moderator

Re: *SOLVED* CentOS5 Template Metadata package? [message #16220 is a reply to message #16160] Wed, 29 August 2007 05:35 Go to previous messageGo to next message
steve is currently offline  steve
Messages: 25
Registered: June 2007
Location: Orange County, California
Junior Member
tomp wrote on Sat, 25 August 2007 10:15

I also encountered this problem using the meta data rpm of the openvz site.

I noticed that unlike the centos 4 meta data package, the centos 5 one was installing the udev package, and that simply disabling udev from running fixed the pty issue.

However I wanted udev not to be installed in the first place, so I added the following line to the bottom of "install-post" in the meta data directory:

$RPM --root $VE_ROOT -e udev --nodeps




When creating the CentOS 5 meta data package, I did not specifically add the udev package to the template. It must have been picked up by yum because of a dependency.

I'm wondering why it's causing problems for some though. Looking at /sbin/start_udev in a minimal VPS, I'm not sure it should really even do anything considering that /sys in my VPS is empty. As I understand it, udev only mounts devices that are listed in /sys, no? Perhaps /sys is not always empty?
udev breaky things [message #16222 is a reply to message #16220] Wed, 29 August 2007 07:28 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
Steve,

Perhaps you already know this, but if udev gets installed after the fact... every case I've seen (and not just with CentOS 5)... the VPS will continue to run until you attempt a restart... and it is dead after that.

Having udev installed is not good. Perhaps your metadata package ends up with both vzdev and udev installed in the OS Template it creates?!? On systems where I've accidentally nuked a VPS because udev got installed to satisfy a dependency, I think it always removed vzdev as part of the process.

I'm not helping, but as long as I'm not hurting... Smile


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: udev breaky things [message #16355 is a reply to message #16222] Sun, 02 September 2007 15:38 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
Steve,

Ok, your vztmpl-centos-5 package is working for me now. I believe that the vast amount of replies to this topic has really muddled things here so I'll try to backup and start over.

Issues I was having:

1) Originally I was having a problem with it... running into a package conflict problem that made it fail before even attempting to create the OS Template. I don't know what resolved that issue for me, but I don't think it was the fault of your package anyway. That must have been an issue with my RHEL5 based host... so we won't worry about that.

2) As it is, your package (probably because of dependencies) creates an OS Template with both udev and vzdev installed. So, I did exactly what was recently recommended... I added the following line to very end of /vz/template/centos/5/i386/config/install-post

$RPM --root $VE_ROOT -e udev --nodeps

So, the OS Template is still broken, but any VPSes created from it can be fixed by adding that udev removal step to the VPS creation process.

To clarify... on working VPSes (mostly CentOS 4 or Fedora based ones I've used), I've noticed that if I install something that drags udev along with it... and if I allow it to install udev into the VPS, the VPS is basically toast after that. I don't recall exactly how they misbehave... but I've gone so far as do the following inside of a VPS to keep udev from ever really being installed:

rpm -ivh --justdb {urls for udev package and its [if any] dependencies}

And then it is good idea to add udev as an exclude in the yum.conf of the VPS (I always install yum inside my VPSes) so if an updated package for udev comes along, that won't try to upgrade.

Your comment about /sys not being in the VPS... perhaps that was what was causing udev to misbehave if installed. Who knows?!?

It would be nice if we could fix it by having udev not get installed into the OS Template to begin with... but I don't know of a way to make that happen... so the install-post hack is good enough for now.

I appreciate your work.


--
TYL, Scott Dowdle
Belgrade, Montana, USA

[Updated on: Sun, 02 September 2007 15:39]

Report message to a moderator

Re: udev breaky things [message #16356 is a reply to message #16355] Sun, 02 September 2007 15:50 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
On second thought...

Is the install-post used by vzpkgcache or vzctl create?



--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: *SOLVED* CentOS5 Template Metadata package? [message #16492 is a reply to message #12854] Sun, 09 September 2007 13:01 Go to previous messageGo to next message
Bodysplit is currently offline  Bodysplit
Messages: 20
Registered: July 2007
Junior Member
Greetings!

I'm trying to work my way getting CentOS 5-based VPS work. Problem is: I'm on x64. Is there a timeframe for a metadata pkg? sspt already build templates, but vzyum is useless with these as dowdle already stated.

How about sources for the rpm? I'm not to deep into metadata creation, but I would like to have a try.


--
This doesn't look comfortable...
Re: udev breaky things [message #16496 is a reply to message #16355] Mon, 10 September 2007 06:33 Go to previous messageGo to next message
steve is currently offline  steve
Messages: 25
Registered: June 2007
Location: Orange County, California
Junior Member
Scott-

I just can't seem to figure out why udev is causing all of these problems for you and others. Suffice it to say though that it really makes me uncomfortable.

I have udev and vzdev both installed on all my CentOS 5-based VPSs and not a hint of a problem yet. Now I don't have anything as advanced as a GNOME GUI image created from the repository yet, however, I can restart them, stop them, and run them without any problems whatsoever.

At this point I'm trying to determine what is different on my systems vs yours. If you leave in udev after creating a VPS:

1. Are there any files in /sys inside the VPS?

2. What is the contents of /proc/mounts inside the VPS?

I've done some reading about udev and my understanding is that in it's configuration within the VPS's it basically does nothing (or should do nothing). My supposition is that in your case (and everyone else's that doesn't work) it is trying to create devices and getting stuck after a conflict with the manually created vzdev devices. If we can find out why this is happening, perhaps we can stop this bad behavior of udev, and, thus, solve your problem.
Re: udev breaky things [message #16509 is a reply to message #16496] Mon, 10 September 2007 12:12 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
Steve,

I've had a problem with udev breaking systems (if it gets installed to satisfy a dependency) for a long time now. It I recall correctly, I broke a FC5 VPS over a year ago... which I was able to salvage by removing udev.

In any event, I think you are asking the wrong question. To the best of my knowledge, none of the OS Templates have udev installed and vzdev was created for a reason, right?

Regarding your question about /sys, I just checked a CentOS 4 based VPS (on a CentOS 4 based HN) and indeed /sys is empty.

Regarding /proc/mount, the same system has:

[root@vps1 ~]# cat /proc/mounts
simfs / simfs rw 0 0
proc /proc proc rw,nodiratime 0 0
devpts /dev/pts devpts rw 0 0
[root@vps1 ~]#


Now I'll check a CentOS 5 based VPS on a CentOS 5 based HN:

[root@img ~]# ls -lR /sys
/sys:
total 0
drwxr-xr-x 4 root root 0 Aug 22 14:35 class

/sys/class:
total 0
drwxr-xr-x 4 root root 0 Aug 22 14:35 net
drwxr-xr-x 3 root root 0 Aug 22 14:35 tty

/sys/class/net:
total 0
drwxr-xr-x 2 root root 0 Aug 22 14:35 lo
drwxr-xr-x 3 root root 0 Aug 22 14:35 venet0

/sys/class/net/lo:
total 0
lrwxrwxrwx 1 root root 0 Sep 10 08:09 subsystem -> ../../../class/net
--w------- 1 root root 4096 Sep 10 08:09 uevent

/sys/class/net/venet0:
total 0
drwxr-xr-x 2 root root 0 Aug 22 14:35 statistics
lrwxrwxrwx 1 root root 0 Sep 10 08:09 subsystem -> ../../../class/net
--w------- 1 root root 4096 Sep 10 08:09 uevent

/sys/class/net/venet0/statistics:
total 0
-r--r--r-- 1 root root 4096 Sep 10 08:09 collisions
-r--r--r-- 1 root root 4096 Sep 10 08:09 multicast
-r--r--r-- 1 root root 4096 Sep 10 08:09 rx_bytes
-r--r--r-- 1 root root 4096 Sep 10 08:09 rx_compressed
-r--r--r-- 1 root root 4096 Sep 10 08:09 rx_crc_errors
-r--r--r-- 1 root root 4096 Sep 10 08:09 rx_dropped
-r--r--r-- 1 root root 4096 Sep 10 08:09 rx_errors
-r--r--r-- 1 root root 4096 Sep 10 08:09 rx_fifo_errors
-r--r--r-- 1 root root 4096 Sep 10 08:09 rx_frame_errors
-r--r--r-- 1 root root 4096 Sep 10 08:09 rx_length_errors
-r--r--r-- 1 root root 4096 Sep 10 08:09 rx_missed_errors
-r--r--r-- 1 root root 4096 Sep 10 08:09 rx_over_errors
-r--r--r-- 1 root root 4096 Sep 10 08:09 rx_packets
-r--r--r-- 1 root root 4096 Sep 10 08:09 tx_aborted_errors
-r--r--r-- 1 root root 4096 Sep 10 08:09 tx_bytes
-r--r--r-- 1 root root 4096 Sep 10 08:09 tx_carrier_errors
-r--r--r-- 1 root root 4096 Sep 10 08:09 tx_compressed
-r--r--r-- 1 root root 4096 Sep 10 08:09 tx_dropped
-r--r--r-- 1 root root 4096 Sep 10 08:09 tx_errors
-r--r--r-- 1 root root 4096 Sep 10 08:09 tx_fifo_errors
-r--r--r-- 1 root root 4096 Sep 10 08:09 tx_heartbeat_errors
-r--r--r-- 1 root root 4096 Sep 10 08:09 tx_packets
-r--r--r-- 1 root root 4096 Sep 10 08:09 tx_window_errors

/sys/class/tty:
total 0
drwxr-xr-x 2 root root 0 Aug 22 14:35 ptmx

/sys/class/tty/ptmx:
total 0
-r--r--r-- 1 root root 4096 Sep 10 08:09 dev
lrwxrwxrwx 1 root root 0 Sep 10 08:09 subsystem -> ../../../class/tty
--w------- 1 root root 4096 Sep 10 08:09 uevent
[root@img ~]#

Now for /proc/mounts:

[root@img ~]# cat /proc/mounts
simfs / simfs rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw 0 0
iso9660 /var/www/html/linux/centos/4.5/i386/base iso9660 ro 0 0
iso9660 /var/www/html/linux/centos/5.0/i386/base iso9660 ro 0 0
iso9660 /var/www/html/linux/centos/5.0/x86_64/base iso9660 ro 0 0
[root@img ~]#

It's an image server so I have some isos mounted too.


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: udev breaky things [message #20556 is a reply to message #16509] Thu, 20 September 2007 18:14 Go to previous messageGo to next message
steve is currently offline  steve
Messages: 25
Registered: June 2007
Location: Orange County, California
Junior Member
[quote title=dowdle wrote on Mon, 10 September 2007 05:12]Steve,

I've had a problem with udev breaking systems (if it gets installed to satisfy a dependency) for a long time now. It I recall correctly, I broke a FC5 VPS over a year ago... which I was able to salvage by removing udev.

In any event, I think you are asking the wrong question. To the best of my knowledge, none of the OS Templates have udev installed and vzdev was created for a reason, right?

Regarding your question about /sys, I just checked a CentOS 4 based VPS (on a CentOS 4 based HN) and indeed /sys is empty.

[quote]

Scott-

For some reason since I've been running on a RHEL 4 system, my /sys is always empty when VPS's are created--so, even if udev *is* installed it does nothing. However, I have a CentOS 5 system and see that there is indeed a populated /sys directory for each VPS created (minimal, but there nonetheless). This, of course, puts udev into action if it is installed, which, of course, causes problems. Thus, I have tried to extricate udev from any VPS created from the template. As I've mentioned before, I'm far from an expert on RPM creation, however, I've created another template metadata rpm that attempts to accomplish this goal. It informs the system that vzdev will suffice for udev and also includes a yum configuration entry to prevent udev from being installed.

I have attached it to this post. Can you please give it a try and let me know if it works. I have incremented the release number so it should be a simple rpm upgrade.
Re: udev breaky things [message #20557 is a reply to message #20556] Thu, 20 September 2007 20:26 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
Steve,

Seems to be a winner dude!!!

Here's what I did to test it out to the max:

1) Edited the /vz/template/centos/5/i386/config/default.list and added mc, nano and yum.

2) Built a template with vzpkgcache -f centos-5. That went perfectly.

3) Created a CentOS 5 a VPS with a 10GB diskspace and lots of resources.

4) Entered the VPS and configured yum to use my LAN based repos.

5) Used yum groupinstall to install almost all package groups that were available:

yum groupinstall "Office/Productivity" "Engineering and Scientific" "MySQL Database" "Development Libraries" "Editors" "GNOME Software Development" "X Software Development" "GNOME Desktop Environment" "Authoring and Publishing" "Games and Entertainment" "Legacy Software Development" "Emacs" "Legacy Software Support" "X Window System" "Graphics" "Ruby" "Printing Support" "KDE Software Development" "Sound and Video" "Administration Tools" "Development Tools" "Graphical Internet" "KDE (K Desktop Environment)"

That was about 1GB worth of packages but over the LAN it was very fast.

Oddly enough that installed a kernel package... so I immediately did:

rpm -e kernel systemtap-runtime systemtap gnome-volume-manager gnome-session

I had to add the additional packages to the removal list to keep rpm from griping about requirements. I wonder what would have happened if I left the kernel installed? Probably nothing bad, eh?

6) Created a regular user, logged in as that user, created a .vnc/xstartup that starts KDE and started vncserver with:
vncserver -geometry 1024x768 -depth 16

7) Ran vncviewer on my desktop and connected... installed a ton more applications including Sun's JDK 6u2 with Netbeans 5.5.1, Eclipse, flash-plugin, Acrobat Reader 8.1.1 (released last week). I did all of this stuff to configure the machine just like one of my CS lab machines.

Everything worked great.

I shut the VPS down. Started it again, and repeated the VNC test and everything worked great. I can't seem to break it. Smile

I copied all of the commands I did into a text file while I was doing all of the testing. I destroyed the VPS and then repeated everything again, and it worked fine.

Anything else you can think of that you'd like me to test???

Good job!


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: udev breaky things [message #20565 is a reply to message #20557] Fri, 21 September 2007 06:10 Go to previous messageGo to next message
steve is currently offline  steve
Messages: 25
Registered: June 2007
Location: Orange County, California
Junior Member
dowdle wrote on Thu, 20 September 2007 13:26

Steve,

Seems to be a winner dude!!!

Here's what I did to test it out to the max:

1) Edited the /vz/template/centos/5/i386/config/default.list and added mc, nano and yum.

2) Built a template with vzpkgcache -f centos-5. That went perfectly.

3) Created a CentOS 5 a VPS with a 10GB diskspace and lots of resources.

4) Entered the VPS and configured yum to use my LAN based repos.

5) Used yum groupinstall to install almost all package groups that were available:

yum groupinstall "Office/Productivity" "Engineering and Scientific" "MySQL Database" "Development Libraries" "Editors" "GNOME Software Development" "X Software Development" "GNOME Desktop Environment" "Authoring and Publishing" "Games and Entertainment" "Legacy Software Development" "Emacs" "Legacy Software Support" "X Window System" "Graphics" "Ruby" "Printing Support" "KDE Software Development" "Sound and Video" "Administration Tools" "Development Tools" "Graphical Internet" "KDE (K Desktop Environment)"

That was about 1GB worth of packages but over the LAN it was very fast.




I'd say that's a pretty good test.

Quote:



Oddly enough that installed a kernel package... so I immediately did:

rpm -e kernel systemtap-runtime systemtap gnome-volume-manager gnome-session




I came so close to excluding the kernel from yum updates as well, but I didn't think it would ever get pulled in. I'll add it the next time I roll the package.

Quote:



I had to add the additional packages to the removal list to keep rpm from griping about requirements. I wonder what would have happened if I left the kernel installed? Probably nothing bad, eh?

6) Created a regular user, logged in as that user, created a .vnc/xstartup that starts KDE and started vncserver with:
vncserver -geometry 1024x768 -depth 16

7) Ran vncviewer on my desktop and connected... installed a ton more applications including Sun's JDK 6u2 with Netbeans 5.5.1, Eclipse, flash-plugin, Acrobat Reader 8.1.1 (released last week). I did all of this stuff to configure the machine just like one of my CS lab machines.

Everything worked great.

I shut the VPS down. Started it again, and repeated the VNC test and everything worked great. I can't seem to break it. Smile

I copied all of the commands I did into a text file while I was doing all of the testing. I destroyed the VPS and then repeated everything again, and it worked fine.

Anything else you can think of that you'd like me to test???

Good job!


Just keep me updated if anything breaks. I'm determined to keep this working as I'm using it in production now and I really don't want any surprises.

Wow, you've peaked my interest. I've just got to do the graphical thing now....
Re: udev breaky things [message #22989 is a reply to message #20565] Fri, 09 November 2007 08:32 Go to previous messageGo to next message
mcluver is currently offline  mcluver
Messages: 12
Registered: February 2007
Junior Member
I am very interested in this working X-package that you have created, would you be willing to share the template cache?

Matt
Re: udev breaky things [message #23015 is a reply to message #22989] Fri, 09 November 2007 13:51 Go to previous message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
Can you create your own using the somewhat vague recipe I gave?

If not, I can give you a URL for the finished OS Template. I don't recall how big it is but I'd probably want to install it, change the yum.repos.d stuff back to the regular repos, and change the user from my last name to something more generic... and then tar.gz that up into a more generic OS Template.

Just email me: dowdle@montanalinux.org


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Previous Topic: audit
Next Topic: Why use OpenVZ?
Goto Forum:
  


Current Time: Wed Apr 10 06:18:38 GMT 2024

Total time taken to generate the page: 0.02089 seconds