gpt4 book ai didi

azure - Kubernetes 集群在 Azure 存储帐户中的文件中有 oplock (samba)

转载 作者:行者123 更新时间:2023-12-02 03:35:39 26 4
gpt4 key购买 nike

我正在运行 bradbeck/nexus-https在 Azure 容器服务中使用 kubernetes 的容器,并针对 Azure 存储帐户文件共享挂载 /nexus-data 卷。在 k8s-agents 上,我安装了 cifs-utils 来访问文件共享。

当 Pod 退出时,也许不是优雅地(?),Samba 客户端将 pendingdelete 标志放在 /nexus-data/cache/cache.lock 上,并具有没有发布。

当我尝试启动一个安装相同文件共享的新 Pod 时,它失败并显示:

File does not exist: /nexus-data/cache/cache.lock

当我尝试通过 Azure 门户删除它时,失败并显示:

Failed to delete file 'nexus-data/cache/cache.lock'. Error: The specified resource is marked for deletion by an SMB client.

这是一个409 error .

如何打破此锁定/删除此文件?

<小时/>

编辑:我尝试重新启动 k8s-agents,但即使这样也不起作用!幸运的是,我可以删除整个文件共享,然后重新创建它。将来可能不会有这样的选项:az storage share delete --name nexus-data

最佳答案

据我所知,这与 Nexus 本身无关。我在使用 TeamCity 服务器时也经历过同样的事情。

发生的情况是,当容器终止时,主机上的 samba 文件共享不会卸载。我还没有弄清楚如何确定 /etc/mtab 中的哪个条目属于死容器的数据卷。现在我正在重新启动主机,这会卸载文件系统并允许完成删除指令。

关于azure - Kubernetes 集群在 Azure 存储帐户中的文件中有 oplock (samba),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41881273/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com