Page MenuHomeVyOS Platform

Shell autocomplete of option (config node) with quoted value doesn't work
Closed, ResolvedPublicBUG

Description

For example:

[edit interfaces openvpn vtun0]
vyos@vyos# show 
(...)
 openvpn-option "tls-crypt /config/auth/tls-auth.key"
(...)
[edit interfaces openvpn vtun0]
vyos@vyos# delete openvpn-option [I pressed Tab here] vbash: ${/config/auth/tls-auth.key[@]}: bad substitution

Possible completions:
   tls-crypt    
   /config/auth/tls-auth.key
                

      
[edit interfaces openvpn vtun0]
vyos@vyos# delete openvpn-option

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-202002161109
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

jjakob created this task.Feb 26 2020, 3:07 PM
jjakob created this object in space S1 VyOS Public.
jjakob renamed this task from utocomplete option (config node) with quoted value to Shell autocomplete of option (config node) with quoted value doesn't work.Feb 26 2020, 3:11 PM
jjakob updated the task description. (Show Details)
jjakob changed Version from - to 1.3-rolling-202002161109.
c-po added a subscriber: c-po.EditedFeb 26 2020, 5:09 PM

Thats the downside of those nodes which allow passing raw values down the config. I never liked them and they should be removed. The CLI should be extended to support the raw options instead.

Also passing wrong/invalid option will break OpenVPN.

Why not use the real CLI command to pass the TLS cert?

jjakob added a comment.EditedFeb 26 2020, 5:36 PM

I personally don't mind the raw options, and there are other people using them too (T127, T1246, T1383, T1421, T1430).
There is no option for tls-crypt, just tls-auth. Also I'm experimenting with the various mtu options (tun-mtu, link-mtu, mssfix, fragment) and keepalive options (ping-restart, ping) that can't be set through the existing keepalive options (keepalive doesn't take 0 as a value if I want ping-restart 0 for example, and there's no way to not have keepalive be set with default vaules). So yeah, if all of these options were integrated, I personally wouldn't need the openvpn-options. But I think there are other places that use raw values with quotes that are affected by the autocompletion bug too, dhcp-server for example.

c-po added a comment.Feb 26 2020, 6:54 PM

Yes there are definately other places like DHCP.

Would it make sense to add a „tls crypt-file“ CLI option?

c-po added a comment.Feb 27 2020, 5:02 PM

For TLS crypt please see T2075

pasik added a subscriber: pasik.Feb 27 2020, 5:30 PM
jjakob changed the task status from Open to In progress.Feb 29 2020, 2:47 PM
jjakob claimed this task.
jjakob triaged this task as Normal priority.
jjakob moved this task from Need Triage to In Progress on the VyOS 1.3 Equuleus board.
syncer changed the subtype of this task from "Task" to "Bug".Mar 16 2020, 12:32 AM
jjakob changed the task status from In progress to On hold.Mar 20 2020, 9:29 AM

The above commit fixes value help on tab (it displays correct quoted values, the script doesn't error any more) but the completion itself is still broken.

c-po closed this task as Resolved.Mar 21 2020, 12:43 PM
c-po moved this task from In Progress to Finished on the VyOS 1.3 Equuleus board.Mar 22 2020, 8:52 AM
jjakob reopened this task as In progress.Apr 2 2020, 4:39 PM
jjakob moved this task from Finished to In Progress on the VyOS 1.3 Equuleus board.

This PR still needs to be merged: https://github.com/vyos/vyatta-cfg/pull/23

jjakob closed this task as Resolved.Apr 2 2020, 5:10 PM
jjakob moved this task from In Progress to Finished on the VyOS 1.3 Equuleus board.