Skip to content

Recipe: PMDB Client Error Demonstration Standalone Client

Paul Nowoczynski edited this page Jan 7, 2021 · 1 revision

Objective

“PMDB Client Error Demonstration w/ standalone client” which checks the input options to the pmdb client. This recipe may not use the Holon library in the typical way since the client instances are expected to fail. Instead, the client process should be run directly from Ansible.

Default Parent Recipe: None

1 - Executing the Client with Malformed UUIDs

In this case, the -u option has had its UUID truncated by one hex character. This should cause the client to exit due to the UUID parsing error. Both the -r and -u option should have recipe sub cases.what

$ NIOVA_LOCAL_CTL_SVC_DIR=/var/tmp/3f266232-fde4-11ea-86f8-90324b2d1e89.raft_config/ NIOVA_LOG_LEVEL=2 ./pumicedb-client-test -a -r 3f266232-fde4-11ea-86f8-90324b2d1e89 -u 3f28d148-fde4-11ea-9c5f-90324b2d1e8 
<53649.235056235:warn:pumicedb-client:env_parse@204> env-var NIOVA_LOCAL_CTL_SVC_DIR value /var/tmp/3f266232-fde4-11ea-86f8-90324b2d1e89.raft_config/ applied from environment
<53649.239490794:warn:raft_client:raft_net_instance_startup@640> raft_net_conf_init(): Invalid argument
<53649.239531511:fatal:raft_client:raft_client_thread@1874> raft_net_instance_startup(): Invalid argument
Aborted (core dumped)
$ echo $?
134

For now it’s ok if the error code is not equal to 134 as long as it’s non-zero.

2 - Checking Binary Parameters

Usage: ./pumicedb-client-test [-a (use async requests)] -r <UUID> -u <UUID>
  1. Please verify that the binary fails when either -r and -u are missing.
  2. Ensure that unspecified options cause the program to fail.

3 - Unknown UUIDs

Run the client with correctly formed UUIDs which are not known to the configuration. Here I’ve switched the last two chars of the UUID from 89 -> 90.

$ NIOVA_LOCAL_CTL_SVC_DIR=/var/tmp/3f266232-fde4-11ea-86f8-90324b2d1e89.raft_config/ NIOVA_LOG_LEVEL=2 ./pumicedb-client-test -a 1 -r 3f266232-fde4-11ea-86f8-90324b2d1e89 -u 3f2939da-fde4-11ea-8ebf-90324b2d1e90
<54082.154055473:warn:pumicedb-client:env_parse@204> env-var NIOVA_LOCAL_CTL_SVC_DIR value /var/tmp/3f266232-fde4-11ea-86f8-90324b2d1e89.raft_config/ applied from environment
<54082.158689768:error:raft_client:raft_net_conf_init@514> ctl_svc_node_lookup() failed to find self UUID=3f2939da-fde4-11ea-8ebf-90324b2d1e90
Please check the local-control-service directory: /var/tmp/3f266232-fde4-11ea-86f8-90324b2d1e89.raft_config/
<54082.158752646:warn:raft_client:raft_net_instance_startup@640> raft_net_conf_init(): No such file or directory
<54082.158777352:fatal:raft_client:raft_client_thread@1874> raft_net_instance_startup(): No such file or directory
Aborted (core dumped)
Clone this wiki locally