Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Fix portforward for host network. #739

Merged
merged 2 commits into from
Apr 18, 2018

Conversation

Random-Liu
Copy link
Member

@Random-Liu Random-Liu commented Apr 17, 2018

Fixes #738.

Corresponding CRI validation test kubernetes-sigs/cri-tools#289.

Test result:

[BeforeEach] [k8s.io] Streaming
  /home/lantaol/workspace/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:50
[BeforeEach] [k8s.io] Streaming
  /home/lantaol/workspace/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/streaming.go:52
[It] runtime should support portforward in host network
  /home/lantaol/workspace/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/streaming.go:148
STEP: create a PodSandbox with container port port mapping in host network
STEP: create a nginx container
Apr 17 07:32:26.804: INFO: Use latest as default image tag.
STEP: Get image status for image: gcr.io/cri-tools/hostnet-nginx:latest
STEP: Pull image : gcr.io/cri-tools/hostnet-nginx:latest
STEP: Create container.
Apr 17 07:32:28.932: INFO: Created container "8e2ea920309caf2ec822e34c4c338cded5d0bc708f8f43f94115aff5352003d0"

STEP: start the nginx container
STEP: Start container for containerID: 8e2ea920309caf2ec822e34c4c338cded5d0bc708f8f43f94115aff5352003d0
Apr 17 07:32:29.047: INFO: Started container "8e2ea920309caf2ec822e34c4c338cded5d0bc708f8f43f94115aff5352003d0"

STEP: port forward PodSandbox: 19408ad9915d1907db3cb8932b9352f32cfdd872edc00b0825eb58e1c7776140
Apr 17 07:32:29.048: INFO: Get port forward url: http://10.240.0.2:10010/portforward/3BtUzPlg
STEP: check the output of portforward
Apr 17 07:32:29.048: INFO: Parse url "http://10.240.0.2:10010/portforward/3BtUzPlg" succeed
STEP: check if we can get nginx main page via localhost:8002
STEP: get the IP:port needed to be checked
Apr 17 07:32:29.048: INFO: the IP:port is http://127.0.0.1:8002
STEP: check the content of http://127.0.0.1:8002
STEP: start port forward
Forwarding from 127.0.0.1:8002 -> 8003
Forwarding from [::1]:8002 -> 8003
Handling connection for 8002
Apr 17 07:32:30.053: INFO: check port mapping succeed
Apr 17 07:32:30.053: INFO: Check port forward url "http://10.240.0.2:10010/portforward/3BtUzPlg" succeed
[AfterEach] runtime should support streaming interfaces
  /home/lantaol/workspace/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/streaming.go:61
STEP: stop PodSandbox
STEP: delete PodSandbox
[AfterEach] [k8s.io] Streaming
  /home/lantaol/workspace/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:51

/cc @abhi @qiujian16
Signed-off-by: Lantao Liu [email protected]

@k8s-ci-robot k8s-ci-robot requested a review from abhi April 17, 2018 07:43
@Random-Liu Random-Liu added this to the v1.0.0 milestone Apr 17, 2018
Copy link
Member

@abhi abhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM

@k8s-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the lgtm label Apr 18, 2018
@Random-Liu
Copy link
Member Author

Random-Liu commented Apr 18, 2018

Just added one more commit to update CRI validation test to include host network portforward test.

Reapply LGTM label.

@Random-Liu Random-Liu merged commit 290eec8 into containerd:master Apr 18, 2018
@Random-Liu Random-Liu deleted the fix-hostnet-port-forward branch April 18, 2018 04:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants