Bug 1891459

Summary: Snapshot tests should report stderr of failed commands
Product: OpenShift Container Platform Reporter: Jan Safranek <jsafrane>
Component: StorageAssignee: Jan Safranek <jsafrane>
Storage sub component: Kubernetes QA Contact: Wei Duan <wduan>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: aos-bugs
Version: 4.7   
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:28:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.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.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