Bug 2170344

Summary: ovs-vsctl autocomplete misbehaving
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Martin Necas <mnecas>
Component: openvswitchAssignee: Timothy Redaelli <tredaelli>
openvswitch sub component: daemons and tools QA Contact: qding
Status: ASSIGNED --- Docs Contact:
Severity: low    
Priority: unspecified CC: ctrautma, jhsiao
Version: RHEL 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Necas 2023-02-16 08:12:10 UTC
Description of problem:
When adding a port to some bridge and pressing the tab for autocomplete, the ovs-vsctl throws an error. 




Version-Release number of selected component (if applicable):
[root@ovs ~]# ovs-vsctl --version
ovs-vsctl (Open vSwitch) 2.17.6
DB Schema 8.3.0

How reproducible:


Steps to Reproduce:
1. ovs-vsctl add-port mybridge 
2. *press tab*

Actual results:

[root@ovs ~]# ovs-vsctl add-port mybridge enp-bash: export: `BASH_FUNC_which%%': not a valid identifier
-bash: export: `${which_declare}': not a valid identifier
-bash: export: `)': not a valid identifier
-bash: export: `|': not a valid identifier
-bash: export: `/usr/bin/which': not a valid identifier
-bash: export: --: invalid option
export: usage: export [-fn] [name[=value] ...] or export -p
-bash: export: --: invalid option
export: usage: export [-fn] [name[=value] ...] or export -p
-bash: export: --: invalid option
export: usage: export [-fn] [name[=value] ...] or export -p
-bash: export: --: invalid option
export: usage: export [-fn] [name[=value] ...] or export -p
-bash: export: --: invalid option
export: usage: export [-fn] [name[=value] ...] or export -p
-bash: export: `$@': not a valid identifier
-bash: export: `}': not a valid identifier

Enter a new port:
[root@ovs ~]$ ovs-vsctl add-port mybridge enp^C



Expected results:


Additional info:

Comment 1 Timothy Redaelli 2023-05-26 14:20:02 UTC
I can replicate that also on latest master version and it seems the reason is that something changed on bash for shellshock, the bash completion script should be definitely fixed