Closed telala closed 3 years ago
found the answer. kata with create a new network namespace. set disable_new_netns=true to disable it.
Yes, network namespace is separate. But if you use disable_new_netns=true, you must be very careful. You probably need https://github.com/kata-containers/runtime/issues/931 Can you use unix socket instead?
Hi @caoruidong - can I ask you to make a section in the UserGuide on network namespacing and add some details pls? :-)
@caoruidong I have to set a listening port corresponding the listening So I have to use the tcp...
@grahamwhaley I'm not able to edit the Wiki. Will we use PR to update Wiki or directly on the web?
Description of problem
For some reason I have to open a tcp listening socket when running the kata container. I made some changes to the kata runtime: --- a/vendor/github.com/intel/govmm/qemu/qemu.go +++ b/vendor/github.com/intel/govmm/qemu/qemu.go @@ -1798,6 +1798,9 @@ func (config *Config) appendKnobs() { if config.Knobs.Stopped == true { config.qemuParams = append(config.qemuParams, "-S") } +
+ config.qemuParams = append(config.qemuParams, "-qmp") + config.qemuParams = append(config.qemuParams, "tcp:127.0.0.1:4444,server,nowait") }
func (config *Config) appendBios() {
Then using the new kata runtime to start a kata container but I can not find the listening port in the host. I added some log in the qemu where the listening socket is created and confirmed the socket is established successfully. But can not be seen from host. Seems the connection was isolated?
Expected result
we can see the listing port using netstat -ntlp something like: Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:4444 0.0.0.0:* LISTEN 69446/qemu-system-x
Actual result
there's NO listening socket to 127.0.0.1:4444
kata-containers/runtime$ kata-collect-data.sh
Meta details
Running
kata-collect-data.sh
version1.3.1 (commit 258eae0)
at2018-11-30.11:20:09.853114453+0800
.Runtime is
/usr/bin/kata-runtime
.kata-env
Output of "
/usr/bin/kata-runtime kata-env
":Runtime config files
Runtime default config files
Runtime config file contents
Config file
/etc/kata-containers/configuration.toml
not found Output of "cat "/usr/share/defaults/kata-containers/configuration.toml"
":KSM throttler
version
Output of "
/usr/lib/systemd/system/kata-ksm-throttler.service --version
":Output of "
/usr/libexec/kata-ksm-throttler/kata-ksm-throttler --version
":systemd service
Image details
Initrd details
No initrd
Logfiles
Runtime logs
Shim logs
Recent shim problems found in system journal:
Throttler logs
No recent throttler problems found in system journal.
Container manager details
Have
docker
Docker
Output of "
docker version
":Output of "
docker info
":Output of "
systemctl show docker
":Have
kubectl
Kubernetes
Output of "
kubectl version
":Output of "
kubectl config view
":Output of "
systemctl show kubelet
":No
crio
Packages
No
dpkg
Haverpm
Output of "rpm -qa|egrep "(cc-oci-runtimecc-runtimerunv|kata-proxy|kata-runtime|kata-shim|kata-ksm-throttler|kata-containers-image|linux-container|qemu-)"
":