heartbeat inside jail
Василий Татаренко
tatarenko at alpha-it.ru
Thu Aug 21 11:05:52 UTC 2014
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?
More information about the freebsd-jail
mailing list