Page MenuHomeVyOS Platform

interface ip address config missing after upgrade from 1.2.8 to 1.3.0 (when redirect is configured?)
Closed, ResolvedPublicBUG

Description

This configuration was missing after upgrading from 1.2.8 to 1.3.0

set interfaces ethernet eth0 duplex 'auto'
set interfaces ethernet eth0 hw-id '00:50:56:xx:xx:xx'
set interfaces ethernet eth0 smp-affinity 'auto'
set interfaces ethernet eth0 speed 'auto'
set interfaces ethernet eth0 vif 42 address '192.168.220.38/27'
set interfaces ethernet eth0 vif 42 address '192.168.220.124/32'
set interfaces ethernet eth0 vif 42 address '192.168.220.125/32'
set interfaces ethernet eth0 vif 42 address '192.168.220.126/32'
set interfaces ethernet eth0 vif 42 address '192.168.220.127/32'
set interfaces ethernet eth0 vif 42 description 'OUTSIDE'
set interfaces ethernet eth0 vif 42 firewall in name 'IN-ETH0'
set interfaces ethernet eth0 vif 42 firewall out name 'OUT-ETH0'
set interfaces ethernet eth0 vif 42 redirect 'ifb042'
set interfaces ethernet eth0 vif 42 traffic-policy out 'WAN-OUT'

The resolution might be:

  • Roll back to 1.2.8
  • Delete 1.3.0 image
  • delete interfaces ethernet eth0 vif 42 redirect, and then commit and save.
  • install 1.3.0 image again

Now it seems to load properly.

Details

Difficulty level
Unknown (require assessment)
Version
1.3.0
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

Can confirm the problem.
Also, when bootting on 1.3.0 version, and trying to load pre-migration config file, it's also not possible.
Removing "redirect" entry from pre-migration file, configurations loads correctly.
Once configuration was loaded, "redirect" command con be inserted once again in cli, and it is accepted.

VyOS 1.4

set interfaces input ifb042
set interfaces ethernet eth0 vif 42 address 203.0.113.47/32
set interfaces ethernet eth0 vif 42 redirect 'ifb042'



[email protected]# commit
[ interfaces ethernet eth0 vif 42 redirect ifb042 ]
Cannot find device "eth0.42"
tc qdisc ingress failed at /opt/vyatta/sbin/vyatta-qos.pl line 334.

[[interfaces ethernet eth0]] failed
Commit failed
[edit]
[email protected]#

Explanation on how to reproduce this error:

  • On fresh install on 1.2.8 (more parameter may be needed to be able to upgrade router):
set interfaces input ifb042
set interfaces ethernet eth0 vif 42 address 203.0.113.47/32
set interfaces ethernet eth0 vif 42 redirect 'ifb042'

Then add and install 1.3.0 vyos image, and reboot.

After reboot, this is the config loaded in router:

[email protected]:~$ show config comm
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '0c:32:59:be:00:01'
set interfaces ethernet eth1 offload gro
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth2 duplex 'auto'
set interfaces ethernet eth2 hw-id '0c:32:59:be:00:02'
set interfaces ethernet eth2 offload gro
set interfaces ethernet eth2 speed 'auto'
set interfaces ethernet eth3 duplex 'auto'
set interfaces ethernet eth3 hw-id '0c:32:59:be:00:03'
set interfaces ethernet eth3 offload gro
set interfaces ethernet eth3 speed 'auto'
set interfaces input ifb042
set interfaces loopback lo

And, content of /config/config.boot:

[email protected]:~$ less /config/config.boot
interfaces {
    ethernet eth0 {
        offload {
            gro { }
        }
        address "dhcp"
        duplex "auto"
        hw-id "0c:32:59:be:00:00"
        speed "auto"
        vif 42 {
            address "203.0.113.47/32"
            redirect "ifb042"
        }
    }
## ... More config:
    input     ifb042 { }

When trying to load configuration from config.boot files, we get the following:

[email protected]# load /config/config.boot
Loading configuration from '/config/config.boot'
Load complete. Use 'commit' to make changes effective.
[edit]
[email protected]# compare
[edit interfaces]
+ethernet eth0 {
+    address dhcp
+    duplex auto
+    hw-id 0c:32:59:be:00:00
+    offload {
+        gro
+    }
+    speed auto
+    vif 42 {
+        address 203.0.113.47/32
+        redirect ifb042
+    }
+}
[edit]
[email protected]# commit
[ interfaces ethernet eth0 vif 42 redirect ifb042 ]
Cannot find device "eth0.42"
tc qdisc ingress failed at /opt/vyatta/sbin/vyatta-qos.pl line 334.

[[interfaces ethernet eth0]] failed
Commit failed

Problem: not able to add vif and redirect in 1 commit.
Solution:

  1. Add vif and commit.
  2. Add redirect and commit
Viacheslav changed the task status from Open to In progress.Feb 22 2022, 4:07 PM
Viacheslav claimed this task.

Adding priority >=615 should fix it

[email protected]# sudo cat /opt/vyatta/share/vyatta-cfg/templates/interfaces/ethernet/node.tag/vif/node.tag/redirect/node.def
type: txt
priority: 615
help: Incoming packet redirection destination
allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=input
Viacheslav reopened this task as Backport candidate.Mar 11 2022, 6:32 PM
Viacheslav moved this task from Need Triage to Backport Candidates on the VyOS 1.4 Sagitta board.