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

Fix: hold the force uninstalling process untill the last addon been deleted #4101

Merged
merged 3 commits into from Jun 2, 2022

Conversation

wangyikewxgm
Copy link
Collaborator

@wangyikewxgm wangyikewxgm commented Jun 2, 2022

A bug generated when fluxcd addon has been enabled, then use uninstall -f

The uninstall process begin to remove the vela core controller and vela-system namespace while fluxcd addon is been deleting. This will cause a dead clock to block whole uninstall and re-install process.

Signed-off-by: 楚岳 wangyike.wyk@alibaba-inc.com

Description of your changes

Fixes #

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #4101 (62e4dac) into master (e012bbd) will increase coverage by 0.15%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4101      +/-   ##
==========================================
+ Coverage   60.28%   60.43%   +0.15%     
==========================================
  Files         330      330              
  Lines       31760    31760              
==========================================
+ Hits        19145    19193      +48     
+ Misses      10118    10072      -46     
+ Partials     2497     2495       -2     
Flag Coverage Δ
apiserver-unittests 35.51% <ø> (+0.08%) ⬆️
core-unittests 54.73% <ø> (-0.14%) ⬇️
e2e-multicluster-test 20.12% <ø> (-0.02%) ⬇️
e2e-rollout-tests 22.35% <ø> (ø)
e2etests 29.44% <ø> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/addon/registry.go 37.34% <0.00%> (-15.67%) ⬇️
pkg/apiserver/event/sync/workflow_record.go 50.00% <0.00%> (-10.00%) ⬇️
.../manualscalertrait/manualscalertrait_controller.go 67.30% <0.00%> (-5.77%) ⬇️
...ponentdefinition/componentdefinition_controller.go 80.00% <0.00%> (-5.56%) ⬇️
...aits/traitdefinition/traitdefinition_controller.go 72.63% <0.00%> (-5.27%) ⬇️
pkg/addon/helper.go 67.70% <0.00%> (-1.57%) ⬇️
...dev/v1alpha2/application/application_controller.go 83.93% <0.00%> (+0.30%) ⬆️
pkg/controller/utils/capability.go 80.75% <0.00%> (+0.44%) ⬆️
pkg/addon/utils.go 70.87% <0.00%> (+0.97%) ⬆️
pkg/apiserver/domain/service/authentication.go 50.18% <0.00%> (+1.11%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e012bbd...62e4dac. Read the comment docs.

references/cli/uninstall.go Outdated Show resolved Hide resolved
@wangyikewxgm wangyikewxgm added the backport release-1.4 add this label will automatically backport this PR to release-1.4 branch label Jun 2, 2022
@wonderflow
Copy link
Collaborator

why we need to wait 5 second

@wangyikewxgm
Copy link
Collaborator Author

why we need to wait 5 second

The vela-core controller is gc the resources of fluxcd addon. Should wait untill the gc process finish, then delete the vela-core controller, otherwise the fluxcd addon application will block in deleting process

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
@wonderflow
Copy link
Collaborator

can we make it shorter since there's a for-loop here?

@wangyikewxgm
Copy link
Collaborator Author

can we make it shorter since there's a for-loop here?

Have updated with 2 minutes.

@wonderflow
Copy link
Collaborator

I mean 5s -> 2s, for better experience

@wangyikewxgm
Copy link
Collaborator Author

the waiting message is

Waiting delete the fluxcd addon, timeout left 4m59.96s 

references/cli/uninstall.go Outdated Show resolved Hide resolved
references/cli/uninstall.go Outdated Show resolved Hide resolved
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
@StevenLeiZhang
Copy link
Collaborator

LGTM

Copy link
Collaborator

@StevenLeiZhang StevenLeiZhang left a comment

Choose a reason for hiding this comment

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

LGTM,Approved.

@wonderflow wonderflow merged commit a00fee9 into kubevela:master Jun 2, 2022
@github-actions
Copy link

github-actions bot commented Jun 2, 2022

Successfully created backport PR #4103 for release-1.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-1.4 add this label will automatically backport this PR to release-1.4 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants