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

Cannot configure route when ipv4.enabled == false #1231

Open
fbecker opened this issue Mar 25, 2024 · 4 comments
Open

Cannot configure route when ipv4.enabled == false #1231

fbecker opened this issue Mar 25, 2024 · 4 comments

Comments

@fbecker
Copy link

fbecker commented Mar 25, 2024

What happened:
Static route configuration fails when configuring next-hop-interface to an interface where ip is disabled.

I'm getting the following error from nnce:

NmstateError: InvalidArgument: The next hop interface of desired Route 'destination: 192.168.150.0/24 next-hop-interface: ens224' has been marked as IPv4 disabled

What you expected to happen:
To be able to add a route without a next-hop-interface or configured IP address. Just like

ip route add 192.168.150.0/24 dev ens224

How to reproduce it (as minimally and precisely as possible):

spec:
  desiredState:
    interfaces:
    - name: ens224
      state: up
      type: ethernet
    routes:
      config:
      - destination: 192.168.150.0/24
        next-hop-interface: ens224
@qinqon
Copy link
Member

qinqon commented May 21, 2024

@cathay4t do you know if we have an issue at nmstate for this ?

@cathay4t
Copy link
Member

As the message indicate, you cannot have route on disabled IP stack.

You have to enable IP stack even without address mentioned.

---
routes:
  config:
  - destination: 198.51.100.0/24
    metric: 150
    next-hop-interface: eth1
    table-id: 254
interfaces:
  - name: eth1
    type: ethernet
    state: up
    ipv4:
      enabled: true

@cathay4t
Copy link
Member

On second thought, nmstate should support YAML provided by @fbecker , let generate a patch for it.

#1231 (comment) could be used as workaround.

@cathay4t
Copy link
Member

I have PR nmstate/nmstate#2677 created to support:

---
routes:
  config:
  - destination: 198.51.100.0/24
    metric: 150
    next-hop-interface: eth1
    table-id: 254
interfaces:
  - name: eth1
    type: ethernet
    state: up
    ipv4:
      enabled: true
      address: []

But routes on disabled IP is still invalid use case.

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

No branches or pull requests

3 participants