Skip to content

Ignore non-filesystem signatures when re-mounting filesystem PVC #1033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2025

Conversation

daichimukai
Copy link
Contributor

See the commit message.

topolvm-node sometimes fails to mount a filesystem PVC that was
previously formatted and mounted to a Pod. This issue appears to stem
from topolvm-node's filesystem detection method, which uses blkid and
may report non-filesystem signatures, such as RAID member signatures
located in the last sector of the block device. Consequently,
topolvm-node interprets this as a filesystem inconsistency error,
resulting in a failure to mount. These should be considered false
positives, as the devices being mounted are intended solely for the
filesystem specified in the PVC spec.

During NodePublishVolume requests, topolvm-node attempts to detect the
filesystem twice. The first detection is performed with its own
implementation, and the second is done by FormatAndMount() provided by
Kubernetes' mount-utils. Currently, both implementations perform
essentially the same function. We can easily modify the former
implementation, but the latter is more challenging to adjust.

To address this issue, this commit modifies topolvm's filesystem
detection method to ignore any usage other than filesystems in its own
implementation. Additionally, we avoid using FormatAndMount() when an
existing filesystem is detected, and instead use Mount(), which does not
check the existing disk format. While this fix does not address false
positives for newly created PVCs, it prioritizes resolving the
re-mounting issue. Newly created PVCs are not yet in use, allowing us
time to address any issues manually.

Signed-off-by: Daichi Mukai <daichi-mukai@cybozu.co.jp>
@daichimukai daichimukai self-assigned this Apr 17, 2025
@daichimukai daichimukai marked this pull request as ready for review April 17, 2025 04:32
@daichimukai daichimukai requested a review from a team as a code owner April 17, 2025 04:32
@daichimukai daichimukai moved this from To do to Review in progress in Development Apr 17, 2025
@daichimukai daichimukai requested a review from peng225 April 17, 2025 05:03
@peng225 peng225 merged commit 0facba9 into main Apr 18, 2025
34 of 35 checks passed
@peng225 peng225 deleted the ignore-non-filesystem-signatures branch April 18, 2025 00:58
@github-project-automation github-project-automation bot moved this from Review in progress to Done in Development Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants