storj/cmd/storagenode
Márton Elek 56dbe7738d cmd/storagenode: use the right subcommand for restarting windows services
Commit 3cf89633e9 is changed how the cobra subcommands are created for storagenode (with prefering local variables instead of package level variables).

However, there is a bug which makes it impossible to restart Storagenode services on Windows: the refactored code creates the rootCmd/runCmd twice: therefore the ctx of the running process is not exactly the same as the ctx which supposed to be stopped / cancelled.

This patch fixes this problem with re-using exising, initialized command instead of creating a new one for cancellation.

Fixes: https://github.com/storj/storj/issues/5845

Change-Id: Ib8a4b80d4574e448f65c8558e927c0908c9c5eed
2023-05-08 14:09:37 +00:00
..
cmd_config.go cmd/storagenode: refactor main.go 2023-04-06 12:48:23 +00:00
cmd_dashboard.go cmd/storagenode: flag to configure identity dir for dashboard config 2023-04-20 14:22:00 +00:00
cmd_diag.go cmd/storagenode: refactor main.go 2023-04-06 12:48:23 +00:00
cmd_gracefulexit_test.go cmd/storagenode: refactor main.go 2023-04-06 12:48:23 +00:00
cmd_gracefulexit.go cmd/storagenode: refactor main.go 2023-04-06 12:48:23 +00:00
cmd_issue_api_token.go cmd/storagenode: refactor main.go 2023-04-06 12:48:23 +00:00
cmd_lazy_filewalker.go storagenode: run garbage collection filewalker as a low I/O subprocess 2023-05-02 19:43:38 +00:00
cmd_nodeinfo.go cmd/storagenode: refactor main.go 2023-04-06 12:48:23 +00:00
cmd_run.go cmd/storagenode: refactor main.go 2023-04-06 12:48:23 +00:00
cmd_setup.go cmd/storagenode: refactor main.go 2023-04-06 12:48:23 +00:00
deprecated.go cmd/storagenode: refactor main.go 2023-04-06 12:48:23 +00:00
main.go cmd/storagenode: use the right subcommand for restarting windows services 2023-05-08 14:09:37 +00:00
root_test.go cmd/storagenode: refactor main.go 2023-04-06 12:48:23 +00:00
root.go storagenode: run garbage collection filewalker as a low I/O subprocess 2023-05-02 19:43:38 +00:00
service_nonwindows.go cmd/storagenode: use the right subcommand for restarting windows services 2023-05-08 14:09:37 +00:00
service_windows.go cmd/storagenode: use the right subcommand for restarting windows services 2023-05-08 14:09:37 +00:00