Skip to content

Commit

Permalink
Check provider_config.use_internal_ips
Browse files Browse the repository at this point in the history
  • Loading branch information
Ultramann committed Aug 7, 2024
1 parent 51f1f78 commit fa263df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sky/provision/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,13 @@ def _get_ips(self, use_internal_ips: bool) -> List[str]:

def get_feasible_ips(self, force_internal_ips: bool = False) -> List[str]:
"""Get external IPs if they exist, otherwise get internal ones."""
return self._get_ips(not self.has_external_ips() or force_internal_ips)
if self.provider_config is not None:
use_internal_ips = self.provider_config.get('use_internal_ips',
False)
else:
use_internal_ips = False
return self._get_ips(use_internal_ips or not self.has_external_ips() or
force_internal_ips)

def get_ssh_ports(self) -> List[int]:
"""Get the SSH port of all the instances."""
Expand Down

0 comments on commit fa263df

Please sign in to comment.