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

[Merged by Bors] - node: Remove option to configure services per endpoint #5276

Closed
wants to merge 7 commits into from

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Nov 17, 2023

Motivation

Part of #5267
Closes #5260

This changes the node configuration to not allow an operator to decide any more which GRPC handlers are exposed on which endpoint. Instead it hard codes the following:

  • public: GlobalState, Mesh, Transaction, Node, Activation
  • private: Admin, Debug, Smesher, Post
  • mTLS: Post

Additionally it removes all configuration options for the PoST service and sets them automatically if the node is started with smeshing-start=true via the command line or via the config.

Changes

  • remove ability to set which handlers are available on which endpoint and hardcode them instead
  • remove workaround code added in [Merged by Bors] - Extend README and check config for inconsistencies with supervised PoST service #5259 that was necessary when the operator could still configure the supervised post service
    • supervised post service binary is now always expected to be in the same directory as the node binary
    • the supervised post service is now instructed to always connect to the node via the private listener
    • remote post services can connect via the TLS listener

Test Plan

updated existing tests

TODO

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed
  • Update changelog as needed

@fasmat fasmat self-assigned this Nov 17, 2023
@dshulyak
Copy link
Contributor

public: Debug, GlobalState, Mesh, Transaction, Node, Activation

in reality none of them can be exposed on internet facing public address.

@fasmat
Copy link
Member Author

fasmat commented Nov 17, 2023

in reality none of them can be exposed on internet facing public address.

I wanted to avoid breaking backwards compatibility. At the moment they are all exposed by default. How do you suggest to proceed?

Copy link

codecov bot commented Nov 18, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (785cf12) 77.5% compared to head (e2d4da5) 77.6%.

Files Patch % Lines
node/node.go 90.0% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           develop   #5276   +/-   ##
=======================================
  Coverage     77.5%   77.6%           
=======================================
  Files          251     251           
  Lines        29494   29477   -17     
=======================================
+ Hits         22873   22878    +5     
+ Misses        5172    5155   -17     
+ Partials      1449    1444    -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dshulyak
Copy link
Contributor

I wanted to avoid breaking backwards compatibility. At the moment they are all exposed by default. How do you suggest to proceed?

i don't know honestly. any solution seems sketchy. i don't mind doing what you suggested if it works for smapp.
maybe remove Debug from public to private though?

@fasmat
Copy link
Member Author

fasmat commented Nov 20, 2023

bors try

spacemesh-bors bot added a commit that referenced this pull request Nov 20, 2023
@spacemesh-bors
Copy link

try

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Nov 20, 2023

bors try

spacemesh-bors bot added a commit that referenced this pull request Nov 20, 2023
@spacemesh-bors
Copy link

try

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Nov 20, 2023

bors try

spacemesh-bors bot added a commit that referenced this pull request Nov 20, 2023
@spacemesh-bors
Copy link

try

Build succeeded:

@fasmat
Copy link
Member Author

fasmat commented Nov 20, 2023

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Nov 20, 2023
## Motivation

Part of #5267
Closes #5260

This changes the node configuration to not allow an operator to decide any more which GRPC handlers are exposed on which endpoint. Instead it hard codes the following:

- public: GlobalState, Mesh, Transaction, Node, Activation
- private: Admin, Debug, Smesher, Post
- mTLS: Post

Additionally it removes all configuration options for the PoST service and sets them automatically if the node is started with `smeshing-start=true` via the command line or via the config.

## Changes
- remove ability to set which handlers are available on which endpoint and hardcode them instead
- remove workaround code added in #5259 that was necessary when the operator could still configure the supervised post service
  - supervised post service binary is now always expected to be in the same directory as the node binary
  - the supervised post service is now instructed to always connect to the node via the private listener
  - remote post services can connect via the TLS listener

## Test Plan
updated existing tests

## TODO
<!-- This section should be removed when all items are complete -->
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [x] Update documentation as needed
- [x] Update [changelog](../CHANGELOG.md) as needed
@spacemesh-bors
Copy link

Pull request successfully merged into develop.

Build succeeded:

@spacemesh-bors spacemesh-bors bot changed the title node: Remove option to configure services per endpoint [Merged by Bors] - node: Remove option to configure services per endpoint Nov 20, 2023
@spacemesh-bors spacemesh-bors bot closed this Nov 20, 2023
@spacemesh-bors spacemesh-bors bot deleted the do-not-expose-grpc-service-config branch November 20, 2023 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove auto-fixing code for PoST config from node startup
2 participants