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

Reload config on SIGHUP #1770

Open
5 of 7 tasks
fyrchik opened this issue Sep 8, 2022 · 1 comment
Open
5 of 7 tasks

Reload config on SIGHUP #1770

fyrchik opened this issue Sep 8, 2022 · 1 comment
Labels
epic A collection of related issues good first issue Good for newcomers I2 Regular impact neofs-storage Storage node application issues S3 Minimally significant U3 Regular
Milestone

Comments

@fyrchik
Copy link
Contributor

fyrchik commented Sep 8, 2022

@carpawell carpawell self-assigned this Sep 15, 2022
@alexchetaev alexchetaev added 2022Q4 and removed 2022Q3 labels Sep 30, 2022
@fyrchik fyrchik assigned cthulhu-rider and unassigned carpawell Oct 3, 2022
cthulhu-rider added a commit to cthulhu-rider/neofs-node that referenced this issue Oct 4, 2022
Remote `ErrNilLogger` global variable of `error` type since it is no
longer used.

Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
cthulhu-rider added a commit to cthulhu-rider/neofs-node that referenced this issue Oct 4, 2022
There is a need to dynamically parameterize `Logger` instances. For
example, change severity level. Since `Logger` is widely used across all
repo, it makes sense to save previous behavior for some time.

Make `Logger` to encapsulate `zap.Logger` in order to prevent direct
assignments. Declare `Level` enumeration for message priorities. Add
`Write` method which accepts level in order to not have per-level
methods like `zap.Logger` has. Add `NewConfigurable` method which binds
dynamic configuration component which can be later used to modify
parameters on the fly.

Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
cthulhu-rider added a commit to cthulhu-rider/neofs-node that referenced this issue Oct 4, 2022
There is a need to re-configure storage node's logging on the
fly.

Provide `SubscribeConfigChanges` function to listen to changes of the
storage node config. Create dynamically configured `logger.Logger` in
`neofs-node` app and use it to log notifications about new Sidechain
blocks. Update `logger.Level` parameter on each `syscall.SIGHUP` signal.

Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
cthulhu-rider added a commit to cthulhu-rider/neofs-node that referenced this issue Oct 4, 2022
There is a need to re-configure storage node's logging on the
fly.

Provide `SubscribeConfigChanges` function to listen to changes of the
storage node config. Create dynamically configured `logger.Logger` in
`neofs-node` app and use it to log notifications about new Sidechain
blocks. Update `logger.Level` parameter on each `syscall.SIGHUP` signal.

Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
@carpawell carpawell mentioned this issue Oct 4, 2022
1 task
cthulhu-rider pushed a commit that referenced this issue Oct 5, 2022
Split all the fields in `cfg` structure on:
1. `applicationConfiguration`;
2. `internals`; // shared entities for an application work, such as
`context.Context`
3. `shared`; // holder for the shared entities b/w;
4. `cfgXXX`; // configuration for internal services.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider added a commit to cthulhu-rider/neofs-node that referenced this issue Oct 6, 2022
Remote `ErrNilLogger` global variable of `error` type since it is no
longer used.

Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
cthulhu-rider added a commit to cthulhu-rider/neofs-node that referenced this issue Oct 6, 2022
There is a need to dynamically parameterize `Logger` instances. For
example, change severity level. Since `Logger` is widely used across all
repo, it makes sense to save previous behavior for some time.

Make `Logger` to encapsulate `zap.Logger` in order to prevent direct
assignments. Declare `Level` enumeration for message priorities. Add
`Write` method which accepts level in order to not have per-level
methods like `zap.Logger` has. Add `NewConfigurable` method which binds
dynamic configuration component which can be later used to modify
parameters on the fly.

Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
cthulhu-rider added a commit to cthulhu-rider/neofs-node that referenced this issue Oct 6, 2022
There is a need to re-configure storage node's logging on the
fly.

Provide `SubscribeConfigChanges` function to listen to changes of the
storage node config. Create dynamically configured `logger.Logger` in
`neofs-node` app and use it to log notifications about new Sidechain
blocks. Update `logger.Level` parameter on each `syscall.SIGHUP` signal.

Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
carpawell added a commit that referenced this issue Oct 12, 2022
Make it store its internal `zap.Logger`'s level. Also, make all the
components to accept internal `logger.Logger` instead of `zap.Logger`; it
will simplify future refactor.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit that referenced this issue Oct 12, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit that referenced this issue Oct 12, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit that referenced this issue Oct 12, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit that referenced this issue Oct 12, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider added a commit to cthulhu-rider/neofs-node that referenced this issue Oct 13, 2022
There is a need to dynamically parameterize `Logger` instances. For
example, change severity level.

Make `Logger` to encapsulate `zap.Logger` in order to prevent direct
assignments. Declare `Level` enumeration for message priorities. Replace
`Prm` type with `Config`. Add `Init` method which binds dynamic
configuration component which can be later used to modify parameters on
the fly.

Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
cthulhu-rider added a commit to cthulhu-rider/neofs-node that referenced this issue Oct 13, 2022
There is a need to dynamically parameterize `Logger` instances. For
example, change severity level.

Make `Logger` to encapsulate `zap.Logger` in order to prevent direct
assignments. Declare `Level` enumeration for message priorities. Replace
`Prm` type with `Config`. Add `Init` method which binds dynamic
configuration component which can be later used to modify parameters on
the fly.

Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
It is created in `Open` anyway.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
It will allow dynamic shard management. Closing a shard does not allow
removing event handlers.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
…utine

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Negative values have no sense. On the other hand it differs from the
blobovnicza's configuration and prevents unification.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
It will allow rereading config values and will simplify distinguishing them
from the custom values in the `cfg` structure.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Currently, it only supports changing the compound of the shards.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Init can take a lot of time. Because the mutex is taken, all new operations
are blocked.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Split all the fields in `cfg` structure on:
1. `applicationConfiguration`;
2. `internals`; // shared entities for an application work, such as
`context.Context`
3. `shared`; // holder for the shared entities b/w;
4. `cfgXXX`; // configuration for internal services.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Make it store its internal `zap.Logger`'s level. Also, make all the
components to accept internal `logger.Logger` instead of `zap.Logger`; it
will simplify future refactor.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@roman-khimov roman-khimov modified the milestones: v0.35.0, v0.36.0 Jan 26, 2023
@roman-khimov roman-khimov modified the milestones: v0.36.0, v0.38.0 Apr 7, 2023
@roman-khimov roman-khimov removed this from the v0.38.0 milestone Jun 5, 2023
@roman-khimov roman-khimov added S3 Minimally significant I2 Regular impact labels Dec 21, 2023
@roman-khimov roman-khimov added this to the v0.44.0 milestone Nov 8, 2024
@roman-khimov
Copy link
Member

The last one here without a specific task is pool sizes, so let's close this epic by solving that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic A collection of related issues good first issue Good for newcomers I2 Regular impact neofs-storage Storage node application issues S3 Minimally significant U3 Regular
Projects
None yet
Development

No branches or pull requests

6 participants