Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Provide snapshot-topologies support in orchestrator-client (and via api) #912

Merged
merged 7 commits into from
Jun 27, 2019

Conversation

sjmudd
Copy link
Collaborator

@sjmudd sjmudd commented Jun 14, 2019

orchestrator has a --snapshot-topologies option not available via orchestrator-client.

This patch provides:

  • support in orchestrator-client to support --snapshot-topologies
  • support in the api interface to handle a /api/snapshot-topologies call which will do the same thing.

Output of orchestrator-client looks like:

$ orchestrator-client -c snapshot-topologies
Took 2.125752ms

Output of a call to the orchestrator api (e.g. https://orchestrator.example.com/api/snapshot-topologies`) shows:

{"Code":"OK","Message":"Topology Snapshot completed","Details":"Took 2.058672ms"}

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • code is formatted via gofmt (please avoid goimports) # note: using go 1.12 formatting
  • code is built via ./build.sh

@shlomi-noach
Copy link
Collaborator

snapshot-topologies was written a long time ago and I haven't been practicing it in a while. The idea was to have some "git history" for the topologies; I think the feature needs to be revisited and get some serious testing.

@sjmudd
Copy link
Collaborator Author

sjmudd commented Jun 26, 2019

Well Shlomi, you set it up here. It's getting testing... but to be honest I'm not sure if the content it generates is being used. Were you wanting to get rid of it that would be fine I think.

Having said that the PR was because I'm moving all access to orchestrator to use the http interface so that I can switch the orchestrator clusters I talk to more easily (rather than use the config file). So moving to orchestrator-client means that any existing scripts etc collecting data which used the orchestrator binary need to be adapted. This was missing.

This patch has been running since I made the PR and seems to be working fine.

@shlomi-noach shlomi-noach merged commit fc2dd77 into openark:master Jun 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants