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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestMetricsDuGetCapacity unit test fails on 1.17.2 #88061

Open
249043822 opened this issue Feb 12, 2020 · 4 comments
Open

TestMetricsDuGetCapacity unit test fails on 1.17.2 #88061

249043822 opened this issue Feb 12, 2020 · 4 comments

Comments

@249043822
Copy link
Contributor

@249043822 249043822 commented Feb 12, 2020

What happened:
13:12:11 === RUN TestMetricsDuGetCapacity
13:12:11 --- FAIL: TestMetricsDuGetCapacity (0.01s)
metrics_du_test.go馃挴 Unexpected Used for directory with file. Expected 4096, got 0.

What you expected to happen:
should SUCCESS
How to reproduce it (as minimally and precisely as possible):
make test
maybe this pr ##82474 caused

Anything else we need to know?
I have printed related debugging messages:

out, err := exec.Command("nice", "-n", "19", "du", "-x", "-s", "-B", "1", path).CombinedOutput()
	fmt.Printf("out %s\n", out)
	if err != nil {
		return nil, fmt.Errorf("failed command 'du' ($ nice -n 19 du -x -s -B 1) on path %s with error %v", path, err)
	}
	used, err := resource.ParseQuantity(strings.Fields(string(out))[0])
	if err != nil {
		return nil, fmt.Errorf("failed to parse 'du' output %s due to error %v", out, err)
	}
	used.Format = resource.BinarySI
	fmt.Printf("used %#v\n", used)

13:12:11 out 0 /tmp/metrics_du_test459165491
13:12:11
13:12:11 used resource.Quantity{i:resource.int64Amount{value:0, scale:0}, d:resource.infDecAmount{Dec:(*inf.Dec)(nil)}, s:"0", Format:"BinarySI"}
13:12:11 out 0 /tmp/metrics_du_test459165491
13:12:11
13:12:11 used resource.Quantity{i:resource.int64Amount{value:0, scale:0}, d:resource.infDecAmount{Dec:(*inf.Dec)(nil)}, s:"0", Format:"BinarySI"}
13:12:11 out 4096 /tmp/metrics_du_test459165491/f1

cmd test:
mkdir /tmp/du_test && echo Hello World > /tmp/du_test/f1 && nice -n 19 du -s -B 1 /tmp/du_test
4096 /tmp/du_test

mkdir /tmp/du_test && echo Hello World > /tmp/du_test/f1 && nice -n 19 du -x -s -B 1 /tmp/du_test
0 /tmp/du_test

Environment:

  • Kubernetes version (use kubectl version):1.17.2

  • Cloud provider or hardware configuration:

  • OS (e.g: cat /etc/os-release):
    root@066be942081d:/workspace# cat /etc/debian_version
    10.2

  • Kernel (e.g. uname -a):
    root@066be942081d:/workspace# uname -a
    Linux 066be942081d 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Dec 15 15:29:17 CST 2017 x86_64 GNU/Linux

  • Install tools:

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

  • Others:

@249043822

This comment has been minimized.

Copy link
Contributor Author

@249043822 249043822 commented Feb 12, 2020

/sig volume

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Feb 12, 2020

@249043822: The label(s) sig/volume cannot be applied, because the repository doesn't have them

In response to this:

/sig volume

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.

@249043822

This comment has been minimized.

Copy link
Contributor Author

@249043822 249043822 commented Feb 12, 2020

/sig testing

@k8s-ci-robot k8s-ci-robot added sig/testing and removed needs-sig labels Feb 12, 2020
@249043822

This comment has been minimized.

Copy link
Contributor Author

@249043822 249043822 commented Feb 12, 2020

additional info:
$docker info
14:00:33 Containers: 0
14:00:33 Running: 0
14:00:33 Paused: 0
14:00:33 Stopped: 0
14:00:33 Images: 44
14:00:33 Server Version: 1.12.6
14:00:33 Storage Driver: overlay2
14:00:33 Backing Filesystem: xfs
14:00:33 Logging Driver: json-file
14:00:33 Cgroup Driver: cgroupfs
14:00:33 Plugins:
14:00:33 Volume: local
14:00:33 Network: host null bridge overlay
14:00:33 Swarm: inactive
14:00:33 Runtimes: runc
14:00:33 Default Runtime: runc
14:00:33 Security Options: seccomp
14:00:33 Kernel Version: 3.10.0-514.26.2.el7.x86_64
14:00:33 Operating System: NewStart Carrier Grade Server Linux Core 1.3
14:00:33 OSType: linux
14:00:33 Architecture: x86_64
14:00:33 CPUs: 8
14:00:33 Total Memory: 23.39 GiB
14:00:33 Name: slave107.g2.r5.sz
14:00:33 ID: SDRF:BJ6U:IFI7:SLEZ:XLIT:VAKE:LRJR:UBGP:JCPM:BCMN:H7XZ:FPNE
14:00:33 Docker Root Dir: /var/lib/docker
14:00:33 Debug Mode (client): false
14:00:33 Debug Mode (server): true
14:00:33 File Descriptors: 16
14:00:33 Goroutines: 24
14:00:33 System Time: 2020-02-12T14:00:32.511007463+08:00
14:00:33 EventsListeners: 0
14:00:33 Registry: https://index.docker.io/v1/
14:00:33 Insecure Registries:
14:00:33 0.0.0.0/0
14:00:33 127.0.0.0/8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can鈥檛 perform that action at this time.