Page MenuHomeVyOS Platform

Disabling a DHCP interface with no address displays an error
Closed, ResolvedPublicBUG

Description

SUMMARY

If a DHCP interface fails to get an IP address, deleting the interface results in a bash script error.

STEPS TO REPRODUCE

  1. Start a Vyos ISO on a LAN with no DHCP server
  2. Login
  3. Run the following commands:

__

configure
set interfaces ethernet eth0 address dhcp
commit
delete interfaces ethernet
commit

OBSERVED RESULT

[ interfaces ethernet eth0 address dhcp ]
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information

[edit]

EXPECTED RESULT

[edit]

SOFTWARE/OS VERSIONS

vyos-1.2.0-rolling+201905200337-amd64.iso

ADDITIONAL INFORMATION

This is caused by the vyatta-address script in vyatta-cfg-system assuming it will always get an address out of a "ip address show".

Details

Difficulty level
Easy (less than an hour)
Version
1.2.0-rolling+201905200337
Why the issue appeared?
Design mistake

Event Timeline

The above patch should fix the issue.

c-po changed the task status from Open to Backport pending.May 20 2019, 3:26 PM
c-po triaged this task as Normal priority.
c-po added a project: VyOS 1.3 Equuleus.
c-po changed Why the issue appeared? from Will be filled on close to Design mistake.
c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.

Thank you @wsapplegate for the contribution. Please test with the next rolling release.

Confirmed fixed in vyos-1.2.0-rolling+201905210337

c-po moved this task from Need Triage to VyOS 1.2.2 on the VyOS 1.2 Crux board.
c-po edited projects, added VyOS 1.2 Crux (VyOS 1.2.2); removed VyOS 1.2 Crux.
c-po moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.2) board.