Skip to content

Commit e059d9a

Browse files
authored
Merge release v0.1.17
Release v0.1.17
2 parents 778bb56 + dbe57ff commit e059d9a

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

docs/repo-guides/release-nnf-sw/crd-upgrade-helpers.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,85 @@ Together, these services implement [Upgrade existing objects to a new stored ver
88

99
The ArgoCD `Application` bootstraps for the two services can be found in the [argocd-boilerplate](https://github.com/NearNodeFlash/argocd-boilerplate) repository under `environments/example-env/0-bootstrap1/`. NNF release manifests include the manifests for these services.
1010

11+
## Debugging
12+
13+
Monitor the progress of `kube-storage-version-migrator` or `nnf-storedversions-maint` by watching their logs and by watching changes to a specific CRD.
14+
15+
For example, we may want to check the status of the `NnfStorageProfile` CRD after an upgrade that has added a new API version named "v1alpha7".
16+
17+
Begin by finding the full name of the CRD:
18+
19+
```console
20+
kubectl get crds -o custom-columns=NAME:.metadata.name | grep nnfstorageprofile
21+
```
22+
23+
That will return a name of "nnfstorageprofiles.nnf.cray.hpe.com". Next, query the `status.storedVersions` list on that CRD:
24+
25+
```console
26+
kubectl get crds nnfstorageprofiles.nnf.cray.hpe.com -o json | jq -rM '.status.storedVersions'
27+
```
28+
29+
That might return a list of API versions:
30+
31+
```console
32+
[
33+
"v1alpha6",
34+
"v1alpha7"
35+
]
36+
```
37+
38+
This indicates that `kube-storage-version-migrator` has not finished migrating the resources of this type, or that `nnf-storedversions-maint` hasn't caught up.
39+
40+
Check the progress of `kube-storage-version-migrator`. Begin by looking for the `StorageVersionMigration` resource it uses to track this CRD:
41+
42+
```console
43+
kubectl get storageversionmigrations --no-headers -o custom-columns=NAME:.metadata.name | grep nnfstorageprofile
44+
```
45+
46+
In this case it might return a name that looks like "nnfstorageprofiles.nnf.cray.hpe.com-mcsnm". Note the auto-generated suffix. The migrator replaces this resource any time it works on the CRD, and then it'll get a new suffix.
47+
48+
Dump out the `StorageVersionMigration` resource to see the currrent status:
49+
50+
```console
51+
apiVersion: migration.k8s.io/v1alpha1
52+
kind: StorageVersionMigration
53+
metadata:
54+
creationTimestamp: "2025-04-28T21:12:23Z"
55+
generateName: nnfstorageprofiles.nnf.cray.hpe.com-
56+
generation: 1
57+
name: nnfstorageprofiles.nnf.cray.hpe.com-mcsnm
58+
resourceVersion: "35307472"
59+
uid: ead6c3cf-8554-4400-aeea-e8ea5a59bf40
60+
spec:
61+
resource:
62+
group: nnf.cray.hpe.com
63+
resource: nnfstorageprofiles
64+
version: v1alpha7
65+
status:
66+
conditions:
67+
- lastUpdateTime: "2025-04-28T21:12:26Z"
68+
status: "True"
69+
type: Succeeded
70+
```
71+
72+
That looks like it completed the migration of these resources to the new "v1alpha7" API version. In this case, the "lastUpdateTime" just happens to be a few seconds ago.
73+
74+
The `nnf-storedversions-maint` should have had a chance to respond to this by now, so look at the CRD again:
75+
76+
```console
77+
kubectl get crds nnfstorageprofiles.nnf.cray.hpe.com -o json | jq -rM '.status.storedVersions'
78+
```
79+
80+
The list contains only the "v1alpha7" API:
81+
82+
```console
83+
[
84+
"v1alpha7"
85+
]
86+
```
87+
88+
These activities can also be followed in the logs of the respective services.
89+
1190
## References
1291

1392
### Kubernetes

0 commit comments

Comments
 (0)