Przeglądaj źródła

Merge pull request #13120 from ieQu1/dev/ds-api-site-status

fix(dsapi): Check status of the node via Mria
zmstone 1 rok temu
rodzic
commit
b2f5e50f16
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      apps/emqx_management/src/emqx_mgmt_api_ds.erl

+ 1 - 1
apps/emqx_management/src/emqx_mgmt_api_ds.erl

@@ -307,7 +307,7 @@ get_site(get, #{bindings := #{site := Site}}) ->
             ?NOT_FOUND(<<"Site not found: ", Site/binary>>);
             ?NOT_FOUND(<<"Site not found: ", Site/binary>>);
         true ->
         true ->
             Node = emqx_ds_replication_layer_meta:node(Site),
             Node = emqx_ds_replication_layer_meta:node(Site),
-            IsUp = lists:member(Node, [node() | nodes()]),
+            IsUp = mria:cluster_status(Node) =:= running,
             Shards = shards_of_site(Site),
             Shards = shards_of_site(Site),
             ?OK(#{
             ?OK(#{
                 node => Node,
                 node => Node,