Skip to content

Commit a1cdb93

Browse files
committed
Take into account multiple ways of redis persistance when deleting the existing data before the import.
There might be ui pods that have failed. Ensure that only running one are used.
1 parent 65df1db commit a1cdb93

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/self-hosted/kubernetes-migration-guide.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,9 @@ After each scale command, use `kubectl get pods` again to verify that the redis
144144
```
145145
export PV_NAME=$(kubectl get pvc redis-data-redis-0 -ojsonpath='{.spec.volumeName}')
146146
kubectl scale statefulset -n default redis --replicas 0
147-
rm /var/openebs/local/$PV_NAME/appendonly.aof
148-
cp packagist_redis.rdb /var/openebs/local/$PV_NAME/dump.rdb
147+
sudo rm -f /var/openebs/local/$PV_NAME/appendonly.aof
148+
sudo rm -rf /var/openebs/local/$PV_NAME/appendonlydir
149+
sudo cp packagist_redis.rdb /var/openebs/local/$PV_NAME/dump.rdb
149150
kubectl scale statefulset redis --replicas 1
150151
```
151152

@@ -162,7 +163,7 @@ Please note that depending on the size of the `packagist_storage.tar.gz` file an
162163
it can take several minutes for this command to finish.
163164

164165
```
165-
export UI_POD=$(kubectl get pods --no-headers -o custom-columns=":metadata.name"|grep ui-)
166+
export UI_POD=$(kubectl get pods --field-selector=status.phase=Running --no-headers -o custom-columns=":metadata.name"|grep ui-)
166167
kubectl cp packagist_storage.tar.gz $UI_POD:/tmp/packagist_storage.tar.gz -c ui
167168
kubectl exec $UI_POD -c ui -- /bin/sh -c "/srv/manager/bin/console packagist:self-hosted:migrate-storage import /tmp/packagist_storage.tar.gz && rm /tmp/packagist_storage.tar"
168169
```

0 commit comments

Comments
 (0)