Giter Club home page Giter Club logo

Comments (5)

wrfly avatar wrfly commented on May 29, 2024

Hi, thanks for the issue.

  1. 这个ls是为了检查SHELL_LIST里的文件是否存在的,所以还不能删;但由于十个月以前了,也不知道kubeAPI变了没,有时间我再回归测试一下。
  2. /bin/bash这个是为了先检查目标文件是否存在,如果用bash的话,就检查不出文件存在了:
// ContainerStatPath returns Stat information about a path inside the container filesystem.
func (cli *Client) ContainerStatPath(ctx context.Context, containerID, path string) (types.ContainerPathStat, error) {
  1. kuberctl 的确是个typo,等下次修bug的时候改掉

Thanks again.

from container-web-tty.

vsxen avatar vsxen commented on May 29, 2024

是我理解错了 我看kubectl POST是exec?command=bash&container=u&stdin=true&stdout=true&tty=true 这样的

不过确实有问题

DEBU[0006] find cid: 1e49a89511a2
DEBU[0006] get container's shell path, cid: 1e49a89511a2
DEBU[0006] POST to https://x.x.x.x.x:6443/api/v1/namespaces/default/pods/u-69bf7ff58d-99dtx/exec?command=ls&command=%2Fbin%2Fbash&container=u&stdin=false&stdout=true&tty=false
DEBU[0006] container 1e49a89511a2 exist /bin/bash
DEBU[0006] get shell path /bin/bash
[GIN] 2019/04/21 - 14:13:41 | 200 |  105.916078ms | x.x.x.x.x | GET      /exec/1e49a89511a2/
[GIN] 2019/04/21 - 14:13:41 | 200 |     248.994µs | x.x.x.x.x | GET      /css/index.css
[GIN] 2019/04/21 - 14:13:41 | 200 |      140.08µs | x.x.x.x.x | GET      /css/xterm_customize.css
[GIN] 2019/04/21 - 14:13:41 | 200 |      63.775µs | x.x.x.x.x | GET      /auth_token.js
[GIN] 2019/04/21 - 14:13:41 | 200 |     412.717µs | x.x.x.x.x | GET      /css/xterm.css
[GIN] 2019/04/21 - 14:13:41 | 200 |      47.291µs | x.x.x.x.x | GET      /config.js
[GIN] 2019/04/21 - 14:13:41 | 200 |   55.462524ms | x.x.x.x.x | GET      /js/gotty-bundle.js
DEBU[0006] find cid: 1e49a89511a2
INFO[0006] New client connected: x.x.x.x.x:29913, connections: 1
DEBU[0006] exec container: 1e49a89511a2aebec7f18877048def60adbebd03e7d8a762843814cf4b1c9c43, params:
DEBU[0006] exec pod: {1e49a89511a2aebec7f18877048def60adbebd03e7d8a762843814cf4b1c9c43 u ubuntu:18.04  Ready / Running age: 10h21m8s; restart 1 [10.244.0.40 ] /bin/bash u-69bf7ff58d-99dtx u default   {   false}}
DEBU[0006] POST to https://x.x.x.x.x:6443/api/v1/namespaces/default/pods/u-69bf7ff58d-99dtx/exec?command=%2Fbin%2Fbash+-l&container=u&stdin=true&stdout=true&tty=true
DEBU[0006] return enj
DEBU[0006] resize terminal to: 237x53
[GIN] 2019/04/21 - 14:13:41 | 200 |      92.426µs | x.x.x.x.x | GET      /favicon.png
ERRO[0006] exec error: [command terminated with exit code 126]
DEBU[0006] exec done
INFO[0006] Connection closed by backend closed: x.x.x.x.x:29913, connections: 0
[GIN] 2019/04/21 - 14:13:41 | 200 |  147.670107ms | x.x.x.x.x | GET      /exec/1e49a89511a2/ws
E0421 14:13:41.938928      30 v2.go:105] io: read/write on closed pipe

from container-web-tty.

wrfly avatar wrfly commented on May 29, 2024

好,我明天debug一下

from container-web-tty.

wrfly avatar wrfly commented on May 29, 2024

Hi, try this wrfly/container-web-tty:develop

from container-web-tty.

vsxen avatar vsxen commented on May 29, 2024

It's ok.
exec 和 log 的UI还有些问题,
建议加上ns 选择

from container-web-tty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.