You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just take hostPath as an example here, it cloud be other kind of volume type like cephfs or nfs. The point is I want vmstorage write data to the volume I mounted, not a PVC or emptydir defined in VMCluster.Spec.VMStorage.Storage. But today VM Operator will create a emptydir as a default behavior and mount it to the path defined in storageDataPath. Which in this case, will cause a conflict and vmstorage pod can't start with following errors.
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedCreate 22s (x16 over 3m5s) statefulset-controller create Pod vmstorage-vmcluster-0 in StatefulSet vmstorage-vmcluster failed error: Pod "vmstorage-vmcluster-0" is invalid: spec.containers[0].volumeMounts[1].mountPath: Invalid value: "/storage": must be unique
My proposal is to add a check before appending the default VolumeMount to StorageDataPath if there's already an additional VolumeMount's mountPath equals the StorageDataPath, and skip the default VolumeMount if it's true. I can contribute the code if the proposal is accepted.
The text was updated successfully, but these errors were encountered:
Hello!
Thanks for the detail report, and yes, the behavior should be improved.
But I think it's little hacky to check if one of themountPath is equal with the StorageDataPath. I think we can extend the current StorageSpec, make it support more VolumeSource like native Volume. In that way, StorageSpec can still remain independent and serves StorageDataPath better with feasible default behavior.
wdyt @linjunzhe@f41gh7
Hello! Thanks for the detail report, and yes, the behavior should be improved. But I think it's little hacky to check if one of themountPath is equal with the StorageDataPath. I think we can extend the current StorageSpec, make it support more VolumeSource like native Volume. In that way, StorageSpec can still remain independent and serves StorageDataPath better with feasible default behavior. wdyt @linjunzhe@f41gh7
I think, the correct approach to validate user input and throw an error in this case ( /storage is reserved mount and cannot be used for volume mounts). It also a case for any other reserved mount names.
vmstorage doesn't support read-write many option and since all pod have the same configuration, it'll be a conflict with lock file.
For example, I have following VMCluster CR
I just take
hostPath
as an example here, it cloud be other kind of volume type likecephfs
ornfs
. The point is I want vmstorage write data to the volume I mounted, not a PVC or emptydir defined inVMCluster.Spec.VMStorage.Storage
. But today VM Operator will create a emptydir as a default behavior and mount it to the path defined in storageDataPath. Which in this case, will cause a conflict and vmstorage pod can't start with following errors.The pod will have 2 volumeMount in the same path.
My proposal is to add a check before appending the default VolumeMount to StorageDataPath if there's already an additional VolumeMount's mountPath equals the StorageDataPath, and skip the default VolumeMount if it's true. I can contribute the code if the proposal is accepted.
The text was updated successfully, but these errors were encountered: