Skip to content
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

Add 'reconnect' to prdcr_start* to deprecate 'interval' #1240

Merged
merged 1 commit into from
Jul 30, 2023

Conversation

nichamon
Copy link
Collaborator

No description provided.

@@ -334,10 +339,15 @@ attr=<value>
.br
A regular expression
.TP
.BI [interval " interval"]
.BI [reconnect " interval"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should support strings like '20s'. Specifying the reconnect interval in microseconds is pretty silly and error prone. Since we're renaming the attribute, this is the time to do it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll submit the change to support strings in another patch.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put it in this patch. We are logically introducing a 'new' attribute or at least an alias with expanded syntax; this would be the place to get the documentation and the implementation all sync'd up. This patch is already pretty concise.

if (!interval_str) {
interval_str = ldmsd_req_attr_str_value_get_by_id(reqc,
LDMSD_ATTR_INTERVAL);
ovis_log(config_log, OVIS_LWARN, "The 'interval' in "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need these messages in the server.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log message in the server is for the case that the 'interval' attribute is used in configuration files.

@@ -1729,11 +1729,17 @@ static int prdcr_start_handler(ldmsd_req_ctxt_t reqc)

ldmsd_req_ctxt_sec_get(reqc, &sctxt);
interval_str = ldmsd_req_attr_str_value_get_by_id(reqc,
LDMSD_ATTR_INTERVAL);
LDMSD_ATTR_RECONNECT);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a new attribute?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason I added LDMSD_ATTR_RECONNECT is to differentiate between the uses of 'interval' and 'reconnect' in configuration files, so LDMSD could give a warning message that the 'interval' attribute is being deprecated.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @nichamon, I understand, but my suggestion is that the server shouldn't do this, ldmsd_controller, ldmsdctl and the config parsing should.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a patch that gets rid of the new attribute LDMSD_ATTR_RECONNECT and let the parsers for ldmsd_controller, ldmsctl, and config files give the warning about 'interval' being deprecated.

@nichamon nichamon force-pushed the prdcr_start-reconnect branch 2 times, most recently from 4bbcfad to b5caa4f Compare July 29, 2023 16:02
@nichamon nichamon requested a review from tom95858 July 29, 2023 16:07
@tom95858
Copy link
Collaborator

@nichamon, is this pull request obsolete?

@nichamon
Copy link
Collaborator Author

@nichamon, is this pull request obsolete?

No, it is not. I just rebased it on top of OVIS-4, and it is ready to merge.

@tom95858 tom95858 merged commit 51bf312 into ovis-hpc:OVIS-4 Jul 30, 2023
14 checks passed
@nichamon nichamon deleted the prdcr_start-reconnect branch August 30, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants