anchor.diff:      Host = hosts:self(),
       Port = onepanel_env:typed_get(couchbase_admin_port, list),
   
  -    Cmd = [?CLI, "rebalance", "-c", Host ++ ":" ++ Port, "-u", User],
  -    onepanel_shell:ensure_success(
  -        Cmd ++ ["-p", Password],
  -        Cmd ++ ["-p", "*****"]
  -    ),
  +    ?info("Rebalancing the couchbase cluster..."),
  +    rebalance_cluster_with_attempts(Host, Port, User, Password, ?REBALANCE_ATTEMPTS),
   
       % Couchbase reports healthy status before it's ready to serve requests.
       % This delay provides additional margin of error before starting workers.
  
positive.code: %%%===================================================================
  %%% Internal functions
  %%%===================================================================
  
  %%--------------------------------------------------------------------
  %% @private @doc
  
negative.code: 
  -define(INIT_SCRIPT, "couchbase-server").
  -define(CLI, "LC_ALL=en_US.UTF-8 /opt/couchbase/bin/couchbase-cli").
  
  -define(REBALANCE_ATTEMPTS, 3).
  -define(REBALANCE_ATTEMPT_INTERVAL, timer:seconds(10)).
  
  %%%===================================================================
  %%% Service behaviour callbacks
  