# Upgrade to Everest 1.8.0 fails with context canceled due to hanging pre-upgrade hook

**URL:** <https://forums.percona.com/t/upgrade-to-everest-1-8-0-fails-with-context-canceled-due-to-hanging-pre-upgrade-hook/39026>\
**Category:** Percona Everest\
**Created:** [August 8, 2025, 8:27am UTC](https://forums.percona.com/t/upgrade-to-everest-1-8-0-fails-with-context-canceled-due-to-hanging-pre-upgrade-hook/39026 "2025-08-08T08:27:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pstekunov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/pstekunov/32/20328_2.png) [@pstekunov](https://forums.percona.com/u/pstekunov)\
**Post date:** [August 8, 2025, 8:27am UTC](https://forums.percona.com/t/upgrade-to-everest-1-8-0-fails-with-context-canceled-due-to-hanging-pre-upgrade-hook/39026/1 "2025-08-08T08:27:02Z")

</div>

Sure! Here’s the bug report text translated into clear and professional English:

* * *

**Title:** Upgrade to Everest 1.8.0 fails with `context canceled` due to hanging pre-upgrade hook

* * *

### 📌 Problem Description

Attempting to upgrade the `everest-core` release to version **1.8.0** fails with the following issues:

- Helm upgrade fails with:

- The `everest-helm-pre-upgrade-hook-<suffix>` Job remains in the `active` state and never completes.

- The job logs contain an authentication error when trying to interact with the Kubernetes API:

* * *

### 🔁 Steps to Reproduce

1. Run the upgrade command:

2. Helm attempts to run the `pre-upgrade` hook job.

3. The job remains active and never completes, eventually resulting in:

* * *

### 🔍 Details

- The pre-upgrade hook job is created but does not finish.

- Job logs:

* * *

### 🛠 Environment

- **Chart:** `percona/everest` v1.8.0

- **Kubernetes:** v1.30.2 (OIDC + RBAC enabled)

- **Helm:** v3.x

- **Namespace:** `everest-system`

* * *

### 💡 Root Cause Hypothesis

The hook job is likely trying to query the Kubernetes API or the Everest API, but fails due to:

- Missing or misconfigured `ServiceAccount` or insufficient RBAC permissions.

- Cluster requires external authentication (e.g., OIDC), and the in-cluster job does not have access to proper credentials.

* * *

### ✅ Expected Behavior

The pre-upgrade hook should either:

- Complete successfully if permissions are sufficient, **or**

- Fail clearly with a descriptive error — not hang indefinitely.

The Helm upgrade should not fail with a timeout and “context canceled” if version discovery fails.

* * *

### 📣 Recommendations

- Improve error handling in the pre-upgrade hook.

- Document required permissions and service account roles for upgrade hooks.

- Add fallback behavior when version check fails due to auth issues.

* * *

Let me know if you want this in Markdown format or ready for GitHub/Percona submission.

---

<div class="post-metadata">

**Author:** ![pstekunov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/pstekunov/32/20328_2.png) [@pstekunov](https://forums.percona.com/u/pstekunov)\
**Post date:** [August 8, 2025, 8:37am UTC](https://forums.percona.com/t/upgrade-to-everest-1-8-0-fails-with-context-canceled-due-to-hanging-pre-upgrade-hook/39026/2 "2025-08-08T08:37:56Z")

</div>

I added permissions for service acount:

apiVersion: [rbac.authorization.k8s.io/v1](http://rbac.authorization.k8s.io/v1)  
kind: ClusterRoleBinding  
metadata:  
name: everest-helm-pre-upgrade-hook-binding  
labels:  
[app.kubernetes.io/component:](http://app.kubernetes.io/component:) upgrade-hook  
[app.kubernetes.io/name:](http://app.kubernetes.io/name:) everest  
subjects:

- kind: ServiceAccount  
name: everest-helm-pre-upgrade-hook  
namespace: everest-system  
roleRef:  
kind: ClusterRole  
name: everest-pre-upgrade-hook-role  
apiGroup: [rbac.authorization.k8s.io](http://rbac.authorization.k8s.io)

apiVersion: [rbac.authorization.k8s.io/v1](http://rbac.authorization.k8s.io/v1)  
kind: ClusterRole  
metadata:  
name: everest-pre-upgrade-hook-role  
rules:

- apiGroups: [“”]  
resources: [“pods”, “services”, “namespaces”]  
verbs: [“get”, “list”]
- apiGroups: [“[apiextensions.k8s.io](http://apiextensions.k8s.io)”]  
resources: [“customresourcedefinitions”]  
verbs: [“get”, “list”]
- apiGroups: [“apps”]  
resources: [“deployments”]  
verbs: [“get”, “list”]
- apiGroups: [“”]  
resources: [“nodes”]  
verbs: [“get”, “list”]
- nonResourceURLs: [“/version”, “/healthz”, “/apis”, “/api”]  
verbs: [“get”]

but stuck with next issue:

Checking requirements for upgrade to version 1.8.0

❌ an empty namespace may not be set when a resource name is provided

could not retrieve subscriptio

---

<div class="post-metadata">

**Author:** ![pstekunov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/pstekunov/32/20328_2.png) [@pstekunov](https://forums.percona.com/u/pstekunov)\
**Post date:** [August 8, 2025, 8:41am UTC](https://forums.percona.com/t/upgrade-to-everest-1-8-0-fails-with-context-canceled-due-to-hanging-pre-upgrade-hook/39026/3 "2025-08-08T08:41:39Z")

</div>

> The same with everestctl:
> 
> $ everestctl upgrade --in-cluster --dry-run --version-metadata-url=[https://check.percona.com](https://check.percona.com)  
> ❌ an empty namespace may not be set when a resource name is provided  
> could not retrieve subscription

---

<div class="post-metadata">

**Author:** ![Diogo\_Recharte](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/diogo_recharte/32/8004_2.png) [@Diogo\_Recharte](https://forums.percona.com/u/Diogo_Recharte)\
**Post date:** [August 8, 2025, 4:09pm UTC](https://forums.percona.com/t/upgrade-to-everest-1-8-0-fails-with-context-canceled-due-to-hanging-pre-upgrade-hook/39026/4 "2025-08-08T16:09:13Z")

</div>

For anyone still interested in this, @pstekunov got his answer on github: [everest 1.8.0 upgrade error · Issue #1568 · percona/everest · GitHub](https://github.com/percona/everest/issues/1568)

The workaround is to remove the `app.kubernetes.io/managed-by=everest` label from the `everest-system` namespace:

```auto
kubectl label namespace everest-system app.kubernetes.io/managed-by-

```
