Skip to content
This repository was archived by the owner on Jun 29, 2022. It is now read-only.

Update rook to v1.4.2#879

Merged
invidian merged 5 commits intomasterfrom
surajssd/update-rook-1.4.1
Aug 31, 2020
Merged

Update rook to v1.4.2#879
invidian merged 5 commits intomasterfrom
surajssd/update-rook-1.4.1

Conversation

@surajssd
Copy link
Member

@surajssd surajssd commented Aug 28, 2020

Change Notes:


Update process:

kubectl apply -f https://raw.githubusercontent.com/kinvolk/lokomotive/master/assets/charts/components/rook/templates/resources.yaml
lokoctl component apply rook rook-ceph

Fixes: #852

@surajssd surajssd force-pushed the surajssd/update-rook-1.4.1 branch from 6950641 to c41e537 Compare August 28, 2020 08:55
@surajssd surajssd marked this pull request as draft August 28, 2020 09:15
invidian
invidian previously approved these changes Aug 28, 2020
Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@invidian invidian added the area/dependency-update To label pending updates of upstream projects label Aug 28, 2020
@surajssd surajssd marked this pull request as ready for review August 28, 2020 14:36
@surajssd
Copy link
Member Author

Ceph Upgrade steps

Steps:

These steps are curated from the upgrade doc provided by rook: https://rook.io/docs/rook/master/ceph-upgrade.html.

  • Keep note of the CSI images:
kubectl --namespace rook get pod -o jsonpath='{range .items[*]}{range .spec.containers[*]}{.image}{"\n"}' -l 'app in (csi-rbdplugin,csi-rbdplugin-provisioner,csi-cephfsplugin,csi-cephfsplugin-provisioner)' | sort | uniq
  • Ensure autoscale is on

Ensure that the output of the command ceph osd pool autoscale-status | grep replicapool says on (in the last column) and not warn in the toolbox pod. If it says warn. Then run the command ceph osd pool set replicapool pg_autoscale_mode on to set it to on. This is just to ensure we are not facing: rook/rook#5608.

Read more about the toolbox pod here: https://github.com/kinvolk/lokomotive/blob/master/docs/how-to-guides/rook-ceph-storage.md#enable-and-access-toolbox.

NOTE: If you see this error [errno 5] RADOS I/O error (error connecting to the cluster) in toolbox pod then tag the toolbox pod image to a specific version like rook/ceph:v1.3.2.

  • Ceph Status

Run the following in the toolbox pod:

watch ceph status

Ensure that the output says that the health is HEALTH_OK. Match the output such that everything looks fine as explained here: https://rook.io/docs/rook/master/ceph-upgrade.html#status-output.

  • Pods in rook namespace:

Watch the pods status in another from the rook namespace in another terminal window. Just running this will be enough:

watch kubectl -n rook get pods
  • Watch for the rook version update

Run the following command to keep an eye on the rook version update as it is rolls down for all the components:

watch --exec kubectl -n rook get deployments -l rook_cluster=rook -o jsonpath='{range .items[*]}{.metadata.name}{"  \treq/upd/avl: "}{.spec.replicas}{"/"}{.status.updatedReplicas}{"/"}{.status.readyReplicas}{"  \trook-version="}{.metadata.labels.rook-version}{"\n"}{end}'
  • Watch for the Ceph version update

Run the following command to keep an eye on the Ceph version update as the new pods come up:

watch --exec kubectl -n rook get deployments -l rook_cluster=rook -o jsonpath='{range .items[*]}{.metadata.name}{"  \treq/upd/avl: "}{.spec.replicas}{"/"}{.status.updatedReplicas}{"/"}{.status.readyReplicas}{"  \tceph-version="}{.metadata.labels.ceph-version}{"\n"}{end}'
  • Keep an eye on the events in the rook namespace
kubectl -n rook get events -w
  • Ceph Dashboard

Keep it open in one window, but sometimes it is more hassle than any help. It keeps reloading and logs you out automatically. See this on how to access the dashboard: https://github.com/kinvolk/lokomotive/blob/master/docs/how-to-guides/rook-ceph-storage.md#access-the-ceph-dashboard.

  • Grafana dashboards

Keep an eye on the Grafana dashboard but the data here will always be old and the most reliable state of the system will come from the watch running inside toolbox pod.

  • Run updates
kubectl apply -f https://raw.githubusercontent.com/kinvolk/lokomotive/master/assets/charts/components/rook/templates/resources.yaml
lokoctl component apply rook rook-ceph
  • Verify that the csi images are updated:
kubectl --namespace rook get pod -o jsonpath='{range .items[*]}{range .spec.containers[*]}{.image}{"\n"}' -l 'app in (csi-rbdplugin,csi-rbdplugin-provisioner,csi-cephfsplugin,csi-cephfsplugin-provisioner)' | sort | uniq
  • Final checks:

Once everything is up to date then run following commands in the toolbox pod:

ceph status
ceph osd status
ceph df
rados df

Update using following steps:

```
cd assets/charts/components
helm repo add rook-release https://charts.rook.io/release
helm repo update
helm fetch --untar rook-release/rook-ceph
rm -rf rook
mv rook-ceph rook

git checkout rook/dashboards/
git checkout rook/templates/service-monitor.yaml
git checkout rook/templates/prometheus-ceph-v14-rules.yaml
git checkout rook/templates/csi-metrics-service-monitor.yaml
git checkout rook/templates/ceph-cluster.yaml
git checkout rook/templates/ceph-osd.yaml
git checkout rook/templates/ceph-pools.yaml
```

Release Notes: https://github.com/rook/rook/releases/tag/v1.4.2
- Password env var changed from `ROOK_ADMIN_SECRET` to
  `ROOK_CEPH_SECRET` and the keys from secret is changed from
  `admin-secret` to `ceph-secret`.

- There is additional env var that is needed for username exposed as
  `ROOK_CEPH_USERNAME` and comes from the secret key `ceph-username`.

Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
Provisioner and Plugins were missing tolerationa and affinity, this
commit adds that.

Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
@surajssd surajssd force-pushed the surajssd/update-rook-1.4.1 branch from bafe481 to 98b4a60 Compare August 28, 2020 14:42
@surajssd surajssd requested a review from knrt10 August 28, 2020 16:03
Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@invidian invidian self-requested a review August 31, 2020 09:38
Copy link
Contributor

@knrt10 knrt10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@invidian invidian merged commit b2a6e32 into master Aug 31, 2020
@invidian invidian deleted the surajssd/update-rook-1.4.1 branch August 31, 2020 09:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/dependency-update To label pending updates of upstream projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update rook to 1.4.2

3 participants