Bug 2014995 - oc adm must-gather cannot gather audit logs with 'None' audit profile
Summary: oc adm must-gather cannot gather audit logs with 'None' audit profile
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.10
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.10.0
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks: 2008223
TreeView+ depends on / blocked
 
Reported: 2021-10-18 07:27 UTC by Ke Wang
Modified: 2022-03-11 18:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-11 18:15:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift must-gather pull 259 0 None open Bug 2014995: use single quotes instead of back quotes not to confuse shell 2021-10-18 12:13:17 UTC

Description Ke Wang 2021-10-18 07:27:17 UTC
Description of problem:
oc adm must-gather -- /usr/bin/gather_audit_logs with 'None' audit profile doesn't work.

Version-Release number of selected component (if applicable):
$ ./oc version
Client Version: 4.10.0-0.nightly-2021-10-16-173656
Server Version: 4.10.0-0.nightly-2021-10-16-173656
Kubernetes Version: v1.22.1+9312243


How reproducible:
Always

Steps to Reproduce:
1. $ ./oc patch apiserver cluster -p '{"spec": {"audit": {"profile": "None"}}}' --type merge

2. After the kube-apiserver degradation is finished.
$ ./oc get pods -n openshift-kube-apiserver -l apiserver --show-labels

3.$ ./oc adm must-gather -- /usr/bin/gather_audit_logs

Actual results:
oc adm must-gather -- /usr/bin/gather_audit_logs with 'None' audit profile doesn't work, hang in terminal.

$ ./oc adm must-gather -- /usr/bin/gather_audit_logs
[must-gather      ] OUT Using must-gather plug-in image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:cff59e07170457e57ee1929e5c12037dd77cbb188b4aee79e58d0553d21f6bd0
When opening a support case, bugzilla, or issue please include the following summary data along with any other requested information.
ClusterID: ad8a410a-5055-42ea-a195-ac5a65775b84
ClusterVersion: Stable at "4.10.0-0.nightly-2021-10-16-173656"
ClusterOperators:
	All healthy and stable


[must-gather      ] OUT namespace/openshift-must-gather-qm49c created
[must-gather      ] OUT clusterrolebinding.rbac.authorization.k8s.io/must-gather-cm97j created
[must-gather      ] OUT pod for plug-in image quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:cff59e07170457e57ee1929e5c12037dd77cbb188b4aee79e58d0553d21f6bd0 created
[must-gather-7bvjh] POD 2021-10-18T03:56:07.767932687Z Vim: Warning: Output is not to a terminal
[must-gather-7bvjh] POD 2021-10-18T03:56:07.767932687Z Vim: Warning: Input is not from a terminal

Expected results:
oc adm must-gather -- /usr/bin/gather_audit_logs with 'None' audit profile works fine.

Additional info:

Comment 1 Ke Wang 2021-10-18 07:45:21 UTC
Works fine with 'Default' audit profile.

Comment 3 zhou ying 2021-10-20 02:17:28 UTC
can't reproduce now:
[root@localhost ~]# oc version --client
Client Version: 4.10.0-0.nightly-2021-10-19-210507


[root@localhost ~]#  oc get  apiserver cluster --template={{.spec.audit.profile}}
None

oc adm must-gather -- /usr/bin/gather_audit_logs ; echo $?
......
When opening a support case, bugzilla, or issue please include the following summary data along with any other requested information.
ClusterID: dd8b8dcc-9944-4a40-a9c3-a16ba54db839
ClusterVersion: Stable at "4.9.0"
ClusterOperators:
	All healthy and stable


0


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