Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Fix empty flannel backend configuration expectation on an existing cluster #2601

Merged
merged 1 commit into from Sep 1, 2021

Conversation

a-palchikov
Copy link
Contributor

Description

I guess this is similar to the HA reconfiguration fix - enable cluster configuration updates on an existing cluster (when flannel backend is not updated).

Configuration file used:

kind: ClusterConfiguration
version: v1
spec:
  global:
    cloudProvider: generic
    highAvailability: true

Before the change:

$ gravity resource create -f haconfig-active.yaml --confirm
[ERROR]: unsupported flannel backend was specified:

After the change:

$ gravity resource create -f haconfig-active.yaml --confirm
Wed Aug 11 12:44:01 UTC	Deploying agents on cluster nodes
Deployed agent on vm-3 (172.17.0.4)
Deployed agent on vm-2 (172.17.0.3)
Deployed agent on vm-1 (172.17.0.2)
...
Logs
Executing "/update-config" locally
Wed Aug 11 12:44:12 UTC	Update runtime configuration
Executing "/masters/vm-1/stepdown" locally
Wed Aug 11 12:44:15 UTC	Step down "vm-1" as Kubernetes leader
Disable leader elections on vm-1
Waiting for new leader election
Executing "/masters/vm-1/drain" locally
Wed Aug 11 12:44:17 UTC	Drain node "vm-1"
	Still executing "/masters/vm-1/drain" locally (10 seconds elapsed)
Executing "/masters/vm-1/restart" locally
Wed Aug 11 12:44:33 UTC	Restart container on node "vm-1"
	Still executing "/masters/vm-1/restart" locally (10 seconds elapsed)
	Still executing "/masters/vm-1/restart" locally (20 seconds elapsed)
	Still executing "/masters/vm-1/restart" locally (30 seconds elapsed)
	Still executing "/masters/vm-1/restart" locally (40 seconds elapsed)
	Still executing "/masters/vm-1/restart" locally (50 seconds elapsed)
Executing "/masters/vm-1/elect" locally
Wed Aug 11 12:45:23 UTC	Make node "vm-1" Kubernetes leader
Disable leader elections on vm-3
Disable leader elections on vm-2
Enable leader elections on vm-1
Waiting for new leader election
Executing "/masters/vm-1/taint" locally
Wed Aug 11 12:45:26 UTC	Taint node "vm-1"
	Still executing "/masters/vm-1/taint" locally (10 seconds elapsed)
Executing "/masters/vm-1/uncordon" locally
Wed Aug 11 12:45:40 UTC	Uncordon node "vm-1"
Executing "/masters/vm-1/endpoints" locally
Wed Aug 11 12:45:41 UTC	Wait for endpoints on node "vm-1"
Executing "/masters/vm-1/untaint" locally
Wed Aug 11 12:45:42 UTC	Remove taint from node "vm-1"
Executing "/masters/vm-3/drain" on remote node vm-3
Wed Aug 11 12:45:43 UTC	Drain node "vm-3"
	Still executing "/masters/vm-3/drain" on remote node vm-3 (10 seconds elapsed)
Executing "/masters/vm-3/restart" on remote node vm-3
Wed Aug 11 12:45:57 UTC	Restart container on node "vm-3"
	Still executing "/masters/vm-3/restart" on remote node vm-3 (10 seconds elapsed)
	Still executing "/masters/vm-3/restart" on remote node vm-3 (20 seconds elapsed)
	Still executing "/masters/vm-3/restart" on remote node vm-3 (30 seconds elapsed)
Executing "/masters/vm-3/taint" on remote node vm-3
Wed Aug 11 12:46:33 UTC	Taint node "vm-3"
Executing "/masters/vm-3/uncordon" on remote node vm-3
Wed Aug 11 12:46:35 UTC	Uncordon node "vm-3"
Executing "/masters/vm-3/endpoints" on remote node vm-3
Wed Aug 11 12:46:38 UTC	Wait for endpoints on node "vm-3"
Executing "/masters/vm-3/untaint" on remote node vm-3
Wed Aug 11 12:46:41 UTC	Remove taint from node "vm-3"
Executing "/masters/vm-3/enable-elections" on remote node vm-3
Wed Aug 11 12:46:44 UTC	Enable leader election on node "vm-3"
Executing "/masters/vm-2/drain" on remote node vm-2
Wed Aug 11 12:46:47 UTC	Drain node "vm-2"
Executing "/masters/vm-2/restart" on remote node vm-2
Wed Aug 11 12:46:51 UTC	Restart container on node "vm-2"
	Still executing "/masters/vm-2/restart" on remote node vm-2 (10 seconds elapsed)
Executing "/masters/vm-2/taint" on remote node vm-2
Wed Aug 11 12:47:07 UTC	Taint node "vm-2"
Executing "/masters/vm-2/uncordon" on remote node vm-2
Wed Aug 11 12:47:09 UTC	Uncordon node "vm-2"
Executing "/masters/vm-2/endpoints" on remote node vm-2
Wed Aug 11 12:47:12 UTC	Wait for endpoints on node "vm-2"
Executing "/masters/vm-2/untaint" on remote node vm-2
Wed Aug 11 12:47:14 UTC	Remove taint from node "vm-2"
Executing "/masters/vm-2/enable-elections" on remote node vm-2
Wed Aug 11 12:47:18 UTC	Enable leader election on node "vm-2"
Wed Aug 11 12:47:22 UTC	Operation has completed
operation(update configuration(db0c9be5-5c81-4c45-8525-af7d64034c0a), cluster=test, created=2021-08-11 12:44) finished in 3 minutes

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Regression fix (non-breaking change which fixes a regression)
  • This change has a user-facing impact

TODOs

  • Self-review the change
  • Write tests
  • Perform manual testing
  • Address review feedback

Implementation

Performance/Scaling

Testing done

  1. Updated cluster configuration with the configuration file from above.
  2. Attempt to updated flannel backend from an invalid value (explicitly empty and unsupported value).
  3. Update flannel backend using an explicitly set value.

Additional information

@a-palchikov a-palchikov requested review from a team, wadells and knisbet August 11, 2021 13:12
@a-palchikov a-palchikov force-pushed the dmitri/fix-flannel-backend-reconfiguration branch from d10112c to 2bee3f5 Compare August 11, 2021 13:42
Copy link
Contributor

@bernardjkim bernardjkim left a comment

Choose a reason for hiding this comment

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

Sorry for the trouble 😓 . Looks good.

@a-palchikov
Copy link
Contributor Author

Sorry for the trouble sweat . Looks good.

No worries.

Flannel Backend validation take lack of backend configuration into
account).
@a-palchikov a-palchikov force-pushed the dmitri/fix-flannel-backend-reconfiguration branch from 2bee3f5 to 192fc35 Compare September 1, 2021 15:35
@a-palchikov a-palchikov merged commit 7150677 into master Sep 1, 2021
@a-palchikov a-palchikov deleted the dmitri/fix-flannel-backend-reconfiguration branch September 1, 2021 17:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants