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

add compact for release-1.12 #3342

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

changluyi
Copy link
Collaborator

@changluyi changluyi commented Oct 26, 2023

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes:

Fixes #(issue-number)

WHAT

🤖 Generated by Copilot at f163dae

This pull request adds a feature flag to enable or disable the OVN database compaction in the OVN leader checker. The feature flag is exposed as an environment variable and a command line argument in the OVN leader checker code, and as a Helm value and an environment variable in the central pod templates for different deployment scenarios.

🤖 Generated by Copilot at f163dae

Oh we are the OVN sailors, and we sail the network sea
We keep our databases tidy, with the ENABLE_COMPACT key
But not for every deployment, we have to check the mode
So haul away the leader checker, and set the proper code

HOW

🤖 Generated by Copilot at f163dae

  • Add a new feature to enable or disable the OVN database compaction periodically (link, link, link, link, link, link, link, link)
  • Add a new field networking.ENABLE_COMPACT to the default Helm values file charts/values.yaml with a default value of false (link)
  • Add a new environment variable ENABLE_COMPACT to the central pod template in charts/templates/central-deploy.yaml and derive its value from the Helm values file (link)
  • Add a new field EnableCompact to the Configuration type in pkg/ovn_leader_checker/ovn.go to store the value of the environment variable (link)
  • Add a new flag --enableCompact to the OVN leader checker command line arguments in pkg/ovn_leader_checker/ovn.go and parse the value of the environment variable (link)
  • Assign the value of the flag to the EnableCompact field in the configuration in pkg/ovn_leader_checker/ovn.go (link)
  • Check the value of the EnableCompact field in the configuration and only call the compactOvnDatabase function for the OVN northbound and southbound databases if the field is true in the doOvnLeaderCheck function in pkg/ovn_leader_checker/ovn.go (link)
  • Set the value of the ENABLE_COMPACT environment variable to false for the OVN-DPDK deployment in yamls/ovn-dpdk.yaml (link)
  • Set the value of the ENABLE_COMPACT environment variable to false for the OVN-HA deployment in yamls/ovn-ha.yaml (link)

@changluyi changluyi merged commit 31e77fb into release-1.12 Oct 26, 2023
@changluyi changluyi deleted the add_param_for_period_compact_release-1.12 branch October 26, 2023 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants