Page MenuHomeVyOS Platform

vyos 1.2rc8 snmp set error
Closed, InvalidPublic

Description

set service snmp location '-23.136295, -44.170004'

usage: validate-value.py [-h] [--regex REGEX] [--exec EXEC] [--value VALUE]
validate-value.py: error: argument --value: expected one argument

Location is limited to 255 characters or less
Value validation failed
Set failed

[edit]

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close

Event Timeline

syncer triaged this task as Low priority.
hagbard changed the task status from Open to In progress.Nov 20 2018, 9:15 PM

I can't reproduce it @patrickbrandao. can you please detail out of what you did?

vyos@vyos# run sh conf comm
set interfaces ethernet eth0 duplex 'auto'
set interfaces ethernet eth0 hw-id '08:00:27:e3:91:b6'
set interfaces ethernet eth0 smp-affinity 'auto'
set interfaces ethernet eth0 speed 'auto'
set interfaces ethernet eth1 address '10.1.1.222/24'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '08:00:27:fa:3e:50'
set interfaces ethernet eth1 smp-affinity 'auto'
set interfaces ethernet eth1 speed 'auto'
set interfaces loopback lo
set service snmp location '-23.136295, -44.170004'
set service ssh port '22'
set system config-management commit-revisions '100'
set system console device ttyS0 speed '9600'
set system host-name 'vyos'
set system login user vyos authentication encrypted-password '$6$W0nByXvQjV$lA1iOWxicO6yOAEaHXacFChKfNpeTfhDGKOAiiGmmFRjrcVmUOQpcDQWD6fAdpuwmo64QsCX4ttM70nojBUUh.'
set system login user vyos authentication plaintext-password ''
set system login user vyos level 'admin'
set system ntp server 0.pool.ntp.org
set system ntp server 1.pool.ntp.org
set system ntp server 2.pool.ntp.org
set system syslog global facility all level 'info'
set system syslog global facility protocols level 'debug'
set system time-zone 'UTC'

and

vyos@vyos# cat /etc/snmp/snmpd.conf | grep SysLoc
SysLocation -23.136295, -44.170004

@patrickbrandao Can you please let me know how I can reproduce your issue?

syncer edited projects, added Invalid; removed VyOS 1.2 Crux (VyOS 1.2.0-rc9).
syncer added a subscriber: syncer.

Can't reproduce

also tried the same on VyOS 1.2.0-rolling+201811240337, it's ok.

Hello guys.
Unfortunately the syntax error is when typing the command.

works:

set service snmp location Datacenter

works, no space with comma:

set service snmp location "40.856939,29.113135"

works, space with comma::

set service snmp location "40.856939, 29.113136"

works, no space with comma:

set service snmp location 40.856939,29.113137

works:

set service snmp location '-23.136295, -44.170004'

NOT WORKS:

set service snmp location '-23.136295,-44.170003'

NOT WORKS:

set service snmp location -23.136295,-44.170002

Without quotes.
The command interpreted -23.136295, -44.170004 as parameter argument, not as explicit value. The problem is common when using hyphen at the beginning of the value argument.
Perhaps if unknown arguments were treated as a value parameter this would solve and also prevent future problems in other sub-sessions.