-
Notifications
You must be signed in to change notification settings - Fork 93
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
maintenance api server's default socket should be under root dir #280
Conversation
config/config.go
Outdated
@@ -205,7 +205,11 @@ func SetStartupParameter(startupFlag *command.Args, cfg *Config) error { | |||
cfg.GCPeriod = d | |||
|
|||
cfg.Address = startupFlag.Address | |||
cfg.APISocket = startupFlag.APISocket | |||
|
|||
if startupFlag.APISocket == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will happen when startupFlag.APISocket != ""
?
config/config.go
Outdated
cfg.APISocket = startupFlag.APISocket | ||
|
||
if startupFlag.APISocket == "" { | ||
cfg.APISocket = path.Join(cfg.RootDir, "api.sock") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we should allow setting the APISocket
to empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean completely shutdown api server?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean how do users set it to empty?
It seems the default grpc address is |
Yes. It sounds a good idea |
7047b99
to
1d1e477
Compare
snapshot/snapshot.go
Outdated
if cfg.APISocket != "" { | ||
systemController, err := system.NewSystemController(manager, cfg.APISocket) | ||
if cfg.EnableSystemController { | ||
systemController, err := system.NewSystemController(manager, path.Join(cfg.RootDir, "system_controller.sock")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe name it supervisor.sock
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Um. We already have supervisors for nydusd daemon. Or just rename it to system.sock ?snapshotter.sock ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
system.sock
is ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
We should put all snapshotter's stuff under root dir which can be customized. Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
1d1e477
to
c9c834a
Compare
We should put all snapshotter's stuff under root dir which can be customized.
Signed-off-by: Changwei Ge gechangwei@bytedance.com