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

mount containerd network namespace #138

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Conversation

Huimintai
Copy link
Contributor

No description provided.

@Huimintai
Copy link
Contributor Author

@chenchun Can you review this PR?

@@ -126,6 +129,9 @@ spec:
- name: galaxy-run
hostPath:
path: /var/run/galaxy
- name: containerd-run
hostPath:
path: /var/run/netns
Copy link
Contributor

Choose a reason for hiding this comment

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

整个/run/已经被mount了,还需要mount这个目录吗?

@@ -103,6 +103,9 @@ spec:
volumeMounts:
- name: galaxy-run
mountPath: /var/run/galaxy/
- name: containerd-run
mountPath: /var/run/netns
mountPropagation: Bidirectional
Copy link
Contributor

Choose a reason for hiding this comment

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

为什么需要Bidirectional?

@chenchun
Copy link
Contributor

为什么需要mount containerd的network namespace ?

@blue-troy
Copy link
Contributor

为什么需要mount containerd的network namespace ?

他的这个问题目的为了解决无法在containerd的情况下运行galaxy的问题 #137

galaxy要想解决containerd下的运行有两个事情要做,一个是containerd netns的问题,另一个是flannelgc的问题

@chenchun
Copy link
Contributor

为什么需要mount containerd的network namespace ?

他的这个问题目的为了解决无法在containerd的情况下运行galaxy的问题 #137

galaxy要想解决containerd下的运行有两个事情要做,一个是containerd netns的问题,另一个是flannelgc的问题

是的

@TomatoAres
Copy link

TomatoAres commented Aug 27, 2021

@Huimintai 已经将这里的改动提交到 TKE Stack,我基于修改后的配置测试:

我在基于 tkeStack 测试升级 k8s 集群时发现:

  • 仅安装containerd 情况下,pod 可以正常运行,但是galaxy 疯狂输出 error 日志
W0827 09:18:24.592703   16035 flannel_gc.go:191] Error inspect container f822aa6890cdbbfe3785f9ca5e1e8b5fec816a96b07c6e5f2579fdd31e0a39c4: Cannot connect to the Docker daemon. Is the docker daemon running on this host?
  • 当前升级依赖docker,在docker 启动时,galaxy 会启动 gc 将 非 hostnetwork pod创建的所有 veth 都删除,导致集群异常
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 52:54:00:6d:3f:f4 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.40/24 brd 10.0.0.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe6d:3ff4/64 scope link
       valid_lft forever preferred_lft forever
3: flannel.1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default
    link/ether 7e:17:ae:16:10:49 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.0/32 scope global flannel.1
       valid_lft forever preferred_lft forever
    inet6 fe80::7c17:aeff:fe16:1049/64 scope link
       valid_lft forever preferred_lft forever
74: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:36:a5:47:1e brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants