Skip to content

Shell commands allow for invalid Property types to be set #3145

@ddanielr

Description

@ddanielr

Describe the bug

When using the accumulo shell to set properties, a user is able to set an invalid property value for value types such as Boolean and Port.

Example:
This property is a boolean type.

TSERV_PORTSEARCH("tserver.port.search", "false", PropertyType.BOOLEAN,
"if the ports above are in use, search higher ports until one is available", "1.3.5"),

However, it can be set to an integer value.

root@uno> config -s tserver.monitor.fs=345                                      
root@uno> config -f tserver.monitor.fs                                          
-----------+--------------------------------------------------------------------+-----------------------------------------------------------------------------------                       
SCOPE      | NAME                                                               | VALUE                            
-----------+--------------------------------------------------------------------+-----------------------------------------------------------------------------------                       
default    | tserver.monitor.fs ............................................... | false
system     |    @override ..................................................... | 345                                                                                                      
-----------+--------------------------------------------------------------------+-----------------------------------------------------------------------------------

Versions (OS, Maven, Java, and others, as appropriate):

  • Affected version(s) of this project: 2.1.x, 1.10.x
  • OS: Centos7
  • Others:

To Reproduce
Steps to reproduce the behavior (or a link to an example repository that reproduces the problem):

  1. Start accumulo Shell
  2. Use the Config Command to find a Boolean or Port Property Type config -f <property>
  3. Use the config -s <property>=<invalid value> command to set that type to an invalid value
  4. Use config -f <property> to show the invalid value is set

Expected behavior
The Shell tool should check the property value and error on invalid values instead of allowing them to be set.

Additional context
I assume that all versions of accumulo have this bug, but I have only checked against 1.10, 2.1, and main.

Metadata

Metadata

Assignees

Labels

bugThis issue has been verified to be a bug.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions