LGTM, thanks
On Thu, Jul 24, 2014 at 2:32 AM, Yuto KAWAMURA(kawamuray) < [email protected]> wrote: > Placing log files under var/log/ganeti/lxc is preferrable than placing > it under var/run/ganeti/lxc. > > Signed-off-by: Yuto KAWAMURA(kawamuray) <[email protected]> > --- > lib/hypervisor/hv_lxc.py | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/lib/hypervisor/hv_lxc.py b/lib/hypervisor/hv_lxc.py > index eff07af..3e1269e 100644 > --- a/lib/hypervisor/hv_lxc.py > +++ b/lib/hypervisor/hv_lxc.py > @@ -54,6 +54,7 @@ class LXCHypervisor(hv_base.BaseHypervisor): > > """ > _ROOT_DIR = pathutils.RUN_DIR + "/lxc" > + _LOG_DIR = pathutils.LOG_DIR + "/lxc" > _CGROUP_ROOT_DIR = _ROOT_DIR + "/cgroup" > _PROC_CGROUPS_FILE = "/proc/cgroups" > _PROC_SELF_CGROUP_FILE = "/proc/self/cgroup" > @@ -88,7 +89,10 @@ class LXCHypervisor(hv_base.BaseHypervisor): > > def __init__(self): > hv_base.BaseHypervisor.__init__(self) > - utils.EnsureDirs([(self._ROOT_DIR, self._DIR_MODE)]) > + utils.EnsureDirs([ > + (self._ROOT_DIR, self._DIR_MODE), > + (self._LOG_DIR, 0750), > + ]) > > @staticmethod > def _GetMountSubdirs(path): > @@ -126,7 +130,7 @@ class LXCHypervisor(hv_base.BaseHypervisor): > > """ > filename = "%s.%s.log" % (instance.name, instance.uuid) > - return utils.PathJoin(cls._ROOT_DIR, filename) > + return utils.PathJoin(cls._LOG_DIR, filename) > > @classmethod > def _InstanceStashFilePath(cls, instance_name): > -- > 1.8.5.5 > >
