Skip to content

Commit

Permalink
Merge pull request #11122 from rabbitmq/mergify/bp/v3.13.x/pr-11066
Browse files Browse the repository at this point in the history
Ignore `ebusy` when deleting a directory (backport #11066)
  • Loading branch information
michaelklishin committed Apr 29, 2024
2 parents a0db3e0 + e746e4d commit abc5c01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions deps/rabbit/src/rabbit_file.erl
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ recursive_delete1(Path) ->
ok ->
case prim_file:del_dir(Path) of
ok -> ok;
{error, ebusy} -> ok; %% Can't delete a mount point
{error, Err} -> {error, {Path, Err}}
end;
{error, _Err} = Error ->
Expand Down
1 change: 1 addition & 0 deletions deps/rabbit/src/rabbit_mnesia.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,7 @@ mnesia_and_msg_store_files() ->
rabbit_node_monitor:coordination_filename(),
rabbit_node_monitor:stream_filename(),
rabbit_node_monitor:default_quorum_filename(),
rabbit_node_monitor:classic_filename(),
rabbit_node_monitor:quorum_filename(),
rabbit_feature_flags:enabled_feature_flags_list_file(),
rabbit_khepri:dir()],
Expand Down
4 changes: 4 additions & 0 deletions deps/rabbit/src/rabbit_node_monitor.erl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
cluster_status_filename/0, coordination_filename/0,
stream_filename/0,
quorum_filename/0, default_quorum_filename/0,
classic_filename/0,
prepare_cluster_status_files/0,
write_cluster_status/1, read_cluster_status/0,
update_cluster_status/0, reset_cluster_status/0]).
Expand Down Expand Up @@ -83,6 +84,9 @@ quorum_filename() ->
default_quorum_filename() ->
filename:join(rabbit:data_dir(), "quorum").

classic_filename() ->
filename:join(rabbit:data_dir(), "msg_stores").

-spec prepare_cluster_status_files() -> 'ok' | no_return().

prepare_cluster_status_files() ->
Expand Down

0 comments on commit abc5c01

Please sign in to comment.