-
Notifications
You must be signed in to change notification settings - Fork 451
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
[BUG] Unable to start on Talos Linux #4526
Comments
Hey @nniehoff! 👋 I'm here to help you with your Kube-OVN issue. I can assist with bug fixes, answer questions, and guide you on how to contribute. The error you're encountering is likely due to missing permissions or capabilities required by the
By following these steps, you should be able to resolve the issue and get the |
I have tried these exact suggestions provided by @dosu, however, they do not resolve the issue |
The issue might be due to missing Ensure that the initContainers:
- name: hostpath-init
image: "$REGISTRY/kube-ovn:$VERSION"
command:
- sh
- -xec
- |
chown -R nobody: /var/run/ovn /var/log/ovn /etc/openvswitch /var/run/openvswitch /var/log/openvswitch
iptables -V
securityContext:
allowPrivilegeEscalation: true
capabilities:
drop:
- ALL
privileged: true
runAsUser: 0
runAsGroup: 0
volumeMounts:
- mountPath: /usr/local/sbin
name: usr-local-sbin
- mountPath: /var/log/ovn
name: host-log-ovn
- mountPath: /var/run/ovn
name: host-run-ovn
- mountPath: /etc/openvswitch
name: host-config-openvswitch
- mountPath: /var/run/openvswitch
name: host-run-ovs
- mountPath: /var/log/openvswitch
name: host-log-ovs These settings should allow the necessary permissions for the DaemonSets to start correctly on Talos Linux [1]. |
@dosu running iptables in the init container has the same securityContext:
allowPrivilegeEscalation: true
capabilities:
allow:
- ALL
privileged: true
runAsUser: 0
runAsGroup: 0 with no luck. |
The initContainers:
- name: hostpath-init
image: "$REGISTRY/kube-ovn:$VERSION"
command:
- sh
- -xec
- |
chown -R nobody: /var/run/ovn /var/log/ovn /etc/openvswitch /var/run/openvswitch /var/log/openvswitch
iptables -V
securityContext:
allowPrivilegeEscalation: true
capabilities:
add:
- NET_ADMIN
- NET_BIND_SERVICE
- NET_RAW
- SYS_ADMIN
- CAP_SYS_PTRACE
- SYS_MODULE
- SYS_NICE
privileged: true
runAsUser: 0
runAsGroup: 0
volumeMounts:
- mountPath: /usr/local/sbin
name: usr-local-sbin
- mountPath: /var/log/ovn
name: host-log-ovn
- mountPath: /var/run/ovn
name: host-run-ovn
- mountPath: /etc/openvswitch
name: host-config-openvswitch
- mountPath: /var/run/openvswitch
name: host-run-ovs
- mountPath: /var/log/openvswitch
name: host-log-ovs Ensure that the |
it occured to me to try symlinking iptables to /bin/true as is done for several other utilities that can't be used in talos however I have the same results with
|
To resolve the "Operation not permitted" error for Here is the relevant part of the DaemonSet configuration: containers:
- name: openvswitch
image: "{{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.repository }}:{{ .Values.global.images.kubeovn.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/kube-ovn/start-ovs.sh"]
securityContext:
runAsUser: 0
privileged: true
capabilities:
add:
- NET_ADMIN
- NET_BIND_SERVICE
- SYS_MODULE
- SYS_NICE
- SYS_ADMIN Ensure that the |
@dosu tried this, however, it doesn't resolve the problem |
To resolve the "Operation not permitted" error for Here is the relevant section of the DaemonSet configuration with the necessary capabilities added: kind: DaemonSet
apiVersion: apps/v1
metadata:
name: ovs-ovn
namespace: kube-system
annotations:
kubernetes.io/description: |
This daemon set launches the openvswitch daemon.
spec:
selector:
matchLabels:
app: ovs
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: ovs
component: network
type: infra
spec:
tolerations:
- effect: NoSchedule
operator: Exists
- effect: NoExecute
operator: Exists
- key: CriticalAddonsOnly
operator: Exists
priorityClassName: system-node-critical
serviceAccountName: ovn-ovs
hostNetwork: true
hostPID: true
containers:
- name: openvswitch
image: "$REGISTRY/kube-ovn:$VERSION"
imagePullPolicy: $IMAGE_PULL_POLICY
command: ["/kube-ovn/start-ovs.sh"]
securityContext:
runAsUser: 0
privileged: true
capabilities:
add:
- NET_ADMIN
- NET_BIND_SERVICE
- SYS_MODULE
- SYS_NICE
- SYS_ADMIN
env:
- name: ENABLE_SSL
value: "$ENABLE_SSL"
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: OVN_DB_IPS
value: $addresses
- name: OVN_REMOTE_PROBE_INTERVAL
value: "10000"
- name: OVN_REMOTE_OPENFLOW_INTERVAL
value: "180"
volumeMounts:
- mountPath: /var/run/netns
name: host-ns
mountPropagation: HostToContainer
- mountPath: /lib/modules
name: host-modules
readOnly: true
- mountPath: /var/run/openvswitch
name: host-run-ovs
- mountPath: /var/run/ovn
name: host-run-ovn By adding the |
I get an error on the Daemonset that says: |
@nniehoff
I tried quite a few things and got this workaround - I'm not content with it, but at least it works for now in my test lab. What I did:
kubectl -n kube-system edit ds ovs-ovn
...
spec:
containers:
- command:
- /kube-ovn/start-ovs.sh
image: docker.io/kubeovn/kube-ovn:v1.12.28
name: openvswitch
securityContext:
capabilities:
add:
- NET_ADMIN
- NET_BIND_SERVICE
- SYS_NICE
- SYS_ADMIN
privileged: true
runAsUser: 0
... EDIT: I have to clarify, only the ovs-ovn daemonset works with this; the pods are running, however (I'm guessing becuase of the version mismatch) the other daemonsets and deployments stop working. |
I'm still getting an error, but I think that the paths are correct. I've already added the kernel parameter for openvswitch.
These are the values I'm feeding the Helm chart:
|
I got the same problem |
Kube-OVN Version
v1.13.0
Kubernetes Version
v1.31.1
Operation-system/Kernel Version
Talos (v1.7.6)
6.6.43-talos
Description
When the
ovs-ovn
daemonset tries to start theopenvswitch
container fails to start with this error:I have tried changing the securityContext to run this container privileged and as root but it still has this error.
Steps To Reproduce
I have followed the directions in the chart README I used a different path for
OPENVSWITCH_DIR
andOVN_DIR
but I believe this should still work as I believe the primary intention is to move this path to a writeable path under /var.Current Behavior
Pods in both
ovs-ovn
andkube-ovn-cni
DaemonSets fail to start correctlyExpected Behavior
Pods should be running and healthy
The text was updated successfully, but these errors were encountered: