86 Star 468 Fork 272

GVPopenEuler / iSulad

 / 详情

基于isula的k8s中kubectl cp无法拷贝文件至pod容器

已完成
缺陷
创建于  
2022-08-08 11:31

【标题描述】基于isula的k8s中kubectl cp无法拷贝文件至pod容器
【环境信息】
硬件信息:
1) 基于ARM架构的鲲鹏服务器;
软件信息:
1) isula:2.0.11
2) k8s: v1.20.2
3) cni使用calico:v3.14.2
【问题复现步骤】
安装islua,部署好k8s后,创建pod,使用kubectl cp向pod内拷贝文件,并使用kubectl exec进入容器内目录查看,目录下没有拷贝的文件
【预期结果】
容器内存在拷贝的文件
【实际结果】
容器内没有拷贝的文件
【附件信息】

该问题在项目中发现,较为紧急,需尽快安排人员进行定位修复

评论 (4)

朱勇 创建了缺陷

Hi juong, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: iSulad, and any of the maintainers: @haomintsai , @lifeng_isula , @haozi007 , @jingxiaolu , @JingWoo

openeuler-ci-bot 添加了
 
sig/iSulad
标签

以将文件copy到pod内为例,kubectl cp命令执行过程如下

  1. 通过cri exec接口发送test -d 命令检查容器内的目的目录是否存在
  2. 通过cri exec接口发送tar -xmf - -C 命令在容器内进行解压操作,同时将需要copy的文件压缩为tar包,将tar包的数据流通过websocket接口发送到isulad,写入tar命令的数据流中。
    通过exec到容器内,发现tar命令一直在运行,不会结束退出。通过在isulad中加日志打印,确认isulad已经接收到了tar包的数据流且已经写入tar命令的STDIN。
    根据k8s社区的讨论来看,websockets协议无法标识STDIN输入完成,没有结束标识,从而导致了tar命令仍然在等待输入而无法退出。因此cp命令copy文件失败,且容器内会残留一条tar命令。
    https://github.com/kubernetes/kubernetes/issues/89899
    输入图片说明
    k8s社区推送的支持websocket协议的pr也因此cp这个原因而门禁失败,目前无法合入k8s社区。
    https://github.com/kubernetes/kubernetes/pull/110142
    输入图片说明
    输入图片说明
    目前k8s+isulad无法执行cp命令,后续将持续跟踪社区进度

暂不支持,持续跟踪,加入todo list中,issue关闭

openeuler-ci-bot 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(4)
5329419 openeuler ci bot 1632792936 5595769 duguhaotian 1605235330 1236743 juong 1578947077
C
1
https://gitee.com/openeuler/iSulad.git
git@gitee.com:openeuler/iSulad.git
openeuler
iSulad
iSulad

搜索帮助