You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/repo-guides/release-nnf-sw/crd-upgrade-helpers.md
+79Lines changed: 79 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,85 @@ Together, these services implement [Upgrade existing objects to a new stored ver
8
8
9
9
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.
10
10
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:
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.
0 commit comments