The only reason why the useful profiling function of the admin API
doesn't work for gateway modes is, that the gateway-main doesn't init
the global variable globalLocalNodeName.
We simply use the same initialization logic as in server mode.
Description
Motivation and Context
Due to some unitizialed global values, the profiling endpoints are not available for gateway modes.
How to test this PR?
mc admin profile start <alias> should now no longer throw an error.
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Optimization (provides speedup with no functional changes)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[ ] Fixes a regression (If yes, please add commit-id or PR # here)
The only reason why the useful profiling function of the admin API doesn't work for gateway modes is, that the gateway-main doesn't init the global variable globalLocalNodeName.
We simply use the same initialization logic as in server mode.
Description
Motivation and Context
Due to some unitizialed global values, the profiling endpoints are not available for gateway modes.
How to test this PR?
mc admin profile start <alias>
should now no longer throw an error.Types of changes
Checklist:
commit-id
orPR #
here)