Describe the bug
If OpenCloud 4.0.x was connected to opensearch, and has created an opencloud-resource index, updating to 6.1.0 fails while starting the OpenCloud. The search service throws an error and OpenCloud is not started properly.
Steps to reproduce
- Install current stable OpenCloud 4.0.x (e.g. via the
helmfile deployment with included opensearch cluster deployment
- Change deployment to use rolling 6.1.0
- Restart OpenCloud pods/service
Expected behavior
- Either a new index is created (and the old one gets deleted)
- Or a throwing an error message telling the administrator what to do or what exactly needs to be done manually
Actual behavior
- While starting the search service, it gets logged:
opencloud: Failed service 'search' (1.000000 failures of 5.000000), restarting: true, error: failed to create OpenSearch backend: failed to apply index template: index opencloud-resource allready exists and is different from the requested version, manual action required: mappings.properties.Content
mappings.properties.Favorites
-
After the fifth error the pod gets destroyed and restarted, or, depending on the deployment, the process gets restarted
-
deleting the opencloud-resource index manually via
$ curl -X DELETE localhost:9200/opencloud-resource
(on an opensearch pod or against the cluster URL) partially fixes the problem. The pod/service is starting again.
- Unfortunately the search doesn't return any results.
- Trying to re-index, doesn't work either:
$ kubectl -n opencloud exec opencloud-api-6f687b6cf-4485z -- opencloud search index --all-spaces
Defaulted container "api" out of: api, fetch-password-list (init)
failed to index space: {"id":"go.micro.client","code":500,"detail":"service eu.opencloud.api.search: not found","status":"Internal Server Error"}
Error: {"id":"go.micro.client","code":500,"detail":"service eu.opencloud.api.search: not found","status":"Internal Server Error"}
Usage:
opencloud search index [flags]
Aliases:
index, i
Flags:
--all-spaces index all spaces instead. This or --space is required.
--force-rescan force a rescan of all files, even if they are already indexed. This will make the indexing process much slower, but ensures that the index is up-to-date using the current search service configuration.
-h, --help help for index
-s, --space string the id of the space to travers and index the files of. This or --all-spaces is required.
{"id":"go.micro.client","code":500,"detail":"service eu.opencloud.api.search: not found","status":"Internal Server Error"}
command terminated with exit code 1
Describe the bug
If OpenCloud 4.0.x was connected to opensearch, and has created an
opencloud-resourceindex, updating to 6.1.0 fails while starting the OpenCloud. The search service throws an error and OpenCloud is not started properly.Steps to reproduce
helmfiledeployment with included opensearch cluster deploymentExpected behavior
Actual behavior
After the fifth error the pod gets destroyed and restarted, or, depending on the deployment, the process gets restarted
deleting the
opencloud-resourceindex manually via(on an opensearch pod or against the cluster URL) partially fixes the problem. The pod/service is starting again.