Skip to content
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

Corrupt snapshot prevents glusterd startup, no event API notification #4464

Open
kohlschuetter opened this issue Jan 29, 2025 · 1 comment
Open
Assignees
Milestone

Comments

@kohlschuetter
Copy link

An incomplete/corrupt snapshot entry under /var/lib/glusterd/snaps prevents glusterd from starting.
Instead, the snapshot should probably be marked "corrupt", deleted or moved elsewhere.

Steps to reproduce (tested with latest)

  1. Create an invalid snapshot entry (an empty directory is sufficient)
mkdir /var/lib/glusterd/snaps/invalid
/etc/init.d/glusterd restart

Result:
glusterd start hangs

Output from /var/log/glusterfs/glusterd.log:

[2025-01-29 11:11:03.855392 +0000] E [MSGID: 106196] [glusterd-store.c:3969:glusterd_store_retrieve_snap] 0-management: Failed to update snapshot for invalid snap 
[2025-01-29 11:11:03.855399 +0000] E [MSGID: 106042] [glusterd-store.c:4134:glusterd_store_retrieve_snaps] 0-management: Unable to restore snapshot: invalid 
[2025-01-29 11:11:03.855416 +0000] E [MSGID: 101018] [xlator.c:643:xlator_init] 0-management: Initialization of volume failed. review your volfile again. [{name=management}] 
[2025-01-29 11:11:03.855423 +0000] E [MSGID: 101064] [graph.c:476:glusterfs_graph_init] 0-management: initializing translator failed 
[2025-01-29 11:11:03.855430 +0000] E [MSGID: 101174] [graph.c:825:glusterfs_graph_activate] 0-graph: init failed 
@kohlschuetter
Copy link
Author

Notably, no event with that specific error ("Initialization of volume failed" / "Unable to restore snapshot") is sent via the Events API. I only see a PEER_CONNECT/PEER_DISCONNECT sequence.

We already have a few SNAPSHOT_*_FAILED events defined, but I guess something like SNAPSHOT_INIT_FAILED is what's missing here.

@kohlschuetter kohlschuetter changed the title Corrupt snapshot prevents glusterd startup Corrupt snapshot prevents glusterd startup, no event API notification Jan 29, 2025
@sanjurakonde sanjurakonde added this to the Gluster 11.3 milestone Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants