Fixes #1793: Move the LINK vflow record from the connector object to …#1794
Fixes #1793: Move the LINK vflow record from the connector object to …#1794ganeshmurthy merged 1 commit intoskupperproject:mainfrom
Conversation
| vflow_set_timestamp_now(connector->vflow_record, VFLOW_ATTRIBUTE_DOWN_TIMESTAMP); | ||
| vflow_set_string(connector->vflow_record, VFLOW_ATTRIBUTE_RESULT, condition_name ? condition_name : "unknown"); | ||
| vflow_set_string(connector->vflow_record, VFLOW_ATTRIBUTE_REASON, condition_description ? condition_description : ""); | ||
| qd_connector_config_t *ctor_config = connector->ctor_config; |
There was a problem hiding this comment.
Is it possible that the loss of the "old" control connection might be registered here and set the OPER_STATUS to "down" even though the "new" control connection is up?
There was a problem hiding this comment.
@ted-ross I made a small addition to the if statement below to compare the tls ordinals to see if the connector's tls ordinal matches the latest tls ordinal from the connector config before setting the oper status to down. Please let me know what you think.
There was a problem hiding this comment.
BTW, I am writing a test for this as well.
There was a problem hiding this comment.
This seems like a clever solution. The only question I have is whether this breaks when the link doesn't use TLS (i.e. there's no SslProfile). However, I don't think a connector would ever be rotated if there wasn't an SslProfile, so this is probably fine.
aae5d4b to
89b90ad
Compare
mgoulish
left a comment
There was a problem hiding this comment.
OK! Everything looks reasonable and straightforward -- I don't yet understand why this fixes the bug, but maybe I can get you to explain later.
Looks good!
| connector->qd_conn = ctx; | ||
| qd_conn->connector = connector; | ||
| connector->qd_conn = qd_conn; | ||
| if (!connector->is_data_connector) { |
There was a problem hiding this comment.
What does this mean that it is not a data connector? Could we have a comment to explain?
There was a problem hiding this comment.
Oh, I see. It means that it's a control connector.
Never mind.
c-kruse
left a comment
There was a problem hiding this comment.
Verified this fixes the bug!
…tor object to connector_config object. This ensures that only one LINK record exists per logical link Signed-off-by: Ganesh Murthy <[email protected]>
…connector_config object. This ensures
that only one LINK record exists per logical link