解决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
目录
相关文章
|
3月前
|
缓存 Linux 开发工具
【各种问题处理】Error: Failed to download metadata for repo ‘appstream‘
【1月更文挑战第13天】【各种问题处理】Error: Failed to download metadata for repo ‘appstream‘
|
缓存 Linux 开发工具
【已解决】Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
【已解决】Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
11065 1
【已解决】Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
|
Python
pip安装第三方库报错WARNING: Retrying (Retry(total=4,connect=None, read=Noneredirect=None,status=None))解决
pip安装第三方库报错WARNING: Retrying (Retry(total=4,connect=None, read=Noneredirect=None,status=None))解决
1116 0
pip安装第三方库报错WARNING: Retrying (Retry(total=4,connect=None, read=Noneredirect=None,status=None))解决
|
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? 错误
643 0
|
Android开发
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
347 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
|
Android开发
Installation error: INSTALL_FAILED_CONFLICTING_PROVIDER 解决方案
Installation error: INSTALL_FAILED_CONFLICTING_PROVIDER 解决方案

热门文章

最新文章