cockroachdb / cockroachdb/cockroach-operator

Failed Upgrade Causes Stale Operator Failure Status

Ouverte
#464 7 commentaires 0 réactions 1 personne assignée Réclamée par @keith-mcclellan Voir sur GitHub
bug
Langage dominant
Go
Étoiles
318
Forks
104
Merge moyen
1 j 6 h
PR mergées (30 j)
1

Description

For the [4/29 Bug bash](https://docs.google.com/spreadsheets/d/1mW7pMPXq9t7Rph9473xj3JmFXwQ769YQIzF668pTIWQ/edit#gid=139881396), I ran the Negative Testing Scenario

**Repro Steps:**
1. Install Operator
2. Using the Operator, install a version of CockroachDB v19.2.x
3. Using the Operator, attempt to upgrade to CockroachDB v20.2.x (expected to fail)
4. Using the Operator, attempt to install a version of CockroachDB v20.1.x (expected to succeed)

**Expected Results:** Step 3 is expected to fail. Step 4 should succeed, and getting status of the cluster via `kubectl describe CrdbCluster cockroachdb` should communicate that the cluster and the Operator are in a healthy status on v20.1.x.

**Actual Results:**
After installing v20.1.x in step 4, the kubectl describe status communicates:
- Cluster is in a failed state
- a stale message of a failed upgrade from step 3

**kubectl describe CrdbCluster cockroachdb:**
```
Status:
Cluster Status: Failed
Conditions:
Last Transition Time: 2021-04-29T14:15:48Z
Status: True
Type: Initialized
Last Transition Time: 2021-04-29T14:32:02Z
Status: True
Type: CrdbVersionChecked
Last Transition Time: 2021-04-29T14:14:57Z
Status: True
Type: CertificateGenerated
Crdbcontainerimage: cockroachdb/cockroach:v20.2.7
Operator Actions:
Last Transition Time: 2021-04-29T14:15:48Z
Message:
Status: Finished
Type: Initialize
Last Transition Time: 2021-04-29T14:33:46Z
Message: failed to update sts with partitioned update: cockroachdb: upgrading from 20.1.11 to 20.2.7 with preserve downgrade option set to 19.2.0 not allowed: can't roll forward due to preserve downgrade option
Status: Failed
Type: PartialUpdate
Version: v20.2.7
Events:
```

**Additional context:**
- On Macbook
- operator version: `image: cockroachdb/cockroach-operator:v1.7.5`

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.