Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Aug 2014 15:05:23 +0400
From:      =?UTF-8?B?0JLQsNGB0LjQu9C40Lkg0KLQsNGC0LDRgNC10L3QutC+?= <tatarenko@alpha-it.ru>
To:        freebsd-jail@freebsd.org
Subject:   heartbeat inside jail
Message-ID:  <CALkSRfwAki1jFQJ-vqj0XPj1h-Fs_94Ucjv9BU0SZM9sDONvyw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I use FreeBSD 10.0-p7
I try use heartbeat (/usr/ports/sysutils/heartbeat) inside jail.
My /etc/jail.conf:

> allow.raw_sockets = "true";
> allow.mount = "true";
> allow.mount.devfs = "true";
> mount.devfs = "true";
> exec.start = "sh /etc/rc";
> exec.stop = "sh /etc/rc.shutdown";
> webcl {
>         enforce_statfs = "1";
>         vnet = "new";
>         exec.prestart = "ifconfig epair1 create up";
>         exec.prestart += "ifconfig bridge0 addm epair1a";
>         exec.start = "ifconfig epair1b link **:**:**:**:**:**";
>         exec.start += "sh /etc/rc";
>         vnet.interface = "epair1b";
>         exec.poststop = "ifconfig bridge0 deletem epair1a";
>         exec.poststop += "ifconfig epair1a destroy";
>         path = "/jails/webcl";
>         name = "webcl";
>         host.hostname = "************";
>         allow.mount.nullfs = "true";
>         allow.mount.procfs = "true";
>         allow.sysvipc = "true";
> }

When i start heartbeat by

> service heartbeat onestart

I get errors like this:

> Aug 21 10:38:39 de heartbeat: [40637]: ERROR: Unable to set scheduler
> parameters.: Operation not permitted
> Aug 21 10:38:39 de heartbeat: [40637]: ERROR: Unable to lock pid 40637 in
> memory: Operation not permitted

Aug 21 10:39:10 de heartbeat: [40647]: ERROR: unable to (re)set scheduler
> parameters.: Operation not permitted


 I tried to figure out what function exactly get Operation not permitted by

> find /usr/ports/sysutils/heartbeat -exec grep -l 'Unable to set scheduler
> parameters' "{}" \;
>
And only file which is source is

> /usr/ports/sysutils/heartbeat/work/STABLE-2.1.4/lib/clplumbing/realtime.c

So i dig inside and see that:

>         if ((staticp=sched_getscheduler(0)) < 0) {
>                 cl_perror("unable to get scheduler parameters.");
>         }else{
>                 memset(&sp, 0, sizeof(sp));
>                 sp.sched_priority = priority;
>                 if (sched_setscheduler(0, spolicy, &sp) < 0) {
>                         cl_perror("Unable to set scheduler parameters.");
>                 }
>         }

heartbeat process are all run from root.
What can i do to make it work?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALkSRfwAki1jFQJ-vqj0XPj1h-Fs_94Ucjv9BU0SZM9sDONvyw>