Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 401063 - sys-apps/openrc doesn't run localmount for openvz containers
Summary: sys-apps/openrc doesn't run localmount for openvz containers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 399185
  Show dependency tree
 
Reported: 2012-01-27 19:27 UTC by Daniel Robbins
Modified: 2012-02-13 18:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Robbins 2012-01-27 19:27:11 UTC
Currently (in git, and release versions), OpenRC does not run localmount as it has a -openvz in keywords. However, it's possible to mount stuff within OpenVZ, such as tmpfs mounts that the system may need. I recommend removing -openvz from keywords in localmount so /etc/fstab can be used for this purpose.

For lxc, you need to have the host pre-mount everything, as far as I can tell. Mounting once the container is running seems to be denied by default. So the current setting of -lxc is correct.

For vserver, I am not sure as I don't use it.

Reproducible: Always
Comment 1 William Hubbs gentoo-dev 2012-01-27 19:59:48 UTC
Daniel,

I am considering merging swap into localmount because of bug #400063.

If I do that,, would we be able to still use localmount in openvz
containers?

William
Comment 2 William Hubbs gentoo-dev 2012-01-27 20:01:07 UTC
Correction: The bug I meant to refer to was bug #401003.
Comment 3 Daniel Robbins 2012-01-27 20:14:44 UTC
For OpenVZ, the host takes care of setting up swap if vswap is enabled. Initscripts don't need to do anything. So the initscript should probably skip the swap step if it is running within an openvz container.

Is there a handy way for a script to programatically "am I an openvz container?" from the shell part of the script?

If not, would be a nice feature to have :)
Comment 4 William Hubbs gentoo-dev 2012-01-27 20:25:17 UTC
Yes there is, the rc_sys variable. So I believe we can use that.

I'm also thinking that we should not run the swap step for *any*
container type, but I'll look at that more closely as part of the merge.
Comment 5 Daniel Robbins 2012-01-27 20:26:00 UTC
Probably a good assumption.
Comment 6 William Hubbs gentoo-dev 2012-02-13 18:30:48 UTC
This is done in commit 1c7d316.