LGTM, thanks
On Wed, Jul 30, 2014 at 6:36 PM, 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 6a63bbe..8051bfc 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" > @@ -90,7 +91,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): > @@ -128,7 +132,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 > > Hrvoje Ribicic Ganeti Engineering Google Germany GmbH Dienerstr. 12, 80331, München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores Steuernummer: 48/725/00206 Umsatzsteueridentifikationsnummer: DE813741370
