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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking on container name in details sidecar should add -c to logs command #4498

Closed
mark-nc opened this issue May 7, 2020 · 1 comment · Fixed by #4559
Closed

Clicking on container name in details sidecar should add -c to logs command #4498

mark-nc opened this issue May 7, 2020 · 1 comment · Fixed by #4559
Assignees
Labels
8_7_x affecting the 8_7_x stability branch kind/bug Categorizes issue or PR as related to a bug.

Comments

@mark-nc
Copy link

mark-nc commented May 7, 2020

Describe the bug
Clicking on the container name in the details sidecar for a pod runs the logs command agaist the pod and container name but does not include the -c flag in front of the container name. This can fail if the pod contains more than one container. In the case of one container, this is tolerated by kubectl even though kubectl logs --help calls out use of -c, but if using the Red Hat OpenShift Container Platform equivalent CLI oc it will always fail because oc enforces the syntax of putting -c before the container name.

Steps to reproduce the behavior

  1. Run kubectl get pods -n <someNamespace>
  2. Click on a pod in the table
  3. Go to the Containers tab in the pod details sidecar
  4. Click on the container name
  5. Observe that the resulting command executed is kubectl logs <podName> <containerName> -n <someNamespace> (no -c in front of <containerName>)

Expected behavior
The command should always work and will always work if the -c flag is always included before the container name as specified in the help documentation.

System

  • Kui version: 6.0.21 and plugin-kubeui 1.0.16 (but may also still exist in 8.x)
  • Operating system: Red Hat UBI8 container (effectively RHEL 8)
@mark-nc
Copy link
Author

mark-nc commented May 7, 2020

New information.... oc v4.4 behaves the same as kubectl and does not require the -c flag in front of the container name if there is only one container, but it still makes sense to include it on any logs command for the container as including -c always works in all cases.

@myan9 myan9 self-assigned this May 13, 2020
@myan9 myan9 added the kind/bug Categorizes issue or PR as related to a bug. label May 13, 2020
@starpit starpit added the 8_7_x affecting the 8_7_x stability branch label May 13, 2020
myan9 added a commit to myan9/kui that referenced this issue May 13, 2020
myan9 added a commit to myan9/kui that referenced this issue May 13, 2020
myan9 added a commit to myan9/kui that referenced this issue May 13, 2020
starpit pushed a commit that referenced this issue May 13, 2020
…ogs command

Also delegates oc logs to kubectl

Fixes #4498
myan9 added a commit to myan9/kui that referenced this issue May 13, 2020
@myan9 myan9 mentioned this issue May 13, 2020
starpit pushed a commit that referenced this issue May 13, 2020
…ogs command

Also delegates oc logs to kubectl

Fixes #4498
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8_7_x affecting the 8_7_x stability branch kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants