解决helm部署报错Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress

简介: 在使用helm install 或者helm upgrade的时候,如果出现了异常中断操作, 经常会出现UPGRADE FAILED并且导致后续无法更新,那我们该如何处理呢?

在使用helm install 或者helm upgrade的时候,如果出现了异常中断操作, 可能会导致如下报错

Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress

那么问题来了,如何解决这个问题呢?

参考github上的issues:https://github.com/helm/helm/issues/8987,我们可以使用以下操作

1.输入helm history 命令检查当前状态, 如下

$ helm history -n lizhewnei lizhewnei-common
REVISION  UPDATED                   STATUS          CHART                   APP VERSION DESCRIPTION
331       Tue Feb 23 23:11:07 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
332       Wed Feb 24 08:11:08 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
333       Wed Feb 24 15:11:13 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
334       Wed Feb 24 23:11:09 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
335       Thu Feb 25 08:11:09 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
336       Thu Feb 25 15:11:08 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
337       Thu Feb 25 23:11:06 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
338       Fri Feb 26 08:11:13 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
339       Fri Feb 26 09:49:37 2021  deployed        lizhewnei-common-0.1.0  1.16.0      Upgrade complete
340       Fri Feb 26 10:37:53 2021  pending-upgrade lizhewnei-common-0.1.0  1.16.0      Preparing upgrade

2.根据上述状态,我们会发现,最近的一次340部署结果是pending-upgrade 所以阻塞了我们的继续部署

3.我们使用helm rollback命令回退一个版本到339版本

$ helm rollback -n lizhewnei lizhewnei-common 339
Rollback was a success! Happy Helming!

4.回退之后,再检查一次当前状态,确认状态信息是回退到339版本

$ helm history -n lizhewnei lizhewnei-common
REVISION  UPDATED                   STATUS          CHART                   APP VERSION DESCRIPTION
332       Wed Feb 24 08:11:08 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
333       Wed Feb 24 15:11:13 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
334       Wed Feb 24 23:11:09 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
335       Thu Feb 25 08:11:09 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
336       Thu Feb 25 15:11:08 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
337       Thu Feb 25 23:11:06 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
338       Fri Feb 26 08:11:13 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
339       Fri Feb 26 09:49:37 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
340       Fri Feb 26 10:37:53 2021  pending-upgrade lizhewnei-common-0.1.0  1.16.0      Preparing upgrade
341       Fri Feb 26 11:00:23 2021  deployed        lizhewnei-common-0.1.0  1.16.0      Rollback to 339

5.这个时候,我们再去使用helm upgrade命令,就可以正常的升级了,升级之后,我们通过helm history 也可以检查到升级成功,

$ helm history -n lizhewnei lizhewnei-common
REVISION  UPDATED                   STATUS          CHART                   APP VERSION DESCRIPTION
333       Wed Feb 24 15:11:13 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
334       Wed Feb 24 23:11:09 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
335       Thu Feb 25 08:11:09 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
336       Thu Feb 25 15:11:08 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
337       Thu Feb 25 23:11:06 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
338       Fri Feb 26 08:11:13 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
339       Fri Feb 26 09:49:37 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Upgrade complete
340       Fri Feb 26 10:37:53 2021  pending-upgrade lizhewnei-common-0.1.0  1.16.0      Preparing upgrade
341       Fri Feb 26 11:00:23 2021  superseded      lizhewnei-common-0.1.0  1.16.0      Rollback to 339
342       Fri Feb 26 11:01:27 2021  deployed        lizhewnei-common-0.1.0  1.16.0      Upgrade complete
目录
相关文章
如何解决 conda install 库时报错:The environment is inconsistent, please check the package plan carefully
如何解决 conda install 库时报错:The environment is inconsistent, please check the package plan carefully
如何解决 conda install 库时报错:The environment is inconsistent, please check the package plan carefully
|
Ubuntu 开发工具 git
apt install git:Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/git/git-man_2.17.1-1ubuntu0.11_all.deb 404 Not Found [IP: 91.189.91.39 80]
365 0
apt install git:Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
如何解决使用npm install 时报错:npm ERR! { Error: EPERM: operation not permitted, mkdir..
如何解决使用npm install 时报错:npm ERR! { Error: EPERM: operation not permitted, mkdir..
如何解决使用npm install 时报错:npm ERR! { Error: EPERM: operation not permitted, mkdir..
|
Ubuntu 网络安全 开发工具
Ubuntu E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? 错误
Ubuntu E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? 错误
967 0
|
Android开发
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
448 0
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
|
Android开发
Installation error: INSTALL_FAILED_CONFLICTING_PROVIDER 解决方案
Installation error: INSTALL_FAILED_CONFLICTING_PROVIDER 解决方案
|
Python
pip/easy_install failure: failed to create process
使用pip install requests安装requests, 报错: failed to create process 解决方法: 执行Python -m pip install --upgrade pip --force-reinstall  1.
1272 0