From cfae94e7bf5276ce4225d3f2f90e03fa7a59c1d7 Mon Sep 17 00:00:00 2001 From: tom-shan Date: Sat, 8 Feb 2020 00:59:01 +0800 Subject: [PATCH 1/2] add the ip argument of jupyter server for k8s container (#9977) fix https://github.com/microsoft/vscode-python/issues/9976 --- news/2 Fixes/9976.md | 1 + src/client/datascience/jupyter/notebookStarter.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 news/2 Fixes/9976.md diff --git a/news/2 Fixes/9976.md b/news/2 Fixes/9976.md new file mode 100644 index 000000000000..6b79ac7b945b --- /dev/null +++ b/news/2 Fixes/9976.md @@ -0,0 +1 @@ +add --ip=127.0.0.1 argument of jupyter server when running in k8s container diff --git a/src/client/datascience/jupyter/notebookStarter.ts b/src/client/datascience/jupyter/notebookStarter.ts index 3cf3ddad5727..66f98d28fcd1 100644 --- a/src/client/datascience/jupyter/notebookStarter.ts +++ b/src/client/datascience/jupyter/notebookStarter.ts @@ -211,7 +211,7 @@ export class NotebookStarter implements Disposable { // Check for a docker situation. try { const cgroup = await this.fileSystem.readFile('/proc/self/cgroup').catch(() => ''); - if (!cgroup.includes('docker')) { + if (!cgroup.includes('docker') && !cgroup.includes('kubepods')) { return args; } // We definitely need an ip address. From 36958f770a1d7477f263e7d34c9154f473661dea Mon Sep 17 00:00:00 2001 From: Ian Huff Date: Fri, 7 Feb 2020 12:55:36 -0800 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 2 ++ news/2 Fixes/9976.md | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 news/2 Fixes/9976.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ac937fbe82e..2c877d964761 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,8 @@ ([#9701](https://github.com/Microsoft/vscode-python/issues/9701)) ### Fixes +1. add --ip=127.0.0.1 argument of jupyter server when running in k8s container + ([#9976](https://github.com/Microsoft/vscode-python/issues/9976)) 1. Correct the server and kernel text for when not connected to a server. ([#9933](https://github.com/Microsoft/vscode-python/issues/9933)) 1. Make sure to clear variable list on restart kernel. diff --git a/news/2 Fixes/9976.md b/news/2 Fixes/9976.md deleted file mode 100644 index 6b79ac7b945b..000000000000 --- a/news/2 Fixes/9976.md +++ /dev/null @@ -1 +0,0 @@ -add --ip=127.0.0.1 argument of jupyter server when running in k8s container