Velero备份:恢复Statefulset(例如,沙发床)会导致“卷的多次连接错误”

我正在使用velero在kubernetes上备份ouchbase。备份工作正常,甚至可以存储名称空间和PV,PVC。但是,由于似乎是一种竞争状况,导致在创建之后两个PV都尝试创建并尝试安装到沙发基吊舱,其中一个PV放在错误的kubernetes上,因此在恢复后,该ouchbase节点无法启动。节点。

还原和恢复非Statefulset应用程序是成功的,但是对于Statefulset,仅备份,还原而不是恢复成功,请执行以下步骤:

  1. 备份仅包含一个运行1个副本的单个statefulset(couchbase)的命名空间。
  2. 完全删除名称空间。
  3. 从名称空间的备份中还原

结果:

  • 单个吊舱仍保留在ContainerCreating中
  • 已创建与吊舱关联的两个PV
  • 在“丢失”状态下创建了一个PVC
  • 在事件日志中看到以下错误:
23m         Warning   FailedAttachVolume       pod/couchbase-0                             Multi-Attach error for volume "pvc-1b9860c6-0208-11ea-b826-5a269cbf3473" Volume is already exclusively attached to one node and can't be attached to another
14m         Warning   Failedmount              pod/couchbase-0                             Unable to mount volumes for pod "couchbase-0_lolcorp-uat-az1-test-cbdeploy(f7092210-0231-11ea-b826-5a269cbf3473)": timeout expired waiting for volumes to attach or mount for pod "lolcorp-uat-az1-test-cbdeploy"/"couchbase-0". list of unmounted volumes=[datadir]. list of unattached volumes=[datadir default-token-xdl76]

我的问题是:

  • 为避免这种情况,配置状态化状态集(特别是沙发基)还原的正确方法是什么?

理想情况下,这应该发生:

  • PVC,PV和pod将与名称空间一起恢复
  • 单个PV将成功安装
  • 只有一项声明与PV和广告连播相关
  • statefuleset容器将转换为“正在运行”

设置细节:

  • Velero版本(使用velero version):
0.1.1
  • Velero功能(使用velero client config get features):
features: <NOT SET>
  • Kubernetes版本(使用kubectl version):
Client Version: version.Info{Major:"1",Minor:"14",GitVersion:"v1.14.3",GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0",GitTreeState:"clean",BuildDate:"2019-06-06T01:44:30Z",GoVersion:"go1.12.5",Compiler:"gc",Platform:"linux/amd64"}
Server Version: version.Info{Major:"1",GitVersion:"v1.14.8",GitCommit:"211047e9a1922595eaa3a1127ed365e9299a6c23",BuildDate:"2019-10-15T12:02:12Z",GoVersion:"go1.12.10",Platform:"linux/amd64"
  • Kubernetes安装程序和版本:

Azure Kubernetes:AKS

  • 云提供商或硬件配置:

天蓝色

  • 操作系统(例如来自/etc/os-release的操作系统)

Ubuntu 18。

wowmm 回答:Velero备份:恢复Statefulset(例如,沙发床)会导致“卷的多次连接错误”

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3130455.html

大家都在问