-
Notifications
You must be signed in to change notification settings - Fork 10
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
Improve frameReceiver initial configuration #335
Conversation
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.
Looks good. My comments / questions are not blockers for me so approving.
this->setup_frame_release_channel(frame_release_endpoint); | ||
config_.frame_release_endpoint_ = frame_release_endpoint; | ||
release_channel_configured = true; | ||
} |
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 ready and release can be configured separately, which is different to the fp. The fp requires that both are given in the same config message. Is this OK? Should we change the fp?
Will anything bad happen if only the frame ready channel is configured?
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.
Yes, the behaviour is slightly different between the two. We can make them the same if necessary - I was trying to avoid touching the FP. I can make the FR require both of them in the same config if we feel this is necessary
In either failure mode we risk a running system failing in the sense that buffers won't cycle through the apps properly due to one or both of those channels not being connected. The FR status will still show its configuration as incomplete until both are configured. Probably comes down to the remaining difference in behaviour between the FR and FP.
I have just tried this against 1.9.0 and it doesn't seem to be a problem. If the file doesn't exist then it errors with a sensible message (which I think is reasonable and better than failing and carrying on):
If file exists and is empty then it just doesn't configure anything, which is probably OK. It would be more complicated to test that we didn't manage to find any valid configs in the file. |
Hmm, that's odd. I can't directly test 1.9.0 on my system as Ubuntu needs later PRs (e.g. #316) to fix boost placeholder issues. But if I run the FP build from the head of master I still get tracebacks:
I agree it should terminate, not try and carry on though. The FR does this - prints an error message and shuts down cleanly. |
Yes I do find the same in my dev version, but for some reason the version we have in prod doesn't... In any case, this
is an exception we explicitly raise here. So I think we just need to either add a catch for |
Ah yes, I was just looking at the same thing on your 1.9.0+dls2 version on /dls_sw . That version predates #317 when the old ini file config was removed so your invocation above is erroring cleanly on failing to parse an old config file, not JSON. I agree, we should catch the |
Yep I think that would be good to do here. |
Looks good. I am happy to merge this and close #323 . Could we then have a 1.9.1 release? |
Thanks. I was thinking of a 1.10.0 release as it's a feature and requires config changes (i.e. FR endpoints in config file). If possible I'd also like to have PR #334 approved and rolled into the next release. |
This commit changes the frameReceiver initial configuration to avoid binding the frame ready & receive channels to default endpoints before configuration is fully applied. This makes the FR behave more like the FP and therefore requires that the endpoints are explicitly defined in configuration.
1d3fad9
to
cb77df9
Compare
This PR improves the frameReceiver initial configuration behaviour to avoid early default configuration of the frame ready and frame release notification endpoints, and to make the overall behaviour more consistent with the frameProcessor.
The ready and release endpoints no longer get bound to default endpoints before any configuration file has been parsed. This avoids a potential clash with a second instance on the same host and allows multiple frame receivers to be started with minimal command-line options prior to client configuration. Note that this change requires the
frame_ready_endpoint
andframe_release_endpoint
parameters to be explicitly configured.Internally, the default FR configuration object has been delegated from the main application to the
FrameReceiverController
instance and no longer sets up default values for endpoints.