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

MGMT-19421: phase 1 of replacing the refference HighAvailabilityMode with ControlPlaneCount #1027

Merged
merged 3 commits into from
Feb 17, 2025

Conversation

andrej1991
Copy link
Contributor

@andrej1991 andrej1991 commented Feb 6, 2025

phase 1 of replacing the refference HighAvailabilityMode with ControlPlaneCount
in the first stage it still accepst --high-availability-mode as a command line argument, but it is being converted to ControlPlaneCount in the following maner:

  • ControlPlaneCount is being set to 3 if --high-availability-mode is set to full
  • ControlPlaneCount is being set ot 1 if --high-availability-mode is set to none
    After the phase 1 of assisted-installer-agent is being merged --high-availability-mode will be fully removed from the valid parameters.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 6, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 6, 2025

@andrej1991: This pull request references MGMT-19421 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set.

In response to this:

MGMT-19421: phase 1 of replacing the refference HighAvailabilityMode with ControlPlaneCount
in the first stage it still accepst --high-availability-mode as a command line argument, but it is being converted to ControlPlaneCount in the following maner:

  • ControlPlaneCount is being set to 3 if --high-availability-mode is set to full
  • ControlPlaneCount is being set ot 1 if --high-availability-mode is set to none

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

1 similar comment
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 6, 2025

@andrej1991: This pull request references MGMT-19421 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set.

In response to this:

MGMT-19421: phase 1 of replacing the refference HighAvailabilityMode with ControlPlaneCount
in the first stage it still accepst --high-availability-mode as a command line argument, but it is being converted to ControlPlaneCount in the following maner:

  • ControlPlaneCount is being set to 3 if --high-availability-mode is set to full
  • ControlPlaneCount is being set ot 1 if --high-availability-mode is set to none

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 6, 2025
@andrej1991
Copy link
Contributor Author

@danmanor

@openshift-ci openshift-ci bot requested review from carbonin and romfreiman February 6, 2025 15:24
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 63.15789% with 7 lines in your changes missing coverage. Please review.

Project coverage is 55.63%. Comparing base (ab89730) to head (46b40a8).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/config/config.go 55.55% 4 Missing ⚠️
src/ops/ops.go 0.00% 2 Missing ⚠️
...ed-installer-controller/assisted_installer_main.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1027      +/-   ##
==========================================
- Coverage   55.67%   55.63%   -0.04%     
==========================================
  Files          15       15              
  Lines        3393     3399       +6     
==========================================
+ Hits         1889     1891       +2     
- Misses       1311     1315       +4     
  Partials      193      193              
Files with missing lines Coverage Δ
...taller_controller/assisted_installer_controller.go 75.88% <100.00%> (ø)
src/installer/installer.go 68.58% <100.00%> (ø)
...ed-installer-controller/assisted_installer_main.go 27.54% <0.00%> (ø)
src/ops/ops.go 45.25% <0.00%> (ø)
src/config/config.go 67.56% <55.55%> (-3.03%) ⬇️

@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 6, 2025

@andrej1991: This pull request references MGMT-19421 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set.

In response to this:

phase 1 of replacing the refference HighAvailabilityMode with ControlPlaneCount
in the first stage it still accepst --high-availability-mode as a command line argument, but it is being converted to ControlPlaneCount in the following maner:

  • ControlPlaneCount is being set to 3 if --high-availability-mode is set to full
  • ControlPlaneCount is being set ot 1 if --high-availability-mode is set to none

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@andrej1991
Copy link
Contributor Author

/cc: @danmanor @AlonaKaplan

…ntrolPlaneCountit has to be further checked if changing the templates will not harm to the installation
@andrej1991
Copy link
Contributor Author

/cc: @pastequo @adriengentil

@pastequo
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 12, 2025
@andrej1991
Copy link
Contributor Author

/retest

@@ -11,5 +11,5 @@ data:
skip-cert-verification: '{{.SkipCertVerification}}'
ca-cert-path: '{{.CACertPath}}'
check-cluster-version: '{{.CheckCVO}}'
high-availability-mode: {{.HaMode}}
control-plane-count: '{{.ControllerCount}}'
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets name this ControlPlaneCount like everywhere else

