Closed joalmjoalm closed 4 years ago
Hi, thanks for your question!
a) which are the system requirements for each version?
The current version is well tested on Kubernetes v1.17
but should also work on older ones except one thing:
In the last release csi-plugin was moved to lisntor
namespace, but according https://github.com/kubernetes/kubernetes/issues/60596 the pods with system-cluster-critical priorityClass can work outside kube-system only since v1.17
Of course you can unspecify the priorityClass
, but better to upgrade your Kubernetes cluster :)
b) how do I upgrade without loosing the current data/lvm configuration?
First and foremost make a backup, having backup will allow you to rollback the changes and try again, if something will gonna wrong.
If you're using stolon as back-end for your LINSTOR installation you can easily perform the backup of your database:
kubectl exec -ti -n linstor linstor-db-stolon-keeper-0 -- \
sh -c 'PGPASSWORD=$(cat $STKEEPER_PG_SU_PASSWORDFILE) pg_dump -h linstor-db-stolon-proxy -U stolon linstor' \
> linstor-backup.sql
It always recommended to perform the backup before each LINSTOR upgrade.
If you were using helm template
to perform the installation as described in README.md for v1.1.2, I would suggest you switch to Helmv3, however helm template method should also work fine, we're using it with qbec.
Anyway you can perform upgrade by simple replacing resources in your Kubernetes cluster thus
Example plan: Upgrade stolon:
stolon-cluster-linstor-db-stolon
configmap), should remain in the cluster even after you remove mentioned statefulsets for them.Install new resources with the same names, they should start using old PVCs and linstor-db-stolon
configmap to reload cluster state
Upgrade LINSTOR:
Offline
state, that's because latest version enables mutual ssl authentification for the linstor-satellites. You can easily fix that by executing:
linstor n l | awk '/(PLAIN)/ { print "linstor n i m -p 3367 --communication-type SSL " $2 " default" }' | sh -ex
c) any release notes?
Since your version the these two major features were implemented:
kube-system
to linstor
namespace.I'll keep this issue open, for any feedback and until creating new documentation where these steps will be recorded.
Im running Kubernetes 1.17.4 and have deleted all linstor and stolon resources except ConfigMaps and Persistent Volumes. But I get this error when running install, sudo helm install linstor-db stable/stolon --namespace linstor -f examples/linstor-db.yaml Error: rendered manifests contain a resource that already exists. Unable to continue with install: existing resource conflict: namespace: linstor, name: linstor-db-stolon, existing_kind: /v1, Kind=ConfigMap, new_kind: /v1, Kind=ConfigMap
How should I proceed? Is it easier to do a clean install and restore the db-backup?
Sorry I was mistaken, you need to keep stolon-cluster-linstor-db-stolon
configmap (not linstor-db-stolon
). It is generated by stolon itself and keeping the cluster state.
Then you can install stolon with --set job.autoCreateCluster=false
to not override it.
Is it easier to do a clean install and restore the db-backup?
It's up to you, this is also possible.
Latest release is up and running even if it took some time to found all resourses to delete in the prev installation. But I think I wiped my db by forgetting the autocreateflag. How do I restore the db from the backup?
Sorry just noticed your comment, so I think you already found the solution, any way to recover backup just do:
Connect to database:
kubectl exec -ti -n linstor linstor-db-stolon-keeper-0 -- \
sh -c 'PGPASSWORD=$(cat $STKEEPER_PG_SU_PASSWORDFILE) psql -h linstor-db-stolon-proxy -U stolon postgres'
Create user and database for linstor:
CREATE DATABASE linstor;
CREATE USER linstor WITH PASSWORD 'hackme';
GRANT ALL PRIVILEGES ON DATABASE linstor TO linstor;
Then restore backup:
kubectl exec -i -n linstor linstor-db-stolon-keeper-0 -- \
sh -c 'PGPASSWORD=$(cat $STKEEPER_PG_SU_PASSWORDFILE) psql -h linstor-db-stolon-proxy -U stolon -d linstor' \
< linstor-backup.sql
If something has gonna wrong, you always can do:
DROP DATABASE linstor;
CREATE DATABASE linstor;
To cleanup your database and try again
If I'm on v 1.1.2 and want to upgrade to later version, a) which are the system requirements for each version? b) how do I upgrade without loosing the current data/lvm configuration? c) any release notes?