Bug 1421378

Summary: ctdb is denied resources when uses net team interfaces
Product: Red Hat Enterprise Linux 7 Reporter: lejeczek <peljasz>
Component: sambaAssignee: Michael Adam <madam>
Status: CLOSED CURRENTRELEASE QA Contact: qe-baseos-daemons
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 7.3CC: anoopcs, asn, gdeschner, jarrpa, madam, peljasz, rhack
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-18 09:15:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description lejeczek 2017-02-11 17:58:41 UTC
Description of problem:

it is not a new problem: https://bugzilla.redhat.com/show_bug.cgi?id=1201952

and there suggested workaround works, 

$ echo 10000 > /sys/fs/cgroup/cpu/system.slice/cpu.rt_runtime_us

but it'd great to have it fixed within the package.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Andreas Schneider 2017-02-15 15:55:01 UTC
Did you try to setting 

LimitRTPRIO=infinity
LimitRTTIME=100000


in the ctdb.service file?

Comment 3 lejeczek 2017-02-17 18:27:08 UTC
I do: system edit ctdb
there:

[Service]
ExecStartPre=/bin/sh -c "echo 10000 > /sys/fs/cgroup/cpu/system.slice/cpu.rt_runtime_us"
#LimitRTPRIO=infinity
#LimitRTTIME=100000

TimeoutStartSec=300
Restart=on-failure
RestartSec=20


But Limit options don't work for me.

Comment 4 Michael Adam 2017-02-21 15:51:34 UTC
Is the problem avoided if you run ctdbd with CTDB_NOSETSCHED=yes in the config file?

Comment 6 lejeczek 2017-02-25 12:24:33 UTC
Does not seem like start even honours this option. I put it in /etc/sysconfig/ctdb. Still fails the same.

Comment 7 Anoop C S 2017-09-11 11:40:12 UTC
(In reply to lejeczek from comment #6)
> Does not seem like start even honours this option. I put it in
> /etc/sysconfig/ctdb. Still fails the same.

The configuration parameter 'CTDB_NOSETSCHED' is only valid from ctdb version >=4.5. IIRC, RHEL 7.3 does not ship ctdb >=v4.5. In that case you may have to manually modify the ctdbd_wrapper script to disable real-time scheduling during start-up. Make changes to /usr/sbin/ctdbd_wrapper script along the following lines:

@@ -22,6 +22,8 @@ fi
 . "${CTDB_BASE}/functions"
 loadconfig "ctdb"
 
+CTDB_NOSETSCHED=yes
+
 [ -n "$CTDB_SOCKET" ] && export CTDB_SOCKET
 
 ctdbd="${CTDBD:-/usr/local/sbin/ctdbd}"
@@ -163,6 +165,7 @@ build_ctdb_options ()
     maybe_set "--start-as-stopped "      "$CTDB_START_AS_STOPPED"     "yes"
     maybe_set "--no-recmaster"           "$CTDB_CAPABILITY_RECMASTER" "no"
     maybe_set "--no-lmaster"             "$CTDB_CAPABILITY_LMASTER"   "no"
+    maybe_set "--nosetsched"             "$CTDB_NOSETSCHED"           "yes"
     maybe_set "--lvs --single-public-ip" "$CTDB_LVS_PUBLIC_IP"
     maybe_set "--script-log-level"       "$CTDB_SCRIPT_LOG_LEVEL"
     maybe_set "--max-persistent-check-errors" "$CTDB_MAX_PERSISTENT_CHECK_ERRORS"

See the extra lines(starting with the plus '+' symbol) to be added to ctdbd_wrapper script which is invoked by ctdb service file.

Comment 8 Andreas Schneider 2018-04-18 09:15:31 UTC
This has been addressed in the meantime, see comment #7. Closing.