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 unsupported config override for reload interval #619

Conversation

Miciah
Copy link
Contributor

@Miciah Miciah commented May 24, 2021

  • pkg/operator/controller/ingress/deployment.go (RouterReloadIntervalEnvName): New const.
    (desiredRouterDeployment): Add unsupported config override for RELOAD_INTERVAL.
  • pkg/operator/controller/ingress/deployment_test.go (TestDesiredRouterDeployment): Verify the desiredRouterDeployment sets RELOAD_INTERVAL as expected.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 24, 2021
@@ -421,6 +424,14 @@ func desiredRouterDeployment(ci *operatorv1.IngressController, ingressController
Name: RouterLoadBalancingAlgorithmEnvName,
Value: loadBalancingAlgorithm,
})
reloadInterval := 5
if unsupportedConfigOverrides.ReloadInterval != 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if unsupportedConfigOverrides.ReloadInterval != 0 {
if unsupportedConfigOverrides.ReloadInterval > 0 {

Might as well avoid negative numbers, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Thanks!

@sgreene570
Copy link
Contributor

Do we have a bug we can use for this fix (or should we open a new one)?

@Miciah Miciah force-pushed the add-unsupported-config-override-for-reload-interval branch from 070740c to 1267b30 Compare June 23, 2021 17:47
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 23, 2021
@Miciah Miciah force-pushed the add-unsupported-config-override-for-reload-interval branch from 1267b30 to 4221ea7 Compare June 23, 2021 18:01
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 23, 2021
@Miciah
Copy link
Contributor Author

Miciah commented Jun 23, 2021

The second to last push added an E2E test and changed the logic to ignore an unsupported config override with zero a negative value. The last push rebased to resolve a conflict in operator_test.go.

t.Fatalf("failed to update ingresscontroller: %v", err)
}
if err := waitForDeploymentEnvVar(t, kclient, deployment, 1*time.Minute, "RELOAD_INTERVAL", "60"); err != nil {
t.Fatalf("expected initial deployment to set RELOAD_INTERVAL=60: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it the "initial" deployment or the now "updated" deployment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, it's "updated". Fixed. Thanks!

defer assertIngressControllerDeleted(t, kclient, ic)

if err := waitForIngressControllerCondition(t, kclient, 5*time.Minute, icName, availableConditionsForPrivateIngressController...); err != nil {
t.Errorf("failed to observe expected conditions: %w", err)
Copy link
Contributor

@frobware frobware Jun 23, 2021

Choose a reason for hiding this comment

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

Shouldn't this be Fatal? Can the test continue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to Fatalf. Thanks!

@Miciah Miciah force-pushed the add-unsupported-config-override-for-reload-interval branch from 4221ea7 to 5629091 Compare June 26, 2021 03:37
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 26, 2021
@Miciah
Copy link
Contributor Author

Miciah commented Jun 26, 2021

Rebased to resolve a conflict in operator_test.go.

@Miciah Miciah force-pushed the add-unsupported-config-override-for-reload-interval branch from 5629091 to c0a7ca5 Compare June 26, 2021 03:38
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 26, 2021
@frobware
Copy link
Contributor

/lgtm

@frobware
Copy link
Contributor

/retest

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 28, 2021
@sgreene570
Copy link
Contributor

/lgtm
/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

defer assertIngressControllerDeleted(t, kclient, ic)

if err := waitForIngressControllerCondition(t, kclient, 5*time.Minute, icName, availableConditionsForPrivateIngressController...); err != nil {
t.Fatalf("failed to observe expected conditions: %w", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
t.Fatalf("failed to observe expected conditions: %w", err)
t.Fatalf("failed to observe expected conditions: %v", err)

Could this be whats causing the e2e-aws-operator job to keep failing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Thanks!

@sgreene570
Copy link
Contributor

This PR is perma-failing e2e-aws-operator due to a t.Fatalf called with %w.
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 28, 2021
@Miciah Miciah force-pushed the add-unsupported-config-override-for-reload-interval branch from c0a7ca5 to a95b8b1 Compare July 19, 2021 14:07
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2021
@frobware
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2021
@Miciah Miciah force-pushed the add-unsupported-config-override-for-reload-interval branch from a95b8b1 to 7cc62d3 Compare July 19, 2021 18:30
@openshift-ci openshift-ci bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed lgtm Indicates that a PR is ready to be merged. labels Jul 19, 2021
* pkg/operator/controller/ingress/deployment.go
(RouterReloadIntervalEnvName): New const.
(desiredRouterDeployment): Add unsupported config override for
RELOAD_INTERVAL.
* pkg/operator/controller/ingress/deployment_test.go
(TestDesiredRouterDeployment): Verify that desiredRouterDeployment sets
RELOAD_INTERVAL as expected.
* test/e2e/operator_test.go (TestReloadIntervalUnsupportedConfigOverride):
Verify that the operator sets RELOAD_INTERVAL to the value specified in the
unsupported configuration override or to the default value of 5 if no
override is specified.
@Miciah Miciah force-pushed the add-unsupported-config-override-for-reload-interval branch from 7cc62d3 to a849a88 Compare July 19, 2021 21:13
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 19, 2021
@Miciah
Copy link
Contributor Author

Miciah commented Jul 19, 2021

Rebased to resolve conflicts from #628.

@Miciah
Copy link
Contributor Author

Miciah commented Jul 20, 2021

[sig-auth][Feature:SCC][Early] should not have pod creation failures during install [Suite:openshift/conformance/parallel]

/test e2e-upgrade

@frobware
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 20, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: frobware, Miciah, sgreene570

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:
  • OWNERS [Miciah,frobware,sgreene570]

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

@Miciah
Copy link
Contributor Author

Miciah commented Jul 20, 2021

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 20, 2021
@openshift-merge-robot openshift-merge-robot merged commit 21a6703 into openshift:master Jul 20, 2021
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants