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