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

The pod is failed to created using Kube-ovn and multus-cni to create second network interface which the binding subnet has its own custom vpcs(not default ovn-cluster) #1696

Closed
JING21 opened this issue Jul 15, 2022 · 4 comments · Fixed by #1703
Assignees
Labels
question Further information is requested

Comments

@JING21
Copy link

JING21 commented Jul 15, 2022

Expected Behavior

Create the pod correctly with the kube-ovn as the attached network interface

Actual Behavior

Can not create pod and it turns out ping gw failed
image

Steps to Reproduce the Problem

  1. create a vpc
  2. create a subnet with custom vpc
  3. create the nad with subnet
    4.create the pod with nad

Additional Info

  • Kubernetes version:

Output of kubectl version:

v1.22.9
  • kube-ovn version:

    v1.10.2
    
  • operation-system/kernel version:

    Output of awk -F '=' '/PRETTY_NAME/ { print $2 }' /etc/os-release:
    Output of uname -r:

    4.19.0-193.1.13.el8
    
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: z500
  namespace: test
spec:
  config: '{
      "cniVersion": "0.3.1",
      "type": "kube-ovn",
      "server_socket": "/run/openvswitch/kube-ovn-daemon.sock",
      "provider": "z500.test.ovn",
      "plugins": [{"type": "sbr"}]
    }'
apiVersion: kubeovn.io/v1
kind: Subnet
metadata:
  name: z500
spec:
  protocol: IPv4
  vpc: z500
  provider: z500.test.ovn
  cidrBlock: 35.35.0.0/16
  gateway: 35.35.0.1
  excludeIps:
  - 35.35.0.0..35.35.0.10
kind: Vpc
apiVersion: kubeovn.io/v1
metadata:
  name: z500
spec:
  namespaces:
  - test
apiVersion: v1
kind: Pod
metadata:
  name: samplepod9k9k
  namespace: test
  annotations:
    k8s.v1.cni.cncf.io/networks: test/z500
spec:
  containers:
  - args:
    - sleep
    - "3600"
    image: registry.cim/library/busybox:1.28
    name: busybox-pod1
@oilbeater oilbeater added the question Further information is requested label Jul 18, 2022
@oilbeater oilbeater moved this to Todo in v1.11-s5 Jul 18, 2022
@xujunjie-cover
Copy link
Member

subnet's name and vpc's name can't be same.
will create lsp and lrp for gw when create subnet. <subnet's name>-<vpc's name>, <vpc's name>-<subnet's name>;
names must be different.

@JING21

@JING21
Copy link
Author

JING21 commented Jul 18, 2022

subnet's name and vpc's name can't be same. will create lsp and lrp for gw when create subnet. <subnet's name>-<vpc's name>, <vpc's name>-<subnet's name>; names must be different.

@JING21

Thank u for ur replying. I got an another problem is that I use nad and multus-cni as pod second network interface. The subnet is dual mode, and it turns out the pod-creating failed which the log shows that index out of range of the gateway string

@JING21
Copy link
Author

JING21 commented Jul 18, 2022

The pod yaml file is :

apiVersion: v1
kind: Pod
metadata:
  name: samplepod9k9k
  namespace: test
  annotations:
    k8s.v1.cni.cncf.io/networks: test/z9999
spec:
  containers:
  - args:
    - sleep
    - "3600"
    image: registry.cim/library/busybox:1.28
    name: busybox-pod1

The subnet yaml file

apiVersion: kubeovn.io/v1
kind: Subnet
metadata:
  creationTimestamp: "2022-07-17T08:02:58Z"
  finalizers:
  - kube-ovn-controller
  generation: 3
  name: z9999
  resourceVersion: "1084789"
  selfLink: /apis/kubeovn.io/v1/subnets/z9999
  uid: 12eb8922-1a8d-4dd4-9a8c-e02cda421239
spec:
  cidrBlock: 155.17.16.0/24,fd00:50:32::/64
  default: false
  dhcpV4Options: ""
  dhcpV6Options: ""
  disableGatewayCheck: false
  disableInterConnection: false
  enableDHCP: false
  enableIPv6RA: false
  excludeIps:
  - fd00:50:32::1
  - 155.17.16.1
  gateway: 155.17.16.1,fd00:50:32::1
  gatewayNode: ""
  gatewayType: distributed
  ipv6RAConfigs: ""
  logicalGateway: false
  namespaces:
  - test
  natOutgoing: false
  private: false
  protocol: Dual
  provider: z9999.test.ovn
  vpc: ovn-cluster
status:
  activateGateway: ""
  conditions:
  - lastTransitionTime: "2022-07-17T08:03:00Z"
    lastUpdateTime: "2022-07-17T08:03:23Z"
    reason: ResetLogicalSwitchAclSuccess
    status: "True"
    type: Validated
  - lastTransitionTime: "2022-07-17T08:03:09Z"
    lastUpdateTime: "2022-07-17T08:03:09Z"
    reason: ResetLogicalSwitchAclSuccess
    status: "True"
    type: Ready
  - lastTransitionTime: "2022-07-17T08:03:00Z"
    lastUpdateTime: "2022-07-17T08:03:00Z"
    message: Not Observed
    reason: Init
    status: Unknown
    type: Error
  dhcpV4OptionsUUID: ""
  dhcpV6OptionsUUID: ""
  v4availableIPs: 251
  v4usingIPs: 2
  v6availableIPs: 1.8446744073709552e+19
  v6usingIPs: 2

The pod description
image
The code is here?
image

The log of cni shows it can get the dual ipv4 and ipv6 ip address correctly
image

Here are the problem. @xujunjie-cover

@xujunjie-cover
Copy link
Member

Something wrong,I will repair. @JING21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants