I have the following yang code:
module diags {
namespace "http://abc123.com/ns/diags";
prefix diags;
import tailf-common {
prefix tailf;
}
container diags {
description "Diagnostics tools and settings";
tailf:action collect {
description "Collect diagnostics data";
tailf:exec "collect" {
tailf:args "-c $(context) -p $(path)";
}
input {
leaf outfile {
type string;
default "collect.data";
mandatory false;
}
}
}
}
}
The contents of the collect script is as follows:
#!/bin/bash
echo "User $USER is running collect with arguments: $@"
exit 0
This all compiles and loads, but when I enter the following in confd_cli,
request diags collect
I get the following line in the CLI:
Error:
[error]
And the following line in the developer log:
<ERR> 16-Sep-2019::16:20:10.601 jonnydev-1-dev-server confd[19047]: confd osCommand error: /home/jfleming/confd/lib/confd/lib/core/confd/priv/cmdwrapper -I 127.0.0.1 -p 4565 -i 0 -m 9 -G "10,100,1001" -c L2hvbWUvamZsZW1pbmcvY29uZmQvdGVzdA== -U 12 -e -N amZsZW1pbmc= collect Jy1jJyAnY2xpJyAnLXAnICdkaWFncycgIG91dGZpbGUgJ3Frdmlldy5xa3Yn: warning: failed to set secondary groups
I would have expected to see the output of my collect script in the confd_cli session.
I’ve checked my file system, and run the sample code successfully. Am I trying to accomplish the impossible?