-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dump current running ldmsd configuration #1203
Conversation
@tom95858 @nichamon @narategithub Hey guys, would you mind reviewing this? I don't think I can add reviewers to ovis PR's. |
Please revise to dump result to stdout if path is not specified. Dumping to a home directory is relatively uncommon and surprising for utilities (destroys whatever data may already be there by the same name). Also please update affected man pages and include documentation changes with the commit. |
if (listen->auth_dom_name) | ||
fprintf(fp, " auth=%s", listen->auth_dom_name); | ||
else | ||
fprintf(fp, " auth=DEFAULT"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need the else here. If no authentication is specified, the default auth will be used automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason this is included is because this configuration assumes that no configuration options will be specified when starting a ldmsd with the "dumped" configuration files. I meant to make a note of this in the top of each configuration file, but dropped the ball. I'm open to a discussion about whether this is the correct approach or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including auth=DEFAULT is not wrong as long as the generated config file includes a line auth_add name=DEFAULT <other necessary attr-value pairs>
. I think this is what your code does, so it is OK to have auth=DEFAULT
in the listen
line.
Here is the explanation of how ldmsd creates the default authentication domain and how listen
and prdcr_add
work regarding the auth cmd-line options. ldmsd always automatically adds the default authentication. The -a
command-line option is to specify the auth method, e.g., munge and ovis.
ldmsd
ldmsd -x sock:10001
ldmsd -c ldmsd.conf
andldmsd.conf
containslisten xprt=sock port=10001
.
The three ldms daemons started by the above commands have the same default authentication, which uses 'auth_none.' The last two ldms daemons listen on the same port, using the same transport and the same default authentication.
@nick-enoent Please add the new command to |
@nick-enoent there are several plugins that use the keywords as well as the key=value, so keyword list should be captured. |
Command dump_cfg added to ldmsd_controller and ldmsd_communicator. Writes the current running configuration to a file named after the daemon's host and communication port, <hostname>-<port>.conf, in path specified in argument. If no path is specified it writes the file to the user's home path. Parameters: path - [optional] The path to the configuration file
Adds "dump_cfg" command to ldmsd_controller and function to ldmsd_communicator to write the current running configuration of a ldmsd in v4 configuration format. The file name will be the hostname and port number used to communicate with the ldmsd, e.g. node-10-10001.conf.
Parameters:
path - path to write the configuration file. If not specified, ldmsd will write to the calling users home directory.