os-frr: bgp commands return non-zero exist status
Important notices Before you add a new report, we ask you kindly to acknowledge the following:
- [x] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- [x] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- [x] The title contains the plugin to which this issue belongs
Describe the bug
A clear and concise description of what the bug is, including last known working version (if any).
The BGP panels in Routing > Diagnostics > BGP are blank, and I am seeing errors in the logs related to the bgp command.
Tip: to validate your setup was working with the previous version, use opnsense-revert (https://docs.opnsense.org/manual/opnsense_tools.html#opnsense-revert)
To Reproduce Steps to reproduce the behavior:
- Install
os-frr - Set up BGP routing.
- Add 2 neighbors
- Apply configuration
- Navigate to Routing > Diagnostics > BGP Expected behavior A clear and concise description of what you expected to happen. I should be able to see details under Routing > Diagnostics > BGP > Summary
Screenshots
Relevant log files If applicable, information from log files supporting your claim.
[21b488d4-caac-4974-852c-522932d026a4] Script action failed with Command '/usr/local/bin/vtysh -c 'show bgp neighbors 'json''' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/actions/script_output.py", line 78, in execute subprocess.check_call(script_command, env=self.config_environment, shell=True, File "/usr/local/lib/python3.11/subprocess.py", line 413, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/usr/local/bin/vtysh -c 'show bgp neighbors 'json''' returned non-zero exit status 1.
--
Additional context Add any other context about the problem here.
Environment Software version used and hardware type if relevant.
OPNsense 25.1.3 (amd64). os-frr 1.43_1
Can you check the following outputs from the CLI:
-
/usr/local/bin/vtysh -c 'show bgp neighbors 'json'' -
configctl quagga diagnostics bgp_neighbors json
We need both outputs to find out why it fails.
@Monviech thanks for troubleshooting. It was painfully obvious that I enabled BGP, but I didn't toggle the checkbox under Routing > General. I was in the weeds and completely missed it here https://docs.opnsense.org/manual/dynamic_routing.html#general-setup. This specific is resolved.
@Monviech is that something we should validate?
Missing validation is a larger issue in this plugin. It's hard to start with it at this point in time because there are so many options and who knows how people use it.
I would rather catch the error that invalidates the json output
root@opn-dev-01:/usr/local/etc/caddy # /usr/local/bin/vtysh -c 'show bgp neighbors 'json''
Exiting: failed to connect to any daemons.