rancher / local-path-provisioner

Dynamically provisioning persistent local storage with Kubernetes
Apache License 2.0
2.14k stars 447 forks source link

completely broken with RKE2... #290

Closed KyleSanderson closed 1 year ago

KyleSanderson commented 1 year ago

Kind of unclear what's going on here as there's reports going back saying there's issues with OpenShift and similar. Retail RKE2 install on 1.24. Making the "helper" pod privileged creates the path, but every other pod still can't use it.

KyleSanderson commented 1 year ago

https://github.com/rancher/local-path-provisioner/issues/283 https://github.com/rancher/local-path-provisioner/issues/282

derekbit commented 1 year ago

Did you try https://github.com/rancher/local-path-provisioner/issues/283#issuecomment-1356316957?

derekbit commented 1 year ago

@KyleSanderson Can you provide your env information?

Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: 
Number of management node in the cluster: 
Number of worker node in the cluster: 
Node config
OS type and version: 
SELinux enabled (true/false):
CPU per node: 
Memory per node: 
Disk type(e.g. SSD/NVMe):
Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal): 
KyleSanderson commented 1 year ago

Did you try #283 (comment)?

Yes, no impact. This is very easy to reproduce...

KyleSanderson commented 1 year ago

Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: v1.24.10+rke2r1 Number of management node in the cluster: SINGLE NODE OS type and version: 5.14.0-162.12.1.el9_1.0.1.x86_64 SELinux enabled (true/false): Enforcing CPU per node: 92 Memory per node: 1024 Disk type(e.g. SSD/NVMe): NVMe Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal): Metal

derekbit commented 1 year ago

Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: v1.24.10+rke2r1 Number of management node in the cluster: SINGLE NODE OS type and version: 5.14.0-162.12.1.el9_1.0.1.x86_64 SELinux enabled (true/false): Enforcing CPU per node: 92 Memory per node: 1024 Disk type(e.g. SSD/NVMe): NVMe Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal): Metal

I see. Will the helper pod work correctly if you disable the SELinux? BTW, what's your OS distro (uname -a)?

KyleSanderson commented 1 year ago

Confirmed, it's selinux. RHEL9.1 retail.

derekbit commented 1 year ago

Confirmed, it's selinux. RHEL9.1 retail.

Thanks for your information. I will investigate this issue. It might be caused by the SELinux. You can disable the SELinux and check it can work. If yes, I can work on it with more confidence.

KyleSanderson commented 1 year ago

Yes, it is working now, and I have a replaced filesystem underneath (where it continues to work). Just need those environment variables to make this usable from a "real deployment" perspective. Every other user is going to encounter this on modern ELs.

derekbit commented 1 year ago

@KyleSanderson Fixed in https://github.com/rancher/local-path-provisioner/pull/295. Will release 0.0.24 soon. Thank you.

KyleSanderson commented 1 year ago

Thank you. If the variables stuff could get some love https://github.com/rancher/local-path-provisioner/issues/291 that would be very appreciated. My NAS provider barely supports folder names longer than 30 characters.

derekbit commented 1 year ago

Thank you. If the variables stuff could get some love #291 that would be very appreciated. My NAS provider barely supports folder names longer than 30 characters.

Sure. Will check it. Thanks for the feedback.

derekbit commented 1 year ago

Thank you. If the variables stuff could get some love #291 that would be very appreciated. My NAS provider barely supports folder names longer than 30 characters.

The challenge of the issue is the backward compatibility. Need to investigate more.