Skip to content

Commit

Permalink
Require nodes or ssh_config in fleet configurations (#1464)
Browse files Browse the repository at this point in the history
  • Loading branch information
r4victor authored Jul 29, 2024
1 parent 6319a31 commit 02decfe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dstack/_internal/server/services/fleets.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ def _remove_fleet_spec_sensitive_info(spec: FleetSpec):
def _validate_fleet_spec(spec: FleetSpec):
if spec.configuration.name is not None:
validate_dstack_resource_name(spec.configuration.name)
if spec.configuration.ssh_config is None and spec.configuration.nodes is None:
raise ServerClientError("No ssh_config or nodes specified")
if spec.configuration.ssh_config is not None:
for host in spec.configuration.ssh_config.hosts:
if isinstance(host, str):
Expand Down

0 comments on commit 02decfe

Please sign in to comment.