backport https://github.com/longhorn/longhorn/issues/12472
backport #12472