Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

Updated PID pressure node condition. #57136

Merged
merged 1 commit into from
Feb 16, 2018

Conversation

k82cn
Copy link
Member

@k82cn k82cn commented Dec 13, 2017

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
part of #54313

Release note:

Updated PID pressure node condition

@k82cn k82cn self-assigned this Dec 13, 2017
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 13, 2017
@k82cn k82cn force-pushed the k8s_54313 branch 2 times, most recently from 19f4aab to 6bea1d5 Compare January 3, 2018 07:58
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 3, 2018
@BenTheElder
Copy link
Member

/retest

@k82cn k82cn force-pushed the k8s_54313 branch 4 times, most recently from ae8aa02 to c48ae33 Compare January 8, 2018 07:46
@k82cn
Copy link
Member Author

k82cn commented Jan 9, 2018

xref #43783

@k82cn
Copy link
Member Author

k82cn commented Jan 9, 2018

/retest

}
}

if files, err := filepath.Glob("/proc/[0-9]*"); err == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like syscall.Sysinfo also reports the number of processes. want to use that?

package main

import (
    "fmt"
    "syscall"
)

func main() {
    var info syscall.Sysinfo_t
    syscall.Sysinfo(&info);
    fmt.Println("procs : ", info.Procs)
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's better, let me try it :).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems there's some gap between two way:

root@ubuntu-xenial:/home/ubuntu# ./main
procs :  140
procs :  120
package main

import (
	"fmt"
	"path/filepath"
	"syscall"
)

func main() {
	var info syscall.Sysinfo_t
	syscall.Sysinfo(&info)
	fmt.Println("procs : ", info.Procs)

	if files, err := filepath.Glob("/proc/[0-9]*"); err == nil {
		fmt.Println("procs : ", len(files))
	}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me ping Go community to confirm :).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The max pid is from /proc/sys/kernel/pid_max, The value of current running process is from sysinfo.Procs, which actually the value of nr_threads in kernel.
Question here is: If one node’s thread-max < pid_max , kernel can’t fork thread anymore if num of threads reaches thread-max but not pid-max , should we also consider about thread-max ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2018
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2018
Signed-off-by: Da K. Ma <madaxa@cn.ibm.com>
@k82cn
Copy link
Member Author

k82cn commented Jan 14, 2018

/retest

@k82cn k82cn changed the title WIP: Updated PID pressure node condition. Updated PID pressure node condition. Jan 14, 2018
@k82cn
Copy link
Member Author

k82cn commented Jan 15, 2018

/retest

@k82cn
Copy link
Member Author

k82cn commented Jan 15, 2018

@kubernetes/sig-node-pr-reviews

@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Jan 15, 2018
@k82cn
Copy link
Member Author

k82cn commented Jan 18, 2018

ping for comments :).

@krzyzacy
Copy link
Member

/cc @yujuhong

@@ -40,6 +40,8 @@ const (
SignalAllocatableMemoryAvailable Signal = "allocatableMemory.available"
// SignalAllocatableNodeFsAvailable is amount of local storage available for pod allocation
SignalAllocatableNodeFsAvailable Signal = "allocatableNodeFs.available"
// SignalPIDAvailable is amount of PID available for pod allocation
SignalPIDAvailable Signal = "pid.available"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to have a node-allocatable amount of PIDs, like we do for other resources?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm..., used to propose this here, but I agree with @vishh 's feedback to make it PID pressure, that make it easy to use.

@k82cn
Copy link
Member Author

k82cn commented Feb 9, 2018

ping :)

@dixudx
Copy link
Member

dixudx commented Feb 12, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 12, 2018
@vishh
Copy link
Contributor

vishh commented Feb 16, 2018

/lgtm
/approve

@BenTheElder
Copy link
Member

@cjwagner why is pull-kubernetes-e2e-kubeadm-gce-canary even showing up here? I can't see any reason it should have triggered.

all: you can safely ignore this, looking into why it is showing up though...

@k82cn
Copy link
Member Author

k82cn commented Feb 16, 2018

/retest

@liggitt
Copy link
Member

liggitt commented Feb 16, 2018

/approve
for API constant under v1/api

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dixudx, k82cn, liggitt, vishh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 16, 2018
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Feb 16, 2018

@k82cn: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-e2e-kubeadm-gce-canary 9a78753 link /test pull-kubernetes-e2e-kubeadm-gce-canary
pull-kubernetes-e2e-gce 9a78753 link /test pull-kubernetes-e2e-gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 57136, 59920). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit eac5bc0 into kubernetes:master Feb 16, 2018
@cjwagner
Copy link
Member

@BenTheElder This is WAI as far as I can tell. This PR modifies files that have the suffixes _linux.go and _unsupported.go, both of which trigger the pull-kubernetes-e2e-kubeadm-gce-canary job based on the run_if_changed regexp.

@BenTheElder
Copy link
Member

I see. I'm going to delete that job anyhow, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.