解决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
目录
相关文章
成功解决ProxyError: Conda cannot proceed due to an error in your proxy configuration.Check for typos an
成功解决ProxyError: Conda cannot proceed due to an error in your proxy configuration.Check for typos an
成功解决ProxyError: Conda cannot proceed due to an error in your proxy configuration.Check for typos an
|
5月前
|
Ubuntu Docker 容器
sudo apt-get update失败已经解决 报错 The update command takes no arguments
sudo apt-get update失败已经解决 报错 The update command takes no arguments
161 0
|
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? 错误
791 0
|
Android开发
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
390 0
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
|
关系型数据库 MySQL
You can remove cached packages by executing ‘yum clean packages‘. Error: GPG check FAILED
我们在使用服务器时安装mysql遇到的问题,现将有效的解决方案列出来 原因是:GPG对于包的源key的验证没有通过
You can remove cached packages by executing ‘yum clean packages‘. Error: GPG check FAILED
The application could not be installed: INSTALL_FAILED_INSUFFICIENT_STORAGE
The application could not be installed: INSTALL_FAILED_INSUFFICIENT_STORAGE
507 0
The application could not be installed: INSTALL_FAILED_INSUFFICIENT_STORAGE
|
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.
1253 0
下一篇
无影云桌面