Skip to content

Commit 94dff83

Browse files
starbopsatoy3731jillian-maroket
committed
doc(upgrade): add known issue for v1.4.2 to v1.5.0 upgrade path
The container images needed for the upgrade log infra are not included in the shipped ISO image so it's impossible for air-gapped clusters to conduct the upgrade. Providing several workarounds to make the upgrade proceed. Signed-off-by: Zespre Chang <[email protected]> Co-authored-by: Adam Toy <[email protected]> Co-authored-by: Jillian Maroket <[email protected]>
1 parent 38303eb commit 94dff83

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed

docs/upgrade/v1-4-2-to-v1-5-0.md

+84
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,87 @@ The correct status is displayed after the upgrade to v1.5.0 is completed.
4545

4646
Related issues:
4747
- [[BUG] Harvester cluster status keep in NotReady on the second joined node from iso installation](https://github.com/harvester/harvester/issues/7963)
48+
49+
### 2. Air-gapped upgrade stuck with `ImagePullBackOff` error in Fluentd and Fluent Bit pods
50+
51+
The upgrade may become stuck at the very beginning of the process, as indicated by 0% progress and items marked **Pending** in the **Upgrade** dialog of the Harvester UI.
52+
53+
![](/img/v1.5/upgrade/upgrade-dialog-with-empty-status.png)
54+
55+
Specifically, Fluentd and Fluent Bit pods may become stuck in the `ImagePullBackOff` status. To check the status of the pods, run the following commands:
56+
57+
```bash
58+
$ kubectl -n harvester-system get upgrades -l harvesterhci.io/latestUpgrade=true
59+
NAME AGE
60+
hvst-upgrade-x2hz8 7m14s
61+
62+
$ kubectl -n harvester-system get upgradelogs -l harvesterhci.io/upgrade=hvst-upgrade-x2hz8
63+
NAME UPGRADE
64+
hvst-upgrade-x2hz8-upgradelog hvst-upgrade-x2hz8
65+
66+
$ kubectl -n harvester-system get pods -l harvesterhci.io/upgradeLog=hvst-upgrade-x2hz8-upgradelog
67+
NAME READY STATUS RESTARTS AGE
68+
hvst-upgrade-x2hz8-upgradelog-downloader-6cdb864dd9-6bw98 1/1 Running 0 7m7s
69+
hvst-upgrade-x2hz8-upgradelog-infra-fluentbit-2nq7q 0/1 ImagePullBackOff 0 7m42s
70+
hvst-upgrade-x2hz8-upgradelog-infra-fluentbit-697wf 0/1 ImagePullBackOff 0 7m42s
71+
hvst-upgrade-x2hz8-upgradelog-infra-fluentbit-kd8kl 0/1 ImagePullBackOff 0 7m42s
72+
hvst-upgrade-x2hz8-upgradelog-infra-fluentd-0 0/2 ImagePullBackOff 0 7m42s
73+
```
74+
75+
This occurs because the following container images are neither preloaded in the cluster nodes nor pulled from the internet:
76+
77+
- `ghcr.io/kube-logging/fluentd:v1.15-ruby3`
78+
- `ghcr.io/kube-logging/config-reloader:v0.0.5`
79+
- `fluent/fluent-bit:2.1.8`
80+
81+
To fix the issue, perform any of the following actions:
82+
83+
- Update the Logging CR to use the images that are already preloaded in the cluster nodes. To do this, run the following commands against the cluster:
84+
85+
```bash
86+
# Get the Logging CR names
87+
OPERATOR_LOGGING_NAME=$(kubectl get logging -l app.kubernetes.io/name=rancher-logging -o jsonpath="{.items[0].metadata.name}")
88+
INFRA_LOGGING_NAME=$(kubectl get logging -l harvesterhci.io/upgradeLogComponent=infra -o jsonpath="{.items[0].metadata.name}")
89+
90+
# Gather image info from operator's Logging CR
91+
FLUENTD_IMAGE_REPO=$(kubectl get logging $OPERATOR_LOGGING_NAME -o jsonpath="{.spec.fluentd.image.repository}")
92+
FLUENTD_IMAGE_TAG=$(kubectl get logging $OPERATOR_LOGGING_NAME -o jsonpath="{.spec.fluentd.image.tag}")
93+
94+
FLUENTBIT_IMAGE_REPO=$(kubectl get logging $OPERATOR_LOGGING_NAME -o jsonpath="{.spec.fluentbit.image.repository}")
95+
FLUENTBIT_IMAGE_TAG=$(kubectl get logging $OPERATOR_LOGGING_NAME -o jsonpath="{.spec.fluentbit.image.tag}")
96+
97+
CONFIG_RELOADER_IMAGE_REPO=$(kubectl get logging $OPERATOR_LOGGING_NAME -o jsonpath="{.spec.fluentd.configReloaderImage.repository}")
98+
CONFIG_RELOADER_IMAGE_TAG=$(kubectl get logging $OPERATOR_LOGGING_NAME -o jsonpath="{.spec.fluentd.configReloaderImage.tag}")
99+
100+
# Patch the Logging CR
101+
kubectl patch logging $INFRA_LOGGING_NAME --type=json -p="[{\"op\":\"replace\",\"path\":\"/spec/fluentbit/image\",\"value\":{\"repository\":\"$FLUENTBIT_IMAGE_REPO\",\"tag\":\"$FLUENTBIT_IMAGE_TAG\"}}]"
102+
kubectl patch logging $INFRA_LOGGING_NAME --type=json -p="[{\"op\":\"replace\",\"path\":\"/spec/fluentd/image\",\"value\":{\"repository\":\"$FLUENTD_IMAGE_REPO\",\"tag\":\"$FLUENTD_IMAGE_TAG\"}}]"
103+
kubectl patch logging $INFRA_LOGGING_NAME --type=json -p="[{\"op\":\"replace\",\"path\":\"/spec/fluentd/configReloaderImage\",\"value\":{\"repository\":\"$CONFIG_RELOADER_IMAGE_REPO\",\"tag\":\"$CONFIG_RELOADER_IMAGE_TAG\"}}]"
104+
```
105+
106+
The status of the Fluentd and Fluent Bit pods should change to `Running` and the upgrade process should continue after the Logging CR is updated.
107+
108+
- On a computer with internet access, pull the required container images and then export them to a TAR file. Next, transfer the TAR file to the cluster nodes and then import the images by running the following comands on each node:
109+
110+
```bash
111+
# Pull down the three container images
112+
docker pull ghcr.io/kube-logging/fluentd:v1.15-ruby3
113+
docker pull ghcr.io/kube-logging/config-reloader:v0.0.5
114+
docker pull fluent/fluent-bit:2.1.8
115+
116+
# Export the images to a tar file
117+
docker save \
118+
ghcr.io/kube-logging/fluentd:v1.15-ruby3 \
119+
ghcr.io/kube-logging/config-reloader:v0.0.5 \
120+
fluent/fluent-bit:2.1.8 > upgradelog-images.tar
121+
122+
# After transferring the tar file to the cluster nodes, import the images (need to be run on each node)
123+
ctr -n k8s.io images import upgradelog-images.tar
124+
```
125+
126+
The upgrade process should continue after the images are preloaded.
127+
128+
- (Not recommended) Restart the upgrade process with logging disabled. Ensure that the **Enable Logging** checkbox in the **Upgrade** dialog is not selected.
129+
130+
Related issues:
131+
- [[BUG] AirGap Upgrades Seem Blocked with Fluentbit/FluentD](https://github.com/harvester/harvester/issues/7955)
Loading

0 commit comments

Comments
 (0)