mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Ensure node e2e apiserver and test suite can open enough files
The apiserver and test suite in node e2e runs under the sshd daemon that can limit the amount of files it can open. Set a higher limit to address the issues. Signed-off-by: Odin Ugedal <odin@uged.al>
This commit is contained in:
parent
c9fb3c8a1b
commit
1c8675fc02
@ -40,6 +40,7 @@ import (
|
||||
utilyaml "k8s.io/apimachinery/pkg/util/yaml"
|
||||
clientset "k8s.io/client-go/kubernetes"
|
||||
cliflag "k8s.io/component-base/cli/flag"
|
||||
"k8s.io/kubernetes/pkg/util/rlimit"
|
||||
commontest "k8s.io/kubernetes/test/e2e/common"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
e2econfig "k8s.io/kubernetes/test/e2e/framework/config"
|
||||
@ -123,6 +124,12 @@ func TestMain(m *testing.M) {
|
||||
const rootfs = "/rootfs"
|
||||
|
||||
func TestE2eNode(t *testing.T) {
|
||||
|
||||
// Make sure we are not limited by sshd when it comes to open files
|
||||
if err := rlimit.SetNumFiles(1000000); err != nil {
|
||||
klog.Infof("failed to set rlimit on max file handles: %v", err)
|
||||
}
|
||||
|
||||
if *runServicesMode {
|
||||
// If run-services-mode is specified, only run services in current process.
|
||||
services.RunE2EServices(t)
|
||||
|
Loading…
Reference in New Issue
Block a user