Bug 1891459 - Snapshot tests should report stderr of failed commands
Summary: Snapshot tests should report stderr of failed commands
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.7.0
Assignee: Jan Safranek
QA Contact: Wei Duan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-26 10:46 UTC by Jan Safranek
Modified: 2021-02-24 15:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:28:00 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift kubernetes pull 427 0 None closed Bug 1891459: UPSTREAM: 95867: Log PodExec stdout + stderr 2021-01-15 09:57:31 UTC
Github openshift origin pull 25646 0 None closed Bug 1891459: bump(k8s.io/kubernetes) 2021-01-15 09:57:33 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:28:23 UTC

Description Jan Safranek 2020-10-26 10:46:30 UTC
A snapshot test failed in our CI:
https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_kubernetes/395/pull-ci-openshift-kubernetes-master-e2e-aws-csi/1319664121905418240

The failure says:

fail [k8s.io/kubernetes@v1.19.0/test/e2e/storage/testsuites/snapshottable.go:290]: Unexpected error:
    <exec.CodeExitError>: {
        Err: {
            s: "command terminated with exit code 1",
        },
        Code: 1,
    }
    command terminated with exit code 1

But there is no stdout / stderr of the failed command. In addition, the failed command would be helpful:

  s: "command "cat /mnt/test/data" terminated with exit code 1
stdout:
stderr:
  cat: /mnt/test/data: No such file or directory"

Comment 1 Jan Safranek 2020-10-26 12:27:13 UTC
Filed a PR upstream: https://github.com/kubernetes/kubernetes/pull/95867

Comment 3 Jan Safranek 2020-11-02 11:22:11 UTC
We need to propagate the test changes from openshift/kubernetes to openshift/origin to have them in our CI.

Comment 5 Wei Duan 2020-11-05 01:47:02 UTC
@Jan, not sure if the fix is as expected completely.

From the following output:
----------------------
fail [k8s.io/kubernetes@v1.19.0/test/e2e/storage/testsuites/snapshottable.go:290]: command "cat /mnt/test/data": stdout: 
stderr: cat: can't open '/mnt/test/data': Permission denied
Unexpected error:
    <exec.CodeExitError>: {
        Err: {
            s: "command terminated with exit code 1",
        },
        Code: 1,
    }
    command terminated with exit code 1
occurred
----------------------

Here print the stderr, but will we include this command in s: "command terminated with exit code 1"? I see some other logs do this.


Case name: [sig-storage] CSI Volumes [Driver: csi-hostpath] [Testpattern: Dynamic Snapshot (retain policy)] snapshottable[Feature:VolumeSnapshotDataSource] volume snapshot controller should restore from snapshot with saved data after modifying source data [Suite:openshift/conformance/parallel] [Suite:k8s] 
job: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_installer/3350/pull-ci-openshift-installer-master-e2e-aws/1324044508949647360

Comment 6 Jan Safranek 2020-11-05 09:34:26 UTC
There is:
command "cat /mnt/test/data": stdout: 
stderr: cat: can't open '/mnt/test/data': Permission denied

Which is (much) better than before.

(now, why is the permission denied... but that's completely different issue :-)

Comment 7 Wei Duan 2020-11-06 05:47:49 UTC
Yes, we have the command listed now, it is much improved. (Just double confirm to miss verification.)
Change the status to VERIFIED.

Comment 10 errata-xmlrpc 2021-02-24 15:28:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5633


Note You need to log in before you can comment on or make changes to this bug.