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

make the check port changes for chef-managed database for automate ha #8613

Merged
merged 6 commits into from
Sep 26, 2024

Conversation

punitmundra
Copy link
Collaborator

@punitmundra punitmundra commented Sep 26, 2024

🔩 Description: What code changed, and why?

https://progresssoftware.atlassian.net/browse/CHEF-16071
https://progresssoftware.atlassian.net/browse/CHEF-16072

⛓️ Related Resources

👍 Definition of Done

👟 How to Build and Test the Change

✅ Checklist

All PRs must tick these:

With occasional exceptions, all PRs from Progress employees must tick these:

  • Is the code clear? (complicated code or lots of comments--subdivide and use well-named methods, meaningful variable names, etc.)
  • Consistency checked? (user notifications, user prompts, visual patterns, code patterns, variable names)
  • Repeated code blocks eliminated? (adapt and reuse existing components, blocks, functions, etc.)
  • Spelling, grammar, typos checked? (at a minimum use make spell in any component directory)
  • Code well-formatted? (indents, line breaks, etc. improve rather than hinder readability)

All PRs from Progress employees should tick these if appropriate:

  • Tests added/updated? (all new code needs new tests)
  • Docs added/updated? (all customer-facing changes)

Please add a note next to any checkbox above if you are NOT ticking it.

📷 Screenshots, if applicable

Signed-off-by: punitmundra <pmundra@progress.com>
Copy link

netlify bot commented Sep 26, 2024

👷 Deploy Preview for chef-automate processing.

Name Link
🔨 Latest commit 340809c
🔍 Latest deploy log https://app.netlify.com/sites/chef-automate/deploys/66f52ed08cf46f000807681b

Comment on lines 78 to 102
# Compare major versions
if (( major1 > major2 )); then
echo "$installed_version is greater than $airgap_bundle_version"
isSkipRequired=true
elif (( major1 < major2 )); then
echo "$airgap_bundle_version is greater than $installed_version, proceeding for upgrade"
else
# Compare minor versions
if (( minor1 > minor2 )); then
echo "$installed_version is greater than $airgap_bundle_version"
isSkipRequired=true
elif (( minor1 < minor2 )); then
echo "$airgap_bundle_version is greater than $installed_version, proceeding for upgrade"
else
# Compare patch versions
if (( patch1 > patch2 )); then
echo "$installed_version is greater than $airgap_bundle_version"
isSkipRequired=true
elif (( patch1 < patch2 )); then
echo "$airgap_bundle_version is greater than $installed_version, proceeding for upgrade"
else
echo "Both versions are equal"
fi
fi
fi
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we do some unit testing by putting it in a function ?

@@ -55,10 +55,10 @@ backend automate_postgresql
{{~#if ../cfg.resolvers.nameservers }}
server-template {{node.address}} 8 {{node.address}}:{{node.port}} check resolvers pgdns init-addr none resolve-prefer ipv4
{{else}}
server {{node.address}} {{node.address}}:{{node.port}} maxconn {{../cfg.max_connections}} check port 6432
server {{node.address}} {{node.address}}:{{node.port}} maxconn {{../cfg.max_connections}} {{~#if ../cfg.chef_manage_db }} check port 6432 {{~/if}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we put the maxconn into the if condition, since earlier the maxconn was not present for customer managed database

Signed-off-by: punitmundra <pmundra@progress.com>
Signed-off-by: punitmundra <pmundra@progress.com>
Signed-off-by: punitmundra <pmundra@progress.com>
Signed-off-by: punitmundra <pmundra@progress.com>
@punitmundra punitmundra changed the title [WIP]first set of changes in pg-gateway make the check port changes for chef-managed database for automate ha Sep 26, 2024

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@punitmundra punitmundra merged commit 9a11d75 into main Sep 26, 2024
11 of 13 checks passed
@punitmundra punitmundra deleted the automate-pg branch September 26, 2024 10:30
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.

3 participants