Skip to content

Commit dc6ecb6

Browse files
authored
Merge pull request #107 from packagist/make-import-scripts-more-robust
Take into account multiple ways of redis persistence and ensure import is being done on the running UI pod.
2 parents 65df1db + 3cee127 commit dc6ecb6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +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
147+
# Depending on your setup, you might need to run the following three commands as `root`
148+
rm -f /var/openebs/local/$PV_NAME/appendonly.aof
149+
rm -rf /var/openebs/local/$PV_NAME/appendonlydir
148150
cp packagist_redis.rdb /var/openebs/local/$PV_NAME/dump.rdb
149151
kubectl scale statefulset redis --replicas 1
150152
```
@@ -162,7 +164,7 @@ Please note that depending on the size of the `packagist_storage.tar.gz` file an
162164
it can take several minutes for this command to finish.
163165

164166
```
165-
export UI_POD=$(kubectl get pods --no-headers -o custom-columns=":metadata.name"|grep ui-)
167+
export UI_POD=$(kubectl get pods --field-selector=status.phase=Running --no-headers -o custom-columns=":metadata.name"|grep ui-)
166168
kubectl cp packagist_storage.tar.gz $UI_POD:/tmp/packagist_storage.tar.gz -c ui
167169
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"
168170
```

0 commit comments

Comments
 (0)