fix(remnawave): re-enable disabled nodes during sync
This commit is contained in:
1 parent
da00d585cf
commit
34c5ff1aac
1 file changed
+4
@@ -328,6 +328,10 @@ def sync_node_and_host(
|
|||||||
if not (200 <= code < 300):
|
if not (200 <= code < 300):
|
||||||
api.request("PUT", "/nodes/", payload)
|
api.request("PUT", "/nodes/", payload)
|
||||||
changes.append(f"updated node {node_name} ({target_addr})")
|
changes.append(f"updated node {node_name} ({target_addr})")
|
||||||
|
if existing_node.get("isDisabled") or needs_update:
|
||||||
|
ecode, _ = api.request("POST", f"/nodes/{node_uuid}/actions/enable", {}, allow_error=True)
|
||||||
|
if 200 <= ecode < 300 and existing_node.get("isDisabled"):
|
||||||
|
changes.append(f"enabled node {node_name}")
|
||||||
|
|
||||||
selfsteal = node_cfg["selfsteal_domain"]
|
selfsteal = node_cfg["selfsteal_domain"]
|
||||||
_, hosts_resp = api.request("GET", "/hosts/")
|
_, hosts_resp = api.request("GET", "/hosts/")
|
||||||
|
|||||||
Reference in new issue
Block a user