Repository navigation
Description
Operator v2.5.1 values:
---
installCRDs: true
imageConfigOverride:
- base: quay.io/piraeusdatastore
components:
linstor-satellite:
image: piraeus-server
tag: v1.26.1
drbd-module-loader:
image: drbd9-almalinux9
tag: v9.2.10
Hello, I am a bit desperate to figure out what is going on, so shooting this here in case anyone has any insight.
We have been using pirearus operator back during v1, and have migrated to v2. Things have been going good till we noticed that the anti-affinity and allowRemoteVolumeAccess have seemed to have stopped working.
We have 4 external linstor nodes, not managed by piraeus operator. Things have been working great until this was discovered.
This is the storage class we have been using
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
provisioner: linstor.csi.linbit.com
metadata:
name: linstor-replica-one-local
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
parameters:
linstor.csi.linbit.com/placementCount: "1"
linstor.csi.linbit.com/disklessStoragePool: "DfltDisklessStorPool"
linstor.csi.linbit.com/disklessOnRemaining: "true"
linstor.csi.linbit.com/allowRemoteVolumeAccess: |
- fromSame:
- xcp-ng/node
Now all PV's are going to xen13 no matter what k8s node the pod is running on which is using a PV.
┊ xcp-sr-linstor_group_thin_device ┊ ovbh-pprod-xen10 ┊ LVM_THIN ┊ linstor_group/thin_device ┊ 2.42 TiB ┊ 3.49 TiB ┊ True ┊ Ok ┊ ovbh-pprod-xen10;xcp-sr-linstor_group_thin_device ┊
┊ xcp-sr-linstor_group_thin_device ┊ ovbh-pprod-xen11 ┊ LVM_THIN ┊ linstor_group/thin_device ┊ 2.44 TiB ┊ 3.49 TiB ┊ True ┊ Ok ┊ ovbh-pprod-xen11;xcp-sr-linstor_group_thin_device ┊
┊ xcp-sr-linstor_group_thin_device ┊ ovbh-pprod-xen12 ┊ LVM_THIN ┊ linstor_group/thin_device ┊ 2.83 TiB ┊ 3.49 TiB ┊ True ┊ Ok ┊ ovbh-pprod-xen12;xcp-sr-linstor_group_thin_device ┊
┊ xcp-sr-linstor_group_thin_device ┊ ovbh-pprod-xen13 ┊ LVM_THIN ┊ linstor_group/thin_device ┊ 4.05 TiB ┊ 4.99 TiB ┊ True ┊ Ok ┊ ovbh-pprod-xen13;xcp-sr-linstor_group_thin_device ┊
When I try linstor.csi.linbit.com/allowRemoteVolumeAccess: 'false' I get the following in k8s.
0/7 nodes are available: 1 node(s) were unschedulable, 3 node(s) did not have enough free storage, 3 node(s) had untolerated taint {[node-role.kubernetes.io/control-plane](http://node-role.kubernetes.io/control-plane): }. preemption: 0/7 nodes are available: 7 Preemption is not helpful for scheduling..
We obviously have not had any issues with our replica-three storage class.
I am not seeing any errors in piraeus operator pods yet. I have not found any issues with out linstor cluster yet.
Activity
WanzenBug commentedon Jun 25, 2024
I suspect the issue is that with the new operator this label is no longer automatically synced to LINSTOR (or at least, not to where LINSTOR CSI now expects).
You need to add a satellite configuration which synces the labels in the
Aux/topologynamespace:Or is that property managed somehow externally? Then you need to prefix it manually with this
Aux/topology/key.jonathon2nd commentedon Jun 25, 2024
Sadly no.
The PV is on xen13, so it should only be allowed on worker04, but it started up on worker02.
Also, my memory may be wrong, but I remember the PV yaml stating somewhere what host it was on.
jonathon2nd commentedon Jun 25, 2024
Actually that got me progress. I added the key with topology to the hosts
PV that gets deployed to xen13, only allows pods from worker 4 now, nice!
I was also able to move a pv from xen13 to xen12, and update the pvc to
volume.kubernetes.io/selected-node: ovbh-vtest-k8s02-worker03and it started up on worker03.I am having problem with creation of new pv when worker04 is cordoned. I am seeing the host assignment in the PV again, which is nice.
0/7 nodes are available: 1 node(s) were unschedulable, 3 node(s) had untolerated taint {node-role.kubernetes.io/control-plane: }, 3 node(s) had volume node affinity conflict. preemption: 0/7 nodes are available: 7 Preemption is not helpful for scheduling.This is the storage class, so no idea why it is not waiting for the pod to start somewhere before creating the pv.
jonathon2nd commentedon Jun 25, 2024
Deleted the PV and redid test, caught this message before it went away
Running PreBind plugin "VolumeBinding": binding volumes: pv "pvc-8db6569b-8b5a-487d-8708-28f30fe5977b" node affinity doesn't match node "ovbh-vtest-k8s02-worker02": no matching NodeSelectorTermsgot all the relevant events
pvc-5aab1e01-6ded-4cfa-8101-ab7d613971d8.17dc4e167f164d6e.yaml.txt
test.17dc4f7a159814d0.yaml.txt
test.17dc4f7a155db34b.yaml.txt
test.17dc4f7b0c5f4667.yaml.txt
test-f98b6b876-ckz4f.17dc4f7796f73df6.yaml.txt
test-f98b6b876-ckz4f.17dc4ed51d712b91.yaml.txt
test.17dc4f7796c735a8.yaml.txt
test-f98b6b876-ckz4f.17dc4f7b3ed14fab.yaml.txt
jonathon2nd commentedon Jun 25, 2024
Ok I figured out that part of the problem.
Added the above due to us updating to 1.26.1, which means this needs to be considered: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#_automatically_maintaining_resource_group_placement_count
our xen13 has much more space, so that explains what was going on.
Thanks for the help @WanzenBug!
jonathon2nd commentedon Jun 25, 2024
Welp, celebrated too soon. It can now deploy a pv to xen12 in addition to xen13, but for this test redis I have setup with a pv on xen13 and xen12 already, it is not working right.
I am reading things here: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#_automatically_maintaining_resource_group_placement_count, and I just want the old behavior back where it will allow the putting of pv's wherever they need to go.
linstor controller set-property BalanceResourcesEnabled "false"is not reverting.jonathon2nd commentedon Jun 25, 2024
I have a question @WanzenBug, to make sure I am not wrong about something.
How is linstor supposed to know what external linstor satellite is supposed to match with the satellite worker?
WaitForFirstConsumershould be what is doing that, at least I think. But now I am wondering if that is only in respect to the k8s worker, and no the linstor satellite where the data actually lives.The thing is that external linstor cluster doesn't know which k8s worker is on which host, and they are all external. Would need to match a label on both sides but I don't think it does it?
WanzenBug commentedon Jun 26, 2024
Since you used
the CSI plugin wil look for all nodes with the same value for the
Aux/topology/xcp-ng/nodeproperty. So all your "external" satellites need those as well. Unless I'm misunderstanding your setup?jonathon2nd commentedon Jun 26, 2024
The external satellites, xen10 xen11 xen12 xen13 all have those properties, like I showed above.
So at this point the piraeus operator and the satellites on k8s are now host aware. My question is, are the external satellites aware of what k8s satellite is running on it?
We have four hosts, with a k8s worker on each. The way we want replica-one pv's deployed: the pod needs to run on the k8s node, which corresponds to the host with the pv. So if the pv is on xen13, the pod needs to run on worker04. That is all working as expected.
What I am struggling with is the placement of the pv. Are the external satellites aware of what k8s satellite is running on it? Is xen13 aware that worker04 is the one that is running on it, and not worker01 worker02 and/or worker03?
When I have a new pv with
WaitForFirstConsumerand the pod gets deployed to worker02, the pv should get deployed to xen11 as that is the host that worker02 is running on, but it is not.jonathon2nd commentedon Jun 26, 2024
I am wondering if it would be possible to create the opposite of the affinity controller. An anti-affinity controller.
Instead of updating the PVC to reflect where the PV lives (after migration), we want to move the PV to where it should be based on the PVC.
Monitoring for newly created PVC
It then checks the PV
And seeing that it is on the wrong host (xen12) it moves it to the host that corresponds with
volume.kubernetes.io/selected-node: ovbh-vtest-k8s02-worker01using linstor commands.jonathon2nd commentedon Jun 27, 2024
Ok so, it is looking like the functionality we were used to is just broken/gone. I do not understand what happened.
In the mean time I wrote a script to automate/just do this. Obviously I can't write an anti-affinity controller, but I can bodge it and get moving again. I have a lot going on and I wanted to stop going back and forth between rancher/kubectl outputs and linstor outputs.
Putting here in case someone has similar setup and they find this useful.
Usage:
WanzenBug commentedon Jun 27, 2024
I think there is a bug in the LINSTOR CSI driver:
I tried to recreate this scenario.
k8s-22.testandk8s-23.testare labelled withxcp-ng/node=node2. While the first attempt, placing it on k8s-23.test is expected to fail, as it is diskless, it should make an attempt to place onk8s-22.testandk8s-23.testin the second round, but instead it seems to select all nodes.WanzenBug commentedon Jun 27, 2024
It looks to be related to the new node cache in LINSTOR CSI 1.6.0. You can try downgrading to 1.5.0:
jonathon2nd commentedon Jun 27, 2024
quay.io/piraeusdatastore/piraeus-csi:v1.5.0
Unfortunately no :/
0/7 nodes are available: 2 node(s) had volume node affinity conflict, 2 node(s) were unschedulable, 3 node(s) had untolerated taint {node-role.kubernetes.io/control-plane: }. preemption: 0/7 nodes are available: 7 Preemption is not helpful for scheduling..pv:
pvc:
jonathon2nd commentedon Jun 27, 2024
Ran script to move it to correct location
jonathon2nd commentedon Jun 27, 2024
If you are able to recreate the issue that is great, did not fully read what you said first lol. I may have borked my test, I have been swamped.
I ran my script against our full preprod and it worked great, so anyone can feel free to use it and build on it.
Looking forward to trying out the piraeus operator update that might have a fix for this, but we can get by for now.
WanzenBug commentedon Jun 28, 2024
Yeah, sorry, seems to have been broken for quite some time (basically with the introduction of caching in the CSI driver, which was in
1.2.3).You can give the latest CSI version a try, which includes the necessary fixes for caching:
jonathon2nd commentedon Jun 28, 2024
That works 😭
https://github.com/piraeusdatastore/linstor-csi/releases/tag/v1.6.3
Thought I was going crazy there for a bit.
Thanks for getting this resolved so quickly!