添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account Calling pthread_setschedparam with capability SYS_NICE (or even privileged: true) results in error #84069 Calling pthread_setschedparam with capability SYS_NICE (or even privileged: true) results in error #84069 skwokie opened this issue Oct 17, 2019 · 9 comments lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/node Categorizes an issue or PR as relevant to SIG Node.

What happened :
I'm trying to provision a server and the server code calls pthread_setschedparam. After doing some googling, I've realized that I need to give the container capability of SYS_NICE and so I did, and I've even given it privileged: true; however, the call still returns 2 (ENOENT).

What you expected to happen :
The calling returns without any error.

How to reproduce it (as minimally and precisely as possible) :
code snippet:

OS_THREAD_HANDLE handle;
LINUX_PTHREAD_CTL_t   *pthr;
struct sched_param my_param;
int my_policy;
if ((handle = OS_CURRENT_THREAD()) != NULL) {
    OS_CHANGE_THREAD_PRIORITY(handle, priority);
    return handle;
pthr = OS_CALLOC(0, sizeof(LINUX_PTHREAD_CTL_t));
strncpy(pthr->name, name, sizeof(pthr->name)-1);
pthread_mutex_init(&(pthr->mutex), NULL);
pthread_cond_init(&(pthr->cond), NULL);
OS_LINUX_THREAD_CTL_LOCK();
pthr->thread = pthread_self();
BASE_list_add(&OS_linux_thread_list, pthr);
pthread_getschedparam (pthr->thread, &my_policy, &my_param);
my_param.sched_priority = priority;
pthread_setschedparam(pthr->thread, SCHED_RR, &my_param);
OS_LINUX_THREAD_CTL_UNLOCK();
//OS_linux_thread_sched(&pthr->thread, pthr->name);
return (OS_THREAD_HANDLE) pthr;

yaml snippet:

securityContext:
          privileged: true
          capabilities:
              - SYS_NICE

Anything else we need to know?:

Environment:

Kubernetes version (use kubectl version):
lient Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-06T01:44:30Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.10-eks-5ac0f1", GitCommit:"5ac0f1d9ab2c254ea2b0ce3534fd72932094c6e1", GitTreeState:"clean", BuildDate:"2019-08-20T22:39:46Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"}

Cloud provider or hardware configuration:
AWS EKS

OS (e.g: cat /etc/os-release):
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Kernel (e.g. uname -a):
Linux ip-192-168-2-243.us-west-2.compute.internal 4.14.128-112.105.amzn2.x86_64 Unit test coverage in Kubelet is lousy. (~30%) #1 SMP Wed Jun 19 16:53:40 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Install tools:

Network plugin and version (if this is a network-related bug):

Others:

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 19, 2020

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 18, 2020

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/node Categorizes an issue or PR as relevant to SIG Node.