Page MenuHomeVyOS Platform

SNMPv3 set by HTTP API failed
Open, NormalPublicBUG

Description

Forum user got a SNMPv3 set problem when set SNMPv3 related entries.

I got perl locale warning and the set failed.

curl --request POST ‘http://localhost/configure’ --form data=‘{“op”: “set”, “path”: [“service”, “snmp”,“v3”,“user”,“user2”,“group”,“default”]}’ --form key=‘webkey’

And got error as follow:

{“success”: false, “error”: “perl: warning: Setting locale failed.\nperl: warning: Please check that your locale settings:\n\tLANGUAGE = (unset),\n\tLC_ALL = (unset),\n\tLC_CTYPE = "C.UTF-8",\n\tLANG = "en_US.UTF-8"\n are supported and installed on your system.\nperl: warning: Falling back to the standard locale ("C").\n[[service snmp]] failed\nCommit failed\n”, “data”: null}

It is no problem by using configure CLI. There is no problem to set any SNMPv2 date by HTTP API.

Most likely this is realted to https://github.com/vyos/vyos-1x/commit/7e0e8101998a6c8de6cb93c42bfbf1278c13f226

Details

Difficulty level
Unknown (require assessment)
Version
vyos-1.5-rolling-202408062043
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)
Forum thread
https://forum.vyos.io/t/snmpv3-set-by-http-api-failed/15163

Event Timeline

c-po assigned this task to jestabro.
c-po triaged this task as Normal priority.
c-po updated the task description. (Show Details)

Also reported:
https://forum.vyos.io/t/container-set-by-http-api-failed/15248/2

curl --request POST 'http://127.0.0.1/configure' --form data='{ "op": "set", "path": [ "container", "name", "hello", "image", "hello-world" ] }' --form key='xxxx'
{"success": false, "error": "perl: warning: Setting locale failed.....

I am not yet able to reproduce this in either case. @c-po suggestion of an interaction with the introduction of vyos.utils.configfs is quite reasonable, but I have not reproduced in current rolling or an image earlier than the recent changes (T6633, T6640) to resolve T6639. I've asked the forum user of the second report for further information.