[lxc-devel] [PATCH v3] Add Oracle Linux template

Serge Hallyn serge.hallyn at canonical.com
Tue Oct 9 17:35:04 UTC 2012


Quoting Dwight Engen (dwight.engen at oracle.com):
> On Mon, 8 Oct 2012 14:35:10 -0500
> Serge Hallyn <serge.hallyn at canonical.com> wrote:
...
> > Ubuntu by default creates a lxcbr0 bridge (NATed to the default nic).
> > So /etc/lxc/lxc.conf is ubuntu-specific because how to set such a
> > bridge up at boot is quite distro-specific.
> > 
> > Perhaps we should look into doing this all through augeas.
> 
> For now I just changed the template to honor the network link and type
> if they are specified in the config passed in. This makes it work on
> Ubuntu without changing anything, hopefully this is okay for now.

Yup, sounds good.  I certainly didn't mean that you should be implementing
a distro-agnostic lxc default bridge through augeas :)  Just something to
talk about.  I've added it to my list of topics for the lxc session at UDS.

...

> > > Another problem with this template when Ubuntu is the host is that
> > > Ubuntu's native rpm builds the rpm database into
> > > $container_rootfs/root/.rpmdb so when you boot into the container
> > > rpm -qa shows nothing because there is no database in /var/lib/rpm.
> > > Should I just try to detect if the host is Ubuntu and move the db
> > > files from .rpmdb to /var/lib/rpm? Are other (non-rpm-native)
> > > platforms going to have this problem as well, and do I need to
> > > handle them too?
> > 
> > Can you simply always pass '--dpath=/var/lib/rpm'?
> 
> rpm --dpath gives "unknown option" on both Oracle Linux and Ubuntu, so
> I don't think that will help :) I just had the template move the files
> if the host is Ubuntu, patches to follow.

d'oh, I meant --dbpath

> > My guess is that most non-rpm-native systems will try to avoid using
> > /var/lib/rpm by default, but that's purely a guess, and I'm not sure
> > if that should be deemed a bug in the debian package (especially the
> > fact that it isn't mentioned in the debian/README.Debian file)
> > 
> > > Also the db4 tool names aren't the same as on RHEL/OL if a database
> > > downgrade will be required (and I need to detect that case better,
> > > right now its going by the hosts /etc/oracle-release which obviously
> > > won't work if your host isn't Oracle, I'll probably switch to use
> > > the file command to test the hash version of the db). I guess I can
> > > check for a bunch of "alternate" tool names, any better ideas?
> > 
> > Hopefully someone more knowledgeable than I can pipe in...
> > 
> > thanks,
> > -serge
> 




More information about the lxc-devel mailing list