openshift/sdn

append a route to new-cluster-cidr in old container

Closed this issue · 2 comments

I use openshift-sdn with a small cluster-network in my cluster for a long time, now i find that this cluster-network has beed used up
when i want to add more nodes into my cluster.

i change args or update clusternetworks ,anyway ,now i add a new cidr 10.132.0.0/14 in my cluster-network: default

# kubectl  get clusternetwork -oyaml 
apiVersion: v1
items:
- apiVersion: network.openshift.io/v1
  clusterNetworks:
  - CIDR: 10.178.40.0/21
    hostSubnetLength: 10
  - CIDR: 10.132.0.0/14
    hostSubnetLength: 8
  hostsubnetlength: 10
  kind: ClusterNetwork
  metadata:
    creationTimestamp: 2020-07-09T03:04:22Z
    generation: 1
    name: default
    namespace: ""
    resourceVersion: "36528919"
    selfLink: /apis/network.openshift.io/v1/clusternetworks/default
    uid: e3b4a921-c190-11ea-b605-fa163e6fe7d6
  network: 10.178.40.0/21
  pluginName: redhat/openshift-ovs-multitenant
  serviceNetwork: 10.178.32.0/21
  vxlanPort: 4789
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

but as this doc said , node must be delete and re-creating , I have some pod running on these node that can not be shutdown.

Then I found this pr : 38780ce . As I know ,I can restart sdn-agent-pod on node to re-build routes/iptables/openflows for new cidr in clusternetwork, it will not cause my pod-container re-create (it will call reattach method)

But in this way, all existing pods' containers cann't connect to new cidr, because of lack of route to new cidr. Why don't agent inject a route to new cidr into old container when it do reattach container ?

Why don't agent inject a route to new cidr into old container when it do reattach container ?

Because we don't support changing the cluster network without restarting, so therefore there is no need to modify the pod routes because they can't have changed unless you did something unsupported. You're basically just asking "why doesn't the code implement the feature that it doesn't implement".

At this point new development is going into ovn-kubernetes and we are not adding new features to openshift-sdn.

/close

@danwinship: Closing this issue.

In response to this:

Why don't agent inject a route to new cidr into old container when it do reattach container ?

Because we don't support changing the cluster network without restarting, so therefore there is no need to modify the pod routes because they can't have changed unless you did something unsupported. You're basically just asking "why doesn't the code implement the feature that it doesn't implement".

At this point new development is going into ovn-kubernetes and we are not adding new features to openshift-sdn.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.