Some kubectl commands failing when using remote-cli

Bug #1849505 reported by Frank Miller
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Stefan Dinescu

Bug Description

Brief Description
-----------------
After having a working remote-cli (kubectl client), creating a pod from a remote machine, and attach/get into the pod using kubectl exec. the shell hangs.

Severity
--------
Major

Steps to Reproduce
------------------
from the remote-cli run follwoing comnmand to get into a running pod:

alias kc='kubectl -n kube-system'

create the pods
$kc apply -f /wd/testcases/macvlan/macvlan-static-vlan2000-test.yml
networkattachmentdefinition.k8s.cni.cncf.io/macvlan-wrk0-if1 created
networkattachmentdefinition.k8s.cni.cncf.io/macvlan-wrk1-if1 created
pod/pod0 created
pod/pod1 created
#get the pod0

$kc get pods
NAME READY STATUS RESTARTS AGE
..
pod0 1/1 Running 0 19s
pod1 1/1 Running 0 19s

..

attach to the pod0
$ kc exec -it pod0 bash
[root@pod0 /]#
...hangs here

Note: the same command works and does not hang if the user issues:
platform_shell

Expected Behavior
------------------
The kubectl commands should work without hanging when using remote-client
The remote cli code should recognize an environment variable and indicate whether a shell is required for the command or not

Actual Behavior
----------------
Some kubectl commands hang

Reproducibility
---------------
Reproducible

System Configuration
--------------------
All configs

Branch/Pull Time/Commit
-----------------------
Loads built as of Oct 9/2019

Last Pass
---------
first time this specific command was tested

Timestamp/Logs
--------------
n/a

Test Activity
-------------
Regression

Frank Miller (sensfan22)
Changed in starlingx:
assignee: nobody → Stefan Dinescu (stefandinescu)
Revision history for this message
Ghada Khalil (gkhalil) wrote :

stx.3.0 / medium priority - issue w/ remote cli

tags: added: stx.3.0 stx.containers
Changed in starlingx:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to clients (master)

Fix proposed to branch: master
Review: https://review.opendev.org/690913

Changed in starlingx:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to clients (master)

Reviewed: https://review.opendev.org/690913
Committed: https://git.openstack.org/cgit/starlingx/clients/commit/?id=63d1a87a6cf78c688170715ecdfd87ccaf7c2fec
Submitter: Zuul
Branch: master

commit 63d1a87a6cf78c688170715ecdfd87ccaf7c2fec
Author: Stefan Dinescu <email address hidden>
Date: Thu Oct 24 13:19:16 2019 +0300

    Allow forcing shell prompt option

    Some commands are designed to leave you in a shell prompt once
    executed, but it is hard to identify all such commands in the
    context of remote CLI.

    In order to allow users to use such commands, they can force
    the shell option or force disable the shell options using the
    FORCE_SHELL and FORCE_NO_SHELL variables before the command.

    The README has been updated with examples on the use of
    these variables

    Change-Id: Ica4e155fa21067448b99c4309f4736d39f0a419d
    Closes-bug: 1849505
    Signed-off-by: Stefan Dinescu <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.