mirror of https://github.com/milvus-io/milvus.git
Add an option to automatically cleanup after successful meta migration (#19928)
Signed-off-by: Edward Zeng <jie.zeng@zilliz.com> Signed-off-by: Edward Zeng <jie.zeng@zilliz.com>pull/19979/head
parent
0095869d5b
commit
cfdcf77277
|
@ -10,15 +10,16 @@ Milvus 2.2 has changed the meta structure for segment index. If you have install
|
|||
|
||||
## Parameter Description
|
||||
|
||||
| Parameters | Description | Default | Required |
|
||||
| ---------- | ------------------------------------------------- | ---------------------------- | ----------------------- |
|
||||
| i | Specify the milvus instance name | None | true |
|
||||
| n | Specify the namespace that milvus is installed in | default | false |
|
||||
| s | Specify the milvus source version | None | true |
|
||||
| t | Specify the milvus target version | None | true |
|
||||
| r | Specify the milvus meta root path | by-dev | false |
|
||||
| w | Specify the milvus new image tag | milvusdb/milvus:v2.2.0 | false |
|
||||
| o | Specify the meta migration operation | migrate | false |
|
||||
| Parameters | Description | Default | Required |
|
||||
| ---------- | ---------------------------------------------------------------- | ---------------------------- | ----------------------- |
|
||||
| i | Specify the milvus instance name | None | true |
|
||||
| n | Specify the namespace that milvus is installed in | default | false |
|
||||
| s | Specify the milvus source version | None | true |
|
||||
| t | Specify the milvus target version | None | true |
|
||||
| r | Specify the milvus meta root path | by-dev | false |
|
||||
| w | Specify the milvus new image tag | milvusdb/milvus:v2.2.0 | false |
|
||||
| o | Specify the meta migration operation | migrate | false |
|
||||
| d | Whether delete migration pod after successful migration | false | false |
|
||||
> By default, the script only migrate from v2.1.x to v2.2.x. If there is anything wrong, you'd first rollback to the older version using the `rollback` operation.
|
||||
|
||||
## Migrate Procedures
|
||||
|
@ -58,7 +59,13 @@ The migration will take four steps:
|
|||
./migrate.sh -i my-release -n milvus -s 2.1.1 -t 2.2.0 -r by-dev -w milvusdb/milvus:master-20221016-15878781
|
||||
```
|
||||
|
||||
5. If the migrate is failed, you'd first rollback migration and rerun migrate again.
|
||||
5. If you want to automatically remove the migration pod after successful migration, plese specify `-d true`.
|
||||
|
||||
```shell
|
||||
./migrate.sh -i my-release -n milvus -s 2.1.1 -t 2.2.0 -w milvusdb/milvus:master-20221016-15878781 -d true
|
||||
```
|
||||
|
||||
6. If the migrate is failed, you'd first rollback migration and rerun migrate again.
|
||||
|
||||
```
|
||||
./migrate.sh -i my-release -n milvus -s 2.1.1 -t 2.2.0 -r by-dev -o rollback -w <milvus-2-1-1-image>
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace="default"
|
|||
root_path="by-dev"
|
||||
operation="migrate"
|
||||
image_tag="milvusdb/milvus:v2.2.0"
|
||||
remove_migrate_pod_after_migrate="false"
|
||||
|
||||
#-n namespace: The namespace that Milvus is installed in.
|
||||
#-i milvus_instance: The name of milvus instance.
|
||||
|
@ -22,6 +23,7 @@ do
|
|||
r) root_path=$OPTARG;;
|
||||
w) image_tag=$OPTARG;;
|
||||
o) operation=$OPTARG;;
|
||||
d) remove_migrate_pod_after_migrate=$OPTARG;;
|
||||
*) echo "Unkonwen parameters";;
|
||||
esac
|
||||
done
|
||||
|
@ -415,6 +417,11 @@ else
|
|||
echo
|
||||
echo "Upgrading is done. Waiting for milvus components to be ready again..."
|
||||
wait_for_milvus_ready
|
||||
if [ "$remove_migrate_pod_after_migrate" == "true" ]; then
|
||||
kubectl delete pods -n $namespace "milvus-meta-migration-backup-${instance_name}" "milvus-meta-migration-${instance_name}"
|
||||
kubectl delete pvc -n $namespace "milvus-meta-migration-backup-${instance_name}"
|
||||
kubectl delete configmap -n $namespace "milvus-meta-migration-config-${instance_name}"
|
||||
fi
|
||||
echo "All milvus components are running. Enjoy your vector search..."
|
||||
;;
|
||||
rollback)
|
||||
|
|
Loading…
Reference in New Issue