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

Feature reload cmd #2030

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Feature reload cmd #2030

wants to merge 14 commits into from

Conversation

Jun10ng
Copy link
Contributor

@Jun10ng Jun10ng commented May 8, 2022

Issues associated with this PR

支持Mosn reload命令(#1680)

mosn reload
or
mosn reload -c config_path

@Jun10ng
Copy link
Contributor Author

Jun10ng commented May 8, 2022

@doujiang24
@nejisama

@codecov
Copy link

codecov bot commented May 8, 2022

Codecov Report

Base: 60.56% // Head: 60.52% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (bafdd8e) compared to base (7609947).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2030      +/-   ##
==========================================
- Coverage   60.56%   60.52%   -0.05%     
==========================================
  Files         422      422              
  Lines       36629    36688      +59     
==========================================
+ Hits        22184    22205      +21     
- Misses      12263    12302      +39     
+ Partials     2182     2181       -1     
Impacted Files Coverage Δ
pkg/mosn/mosn.go 35.56% <ø> (ø)
pkg/stagemanager/stage_manager.go 38.22% <0.00%> (-6.58%) ⬇️
pkg/router/types.go 48.19% <0.00%> (-2.45%) ⬇️
pkg/protocol/api.go 76.00% <0.00%> (ø)
pkg/config/v2/route.go 74.41% <0.00%> (ø)
pkg/router/base_rule.go 78.84% <0.00%> (+0.13%) ⬆️
pkg/module/http2/server.go 81.85% <0.00%> (+0.29%) ⬆️
pkg/module/http2/transport.go 78.91% <0.00%> (+0.43%) ⬆️
pkg/metrics/shm/zone.go 69.23% <0.00%> (+2.56%) ⬆️
pkg/proxy/retrystate.go 76.27% <0.00%> (+2.68%) ⬆️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

pkg/stagemanager/stage_manager.go Outdated Show resolved Hide resolved
pkg/stagemanager/stage_manager.go Outdated Show resolved Hide resolved
pkg/stagemanager/stage_manager.go Show resolved Hide resolved
@Jun10ng Jun10ng requested a review from doujiang24 May 11, 2022 05:12
pkg/stagemanager/stage_manager.go Show resolved Hide resolved
pkg/stagemanager/stage_manager.go Outdated Show resolved Hide resolved
pkg/stagemanager/stage_manager.go Show resolved Hide resolved
doujiang24
doujiang24 previously approved these changes May 16, 2022
Copy link
Contributor

@nejisama nejisama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前的reload是靠向旧进程发送HUP信号触发热升级流程执行reload,但是MOSN是可以通过配置关闭热升级的,有没有测试过这种情况下,reload是什么结果?

@nejisama
Copy link
Contributor

补充对应的文档到MOSN官网,需要说明各种细节。
比如mosn reload -c config.json 并不是用config.json去reload,还是用原来start的配置进行reload的等

1. move changes to istio/main
2. using proc.pid
Junlong Liu added 3 commits August 24, 2022 14:15
1. disable reconfiguration/upgrade when exec mosn reload

refactor:
1. time ticker check reload processor
2. delete runReconfigurationParamsInit, using initStage
@Jun10ng
Copy link
Contributor Author

Jun10ng commented Aug 26, 2022

目前的reload是靠向旧进程发送HUP信号触发热升级流程执行reload,但是MOSN是可以通过配置关闭热升级的,有没有测试过这种情况下,reload是什么结果?

如果打开热升级执行 reload的话,新进程会向老mosn进程向发热升级信号,老进程会报错
"[server] SIGHUP received: current state expected running while got 13",最终导致无法执行reload,这个问题我在最新的commit内修复了,执行reload的时候不发送热升级信号。

@Jun10ng
Copy link
Contributor Author

Jun10ng commented Aug 26, 2022

补充对应的文档到MOSN官网,需要说明各种细节。 比如mosn reload -c config.json 并不是用config.json去reload,还是用原来start的配置进行reload的等

好的,等PR合进好,我再提个PR到mosn.io

@Jun10ng Jun10ng requested review from nejisama and doujiang24 and removed request for antJack, nejisama and doujiang24 August 26, 2022 08:02
pkg/mosn/mosn.go Outdated Show resolved Hide resolved
@Jun10ng
Copy link
Contributor Author

Jun10ng commented Sep 1, 2022

Error: -01 07:41:19,967 [ERROR] [config] network filter create failed, type:tcp_proxy, error: unsupported network filter type: tcp_proxy
Error: -01 07:41:19,967 [ERROR] [config] network filter factories len is 0, listener: &{ListenerConfig:{Name:0.0.0.0_80 Type: AddrConfig: BindToPort:false Network: UseOriginalDst:false 

这个CI 失败看起来不是我提交的代码影响的。

cmd/mosn/main/control.go Outdated Show resolved Hide resolved
@doujiang24
Copy link
Member

istio/istio152/main/control.go:21:2: imported and not used: "fmt"

https://github.com/mosn/mosn/runs/8153277565?check_suite_focus=true#step:5:222
@Jun10ng 看起来是这个错误呢

@taoyuanyuan taoyuanyuan modified the milestones: 1.2.0, 1.3.0 Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants