Bug 1886524 - Change default terminal command for Windows Pods
Summary: Change default terminal command for Windows Pods
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.7.0
Assignee: Robb Hamilton
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks: 1887612
TreeView+ depends on / blocked
 
Reported: 2020-10-08 16:34 UTC by Pratik Mahajan
Modified: 2021-02-24 15:24 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The terminal assumed all pods are Linux pods and did not account for Windows pods. Consequence: The terminal would not work with Windows pods as it defaulted to sh command. Fix: The terminal should detect the pod type and change the command accordingly. Result: The terminal detects if a pod is Windows and changes the command as necessary.
Clone Of:
Environment:
Last Closed: 2021-02-24 15:24:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
windows-pod-terminal (64.05 KB, image/png)
2020-10-15 10:40 UTC, Yanping Zhang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 6906 0 None closed Bug 1886524: Change default terminal command for Windows Pods 2021-01-07 21:40:46 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:24:29 UTC

Description Pratik Mahajan 2020-10-08 16:34:43 UTC
Description of problem:
The default command for using the terminal on Windows Pods is currently `sh`, which causes the terminal to not work for windows pods. 
Change the terminal command for windows pods to `cmd`. This can be changed based on the underlying os of the pod. 
Windows Pod have:
```
tolerations:
  - key: "os"
    value: "Windows"
    Effect: "NoSchedule"
```

Steps to Reproduce:
1. Bring up Windows Machine Config Operator https://github.com/openshift/windows-machine-config-operator
2. Bring up a Windows Node
3. Deploy a Windows Workload
4. Open Terminal on Console

Actual results:
Terminal Does not work on Console

Expected results:
Terminal works on Console

Additional info:
For questions regarding Windows Nodes, workloads, etc ping on #forum-winc, tag @winc-team on Slack

Comment 5 Yanping Zhang 2020-10-15 10:39:25 UTC
Set up ocp 4.7 cluster containing windows node with payload 4.7.0-0.nightly-2020-10-15-011122.
Create a windows workload on the cluster, check the pod's terminal, it's using windows terminal cmd. 
The bug is fixed.

Comment 6 Yanping Zhang 2020-10-15 10:40:30 UTC
Created attachment 1721791 [details]
windows-pod-terminal

Comment 9 errata-xmlrpc 2021-02-24 15:24:05 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.