@@ -73,7 +73,7 @@ func (c *Config) ProcessArgs(args []string) {
flagSet.StringVar(&c.HTTPSProxy, "https-proxy", "", "A proxy URL to use for creating HTTPS connections outside the cluster")
flagSet.StringVar(&c.NoProxy, "no-proxy", "", "A comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude proxying")
flagSet.StringVar(&c.ServiceIPs, "service-ips", "", "All IPs of assisted service node")
flagSet.StringVar(&c.HighAvailabilityMode, "high-availability-mode", "", "high-availability expectations, \"Full\" which represents the behavior in a \"normal\" cluster. Use 'None' for single-node deployment. Leave this value as \"\" for workers as we do not care about HA mode for workers.")
flagSet.IntVar(&c.ControlPlaneCount, "control-plane-count", 0, "The number of controller nodes in the cluster")
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets change to The number of control plane nodes in the cluster

@@ -85,6 +85,7 @@ func (c *Config) ProcessArgs(args []string) {
var installerArgs string
flagSet.StringVar(&installerArgs, "installer-args", "", "JSON array of additional coreos-installer arguments")
h := flagSet.Bool("help", false, "Help message")
highAvailability := flagSet.String("high-availability-mode", "", "WARNING: this parameter will be shortly deprecated! valid values: full/none")
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets keep it as is for now

flagSet.StringVar(&c.HighAvailabilityMode, "high-availability-mode", "", "high-availability expectations, \"Full\" which represents the behavior in a \"normal\" cluster. Use 'None' for single-node deployment. Leave this value as \"\" for workers as we do not care about HA mode for workers.")

@@ -123,6 +124,15 @@ func (c *Config) ProcessArgs(args []string) {
utils.SetNoProxyEnv(c.NoProxy)
}

if highAvailability != nil && *highAvailability != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess once you will use flagSet.StringVar you won't need the nil check ? also you will have "" default so yo will not need the if at all

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 13, 2025
@@ -11,5 +11,5 @@ data:
skip-cert-verification: '{{.SkipCertVerification}}'
ca-cert-path: '{{.CACertPath}}'
check-cluster-version: '{{.CheckCVO}}'
high-availability-mode: {{.HaMode}}
control-plane-count: '{{.ControlPlaneCount}}'
Copy link
Contributor

Choose a reason for hiding this comment

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

What should ControlPlaneCount match ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

…with ControlPlaneCountin the first stage it still accepst --high-availability-mode as a command line argument, but it is being converted to ControlPlaneCount in the following maner:ControlPlaneCount is being set to 3 if --high-availability-mode is set to fullControlPlaneCount is being set ot 1 if --high-availability-mode is set to none
Copy link
Contributor

@danmanor danmanor left a comment

Choose a reason for hiding this comment

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

Looks good !

flagSet.StringVar(&installerArgs, "installer-args", "", "JSON array of additional coreos-installer arguments")
h := flagSet.Bool("help", false, "Help message")
flagSet.StringVar(&highAvailability, "high-availability-mode", "", "high-availability expectations, \"Full\" which represents the behavior in a \"normal\" cluster. Use 'None' for single-node deployment. Leave this value as \"\" for workers as we do not care about HA mode for workers.")
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT - Probably best just keep

flagSet.StringVar(&c.HighAvailabilityMode, "high-availability-mode", "", "high-availability expectations, \"Full\" which represents the behavior in a \"normal\" cluster. Use 'None' for single-node deployment. Leave this value as \"\" for workers as we do not care about HA mode for workers.")

as it is, in effort to avoid creating unnecessary diff that can cause confusion along the way

@@ -82,9 +82,10 @@ func (c *Config) ProcessArgs(args []string) {
flagSet.BoolVar(&c.NotifyNumReboots, "notify-num-reboots", false, "indicate number of reboots should be notified as event")
flagSet.StringVar(&c.CoreosImage, "coreos-image", "", "CoreOS image to install to the existing root")

var installerArgs string
var highAvailability, installerArgs string
Copy link
Contributor

Choose a reason for hiding this comment

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

See comment below, then this is redundant

@@ -73,7 +73,7 @@ func (c *Config) ProcessArgs(args []string) {
flagSet.StringVar(&c.HTTPSProxy, "https-proxy", "", "A proxy URL to use for creating HTTPS connections outside the cluster")
flagSet.StringVar(&c.NoProxy, "no-proxy", "", "A comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude proxying")
flagSet.StringVar(&c.ServiceIPs, "service-ips", "", "All IPs of assisted service node")
flagSet.StringVar(&c.HighAvailabilityMode, "high-availability-mode", "", "high-availability expectations, \"Full\" which represents the behavior in a \"normal\" cluster. Use 'None' for single-node deployment. Leave this value as \"\" for workers as we do not care about HA mode for workers.")
Copy link
Contributor

Choose a reason for hiding this comment

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

See comment below, we want to avoid this removal / addition diff

@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 17, 2025

@andrej1991: This pull request references MGMT-19421 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set.

In response to this:

phase 1 of replacing the refference HighAvailabilityMode with ControlPlaneCount
in the first stage it still accepst --high-availability-mode as a command line argument, but it is being converted to ControlPlaneCount in the following maner:

  • ControlPlaneCount is being set to 3 if --high-availability-mode is set to full
  • ControlPlaneCount is being set ot 1 if --high-availability-mode is set to none
    After the phase 1 of assisted-installer-agent is being merged --high-availability-mode will be fully removed from the valid parameters.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 17, 2025
Copy link

openshift-ci bot commented Feb 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrej1991, danmanor

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 17, 2025
Copy link

openshift-ci bot commented Feb 17, 2025

@andrej1991: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit d50758c into openshift:master Feb 17, 2025
15 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-agent-installer-orchestrator
This PR has been included in build ose-agent-installer-orchestrator-container-v4.19.0-202502171407.p0.gd50758c.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-agent-installer-csr-approver
This PR has been included in build ose-agent-installer-csr-approver-container-v4.19.0-202502171407.p0.gd50758c.assembly.stream.el9.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants