Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better nc error message on mac #3374

Merged
merged 28 commits into from
Apr 15, 2024
Merged
Changes from 26 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7dfcba1
initial commit
Feb 17, 2024
212df29
Merge branch 'skypilot-org:master' into master
shethhriday29 Feb 17, 2024
a08c034
newline
Feb 17, 2024
b85cbf9
comments
Feb 17, 2024
4fbfe17
run linter
Feb 17, 2024
6fc77e1
reminder for down
Feb 18, 2024
d6cb993
tentatively done with example
Feb 18, 2024
2d5aceb
formatting
Feb 18, 2024
4e1954a
yapf
Feb 19, 2024
eb22f62
Merge branch 'skypilot-org:master' into master
shethhriday29 Feb 22, 2024
27a8905
[Storage] Storage mounting tool permissions fix (#3215)
romilbhardwaj Feb 22, 2024
41a63df
[LLM] Example for Serving Gemma (#3207)
Michaelvll Feb 23, 2024
2b17e91
[LLM] Add logo for Gemma (#3220)
Michaelvll Feb 23, 2024
b326d12
Minor fixes for release 0.5.0 (#3212)
Michaelvll Feb 23, 2024
6d77872
[Docker] Add retry for docker pull due to daemon not ready (#3218)
Michaelvll Feb 24, 2024
cb695d5
added comments
Feb 26, 2024
94221eb
Merge branch 'skypilot-org:master' into master
shethhriday29 Feb 26, 2024
888f1a8
quick fix
Feb 27, 2024
4877669
finished pip issues
Feb 29, 2024
7a208dd
fix
Feb 29, 2024
152e36a
fix storage error message, add example link to docs
romilbhardwaj Feb 29, 2024
cf556ed
Merge branch 'master' of https://github.com/skypilot-org/skypilot int…
romilbhardwaj Feb 29, 2024
8213f02
Merge branch 'skypilot-org:master' into master
shethhriday29 Mar 3, 2024
60a530d
Merge branch 'skypilot-org:master' into master
shethhriday29 Mar 22, 2024
3d12439
changed error message if default nc installed on mac
Mar 27, 2024
c6af144
Merge branch 'skypilot-org:master' into nc-error
shethhriday29 Mar 27, 2024
0746b45
refactored check_port_forward_mode_dependencies function
Mar 28, 2024
e42d5b3
update comment
romilbhardwaj Apr 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions sky/provision/kubernetes/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,15 +1038,29 @@ def check_port_forward_mode_dependencies() -> None:
stderr=subprocess.DEVNULL,
check=True)
except (FileNotFoundError, subprocess.CalledProcessError):
with ux_utils.print_exception_no_traceback():
raise RuntimeError(
f'`{name}` is required to setup Kubernetes cloud with '
f'`{kubernetes_enums.KubernetesNetworkingMode.PORTFORWARD.value}` ' # pylint: disable=line-too-long
'default networking mode and it is not installed. '
'On Debian/Ubuntu, install it with:\n'
f' $ sudo apt install {install_cmd}\n'
f'On MacOS, install it with: \n'
f' $ brew install {install_cmd}') from None
mac_nc_error = name == 'nc' and (os.path.exists('/usr/bin/nc') or
os.path.exists('/usr/bin/netcat'))
shethhriday29 marked this conversation as resolved.
Show resolved Hide resolved
current_nc_path = (os.path.exists('/usr/bin/nc') and
'/usr/bin/nc') or '/usr/bin/netcat'
if mac_nc_error:
with ux_utils.print_exception_no_traceback():
raise RuntimeError(
f'The default MacOS `nc` is installed at '
f'{current_nc_path}. However, for '
f'`{kubernetes_enums.KubernetesNetworkingMode.PORTFORWARD.value}` ' # pylint: disable=line-too-long
'default networking mode, GNU netcat is required. '
f'On MacOS, install it with: \n'
f' $ brew install {install_cmd}') from None
else:
with ux_utils.print_exception_no_traceback():
raise RuntimeError(
f'`{name}` is required to setup Kubernetes cloud with '
f'`{kubernetes_enums.KubernetesNetworkingMode.PORTFORWARD.value}` ' # pylint: disable=line-too-long
'default networking mode and it is not installed. '
'On Debian/Ubuntu, install it with:\n'
f' $ sudo apt install {install_cmd}\n'
f'On MacOS, install it with: \n'
f' $ brew install {install_cmd}') from None


def get_endpoint_debug_message() -> str:
Expand Down
Loading