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

Reinstate "SubscriberUrl" in SubscriptionDef definitions as the main URL configuration mechanism #35

Closed
rtobar opened this issue Nov 25, 2020 · 1 comment
Labels

Comments

@rtobar
Copy link
Contributor

rtobar commented Nov 25, 2020

NGAS has a feature through which, at startup, a server can create (and later destroy, at shutdown) subscription from external NGAS servers. This feature is governed by the SubscriptionDef XML element of the configuration file, which allows multiple subscription specifications (i.e., the servers where data will be received from) to be given via their respective Subscription XML sub-elements.

When a server A processes a Subscription element to create a subscription for data from B, B must be given a URL that points to A so that it can successfully push data. This URL was historically specified using the SubscriberUrl attribute of the Subscription element. In 1fd12a0 this changed though and a new, simpler Command attribute was introduced. The attribute should only contain the command to invoke on A, while the full URL would be automatically calculated by the code. The reasoning for this change was:

Users should not need to specify the full URL in the configuration file, because that will depend on the IpAddress that is set in the Server element (and in the NAT/reverse proxy information that we need to add to the server as well).

In other words, specifying A's own URL on each of its Subscription elements was deemed as duplicate, and potentially conflicting, information.

In principle this makes sense, but it has presented at least two different problems:

  • The current implementation breaks when the IpAddress element is set to 0.0.0.0. In such cases we can only guess what the correct IP should be used to construct the URL.
  • The commit quoted above talked about handling NAT/reverse proxy information, but this has never been implemented.

Of these two, the first problem is more urgent than the second. And in both cases the problem can be solved by reinstating SubscriberUrl as the main mechanism to feed A's URL into B, even if that means duplicating some information. We will thus perform this change, but still letting Command be specified and used if the former is not specified.

This issue was originally pointed out by @smclay.

rtobar added a commit that referenced this issue Nov 27, 2020
As pointed out in #35, changing the code to use the Command attribute
removed some of the flexibility that was previously possible when using
SubscriberUrl. We are thus reinstating the old option as the main one,
but still leaving Command available with the known caveats.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
@rtobar
Copy link
Contributor Author

rtobar commented Jan 11, 2021

This issue has been fixed, tested by @smclay, and since then merged to the master branch.

@rtobar rtobar closed this as completed Jan 11, 2021
@rtobar rtobar added the bug label Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant