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

Revist address_root != "observatory" #327

Merged
merged 15 commits into from
May 16, 2023
Merged

Revist address_root != "observatory" #327

merged 15 commits into from
May 16, 2023

Conversation

mhasself
Copy link
Member

Description

The address_root has always been set to observatory in OCS installations. But this prefix is configurable in the SCF, and for the most part wasn't hard-coded anywhere in ocs (nor socs).

I have removed a small number of hard-coded occurrences of observatory.. These were in the feed subscription wildcards the registry, aggregator and influxdbpublisher.

The address_root was intended to be user configurable; I consider this to be a bugfix.

Some additional changes along the way:

  • I have purged references to the "registry_address" setting in SCF, which actually has been obsolete for a long time.
  • InfluxDBPublisher agent is slightly modified, so it will exit on SIGINT (ctrl-c) while failing to find the influxdb server.
  • ocs-local-support code is fixed to distinguish correctly between (a) crossbar is down (b) crossbar is up but realm and/or prefix are mismatched (c) crossbar is up and respon

Motivation and Context

At the observatory we'll have a few very similar systems, e.g. sat1 and sat2, running as independent OCS instances. In some situations (influxdb and grafana, primarily) we will have data from all systems available, and so the feeds can't have the exact same names. That means we either need to carefully include "sat1" / "sat2" in every instance-id ... e.g. "observatory.sat1_acu", "observatory.sat2_acu" OR take advantage of the configurable prefix and have the agent addresses be "sat1.acu", "sat2.acu".

How Has This Been Tested?

I ran an OCS setup on a single host, with all the affected agents, plus a fake data agent. Confirmed I could see the data appear in grafana and that data was showing up in aggregator output files. All tests/ pass.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@BrianJKoopman BrianJKoopman self-requested a review May 10, 2023 23:39
@BrianJKoopman BrianJKoopman added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels May 12, 2023
Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

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

This is great! However now we have to deal with users configuring the crossbar server, which we avoided originally, bundling a sensible default in the crossbar Docker image we provide (with the observatory. URI.) I think our documentation on this needs some updating.

ocs/agents/influxdb_publisher/drivers.py Show resolved Hide resolved
docs/user/site_config.rst Show resolved Hide resolved
... in response to requests for "generate_crossbar_config" and "start
crossbar".  Also update erroneous docs for the former.
Now the crossbar config can be bind-mounted in, or else some envvars
are used to generate one from a template before crossbar is started.
Also the SCF docs warn about updating the crossbar config.
@mhasself
Copy link
Member Author

Thanks -- I think I've addressed all your suggestions now. The connection error now presents a more detailed error message, with advice if possible.

@BrianJKoopman BrianJKoopman self-requested a review May 15, 2023 19:22
Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

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

Alright, I've made some modifications to the documentation. Will merge when checks pass.

@BrianJKoopman BrianJKoopman merged commit 93cc8b2 into main May 16, 2023
5 checks passed
@BrianJKoopman BrianJKoopman deleted the free-address-root branch May 16, 2023 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants