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

OCPBUGS-15978: Check public DNS zone when reporting status #967

Conversation

Miciah
Copy link
Contributor

@Miciah Miciah commented Jul 20, 2023

When reporting the "DNSReady" status condition on an IngressController, check the status conditions for both the public zone and the private zone of the associated DNSRecord.

Before this change, only the status condition for the private zone was used to compute the "DNSReady" status condition. If the operator failed to publish a DNS record in the public zone, this failure was not reported in the IngressController's status conditions or the "ingress" clusteroperator status conditions.

Follow-up to #641.

  • pkg/operator/controller/ingress/status.go (checkZoneInConfig): Use the new zonesMatch helper function to check both the public zone as well as the private zone.
    (zonesMatch): New function. Return a Boolean value indicating whether two DNS zones match, based on their respective ID or "Name" tags.
  • pkg/operator/controller/ingress/status_test.go (Test_checkZoneInConfig): Verify that checkZoneInConfig checks the public zone as well as the private zone. Delete "[PrivateZone]" from test-case descriptions as each test case is now tested as both a public zone and a private zone.

/hold
Rebase after #880 merges.

@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 Jul 20, 2023
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jul 20, 2023
@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-15978, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @lihongan

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

When reporting the "DNSReady" status condition on an IngressController, check the status conditions for both the public zone and the private zone of the associated DNSRecord.

Before this change, only the status condition for the private zone was used to compute the "DNSReady" status condition. If the operator failed to publish a DNS record in the public zone, this failure was not reported in the IngressController's status conditions or the "ingress" clusteroperator status conditions.

Follow-up to #641.

  • pkg/operator/controller/ingress/status.go (checkZoneInConfig): Use the new zonesMatch helper function to check both the public zone as well as the private zone.
    (zonesMatch): New function. Return a Boolean value indicating whether two DNS zones match, based on their respective ID or "Name" tags.
  • pkg/operator/controller/ingress/status_test.go (TestZoneInConfig): Verify that checkZoneInConfig checks the public zone as well as the private zone.

/hold
Rebase after #880 merges.

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/test-infra repository.

@Miciah Miciah force-pushed the OCPBUGS-15978-check-public-DNS-zone-when-reporting-status branch from 9f9e4ef to 04e74bd Compare July 24, 2023 13:23
@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-15978, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @lihongan

In response to this:

When reporting the "DNSReady" status condition on an IngressController, check the status conditions for both the public zone and the private zone of the associated DNSRecord.

Before this change, only the status condition for the private zone was used to compute the "DNSReady" status condition. If the operator failed to publish a DNS record in the public zone, this failure was not reported in the IngressController's status conditions or the "ingress" clusteroperator status conditions.

Follow-up to #641.

  • pkg/operator/controller/ingress/status.go (checkZoneInConfig): Use the new zonesMatch helper function to check both the public zone as well as the private zone.
    (zonesMatch): New function. Return a Boolean value indicating whether two DNS zones match, based on their respective ID or "Name" tags.
  • pkg/operator/controller/ingress/status_test.go (Test_checkZoneInConfig): Verify that checkZoneInConfig checks the public zone as well as the private zone.

/hold
Rebase after #880 merges.

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/test-infra repository.

@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-15978, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @lihongan

In response to this:

When reporting the "DNSReady" status condition on an IngressController, check the status conditions for both the public zone and the private zone of the associated DNSRecord.

Before this change, only the status condition for the private zone was used to compute the "DNSReady" status condition. If the operator failed to publish a DNS record in the public zone, this failure was not reported in the IngressController's status conditions or the "ingress" clusteroperator status conditions.

Follow-up to #641.

  • pkg/operator/controller/ingress/status.go (checkZoneInConfig): Use the new zonesMatch helper function to check both the public zone as well as the private zone.
    (zonesMatch): New function. Return a Boolean value indicating whether two DNS zones match, based on their respective ID or "Name" tags.
  • pkg/operator/controller/ingress/status_test.go (Test_checkZoneInConfig): Verify that checkZoneInConfig checks the public zone as well as the private zone.

/hold
Rebase after #880 merges.

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/test-infra repository.

@Miciah
Copy link
Contributor Author

Miciah commented Jul 24, 2023

@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 24, 2023
@candita
Copy link
Contributor

candita commented Jul 26, 2023

/assign

Copy link
Contributor

Choose a reason for hiding this comment

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

Now that you're testing the public zone too, maybe you should adjust the test description prefixes to something other than "[PrivateZone]".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if dnsConfig.Spec.PrivateZone.ID == zone.ID {
return true
}
return zonesMatch(&zone, dnsConfig.Spec.PublicZone) || zonesMatch(&zone, dnsConfig.Spec.PrivateZone)
Copy link
Contributor

@candita candita Aug 15, 2023

Choose a reason for hiding this comment

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

Is this guaranteed to run the second half of the conjunction if the first half is true? In other words, will it just stop evaluating if the public zone matches? Also, is it possible for there to be both a Spec.PublicZone and Spec.PrivateZone , so that we'd want to use && rather than ||?

Copy link
Contributor

Choose a reason for hiding this comment

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

I get it now. You can disregard this.

@candita
Copy link
Contributor

candita commented Aug 15, 2023

It just needs a new description for the unit tests.

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 15, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: candita

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 Aug 15, 2023
@candita
Copy link
Contributor

candita commented Aug 15, 2023

Noticed quite alot of ssh failures, try again.

core@10.0.141.24: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Failed to ssh to AWS instance, dumping ssh configuration
Attempt #1: ssh -F /tmp/tmp.KScJF3KjtJ -n machine sudo journalctl > /tmp/journal.log && gzip -f /tmp/journal.log

/test e2e-hypershift

When reporting the "DNSReady" status condition on an IngressController,
check the status conditions for both the public zone and the private zone
of the associated DNSRecord.

Before this commit, only the status condition for the private zone was used
to compute the "DNSReady" status condition.  If the operator failed to
publish a DNS record in the public zone, this failure was not reported in
the IngressController's status conditions or the "ingress" clusteroperator
status conditions.

Follow-up to commit 9f32923.

This commit fixes OCPBUGS-15978.

https://issues.redhat.com/browse/OCPBUGS-15978

* pkg/operator/controller/ingress/status.go (checkZoneInConfig): Use the
new zonesMatch helper function to check both the public zone as well as the
private zone.
(zonesMatch): New function.  Return a Boolean value indicating whether two
DNS zones match, based on their respective ID or "Name" tags.
* pkg/operator/controller/ingress/status_test.go (Test_checkZoneInConfig):
Verify that checkZoneInConfig checks the public zone as well as the private
zone.  Delete "[PrivateZone]" from test-case descriptions as each test case
is now tested as both a public zone and a private zone.
@Miciah Miciah force-pushed the OCPBUGS-15978-check-public-DNS-zone-when-reporting-status branch from 04e74bd to 5578044 Compare August 15, 2023 23:19
@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-15978, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @lihongan

In response to this:

When reporting the "DNSReady" status condition on an IngressController, check the status conditions for both the public zone and the private zone of the associated DNSRecord.

Before this change, only the status condition for the private zone was used to compute the "DNSReady" status condition. If the operator failed to publish a DNS record in the public zone, this failure was not reported in the IngressController's status conditions or the "ingress" clusteroperator status conditions.

Follow-up to #641.

  • pkg/operator/controller/ingress/status.go (checkZoneInConfig): Use the new zonesMatch helper function to check both the public zone as well as the private zone.
    (zonesMatch): New function. Return a Boolean value indicating whether two DNS zones match, based on their respective ID or "Name" tags.
  • pkg/operator/controller/ingress/status_test.go (Test_checkZoneInConfig): Verify that checkZoneInConfig checks the public zone as well as the private zone. Delete "[PrivateZone]" from test-case descriptions as each test case is now tested as both a public zone and a private zone.

/hold
Rebase after #880 merges.

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/test-infra repository.

@Miciah
Copy link
Contributor Author

Miciah commented Aug 15, 2023

https://github.com/openshift/cluster-ingress-operator/compare/04e74bd30f2438729d7ed8d22f63b1b8ce25d01b..55780444031714fc931d90af298a4b193888977a deletes "[PrivateZone]" from test-case descriptions as each test case is now tested as both a public zone and a private zone.

@candita
Copy link
Contributor

candita commented Aug 16, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 16, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 16, 2023

@Miciah: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-azure-ovn 5578044 link false /test e2e-azure-ovn

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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit cd97771 into openshift:master Aug 16, 2023
13 of 14 checks passed
@openshift-ci-robot
Copy link
Contributor

@Miciah: Jira Issue OCPBUGS-15978: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-15978 has been moved to the MODIFIED state.

In response to this:

When reporting the "DNSReady" status condition on an IngressController, check the status conditions for both the public zone and the private zone of the associated DNSRecord.

Before this change, only the status condition for the private zone was used to compute the "DNSReady" status condition. If the operator failed to publish a DNS record in the public zone, this failure was not reported in the IngressController's status conditions or the "ingress" clusteroperator status conditions.

Follow-up to #641.

  • pkg/operator/controller/ingress/status.go (checkZoneInConfig): Use the new zonesMatch helper function to check both the public zone as well as the private zone.
    (zonesMatch): New function. Return a Boolean value indicating whether two DNS zones match, based on their respective ID or "Name" tags.
  • pkg/operator/controller/ingress/status_test.go (Test_checkZoneInConfig): Verify that checkZoneInConfig checks the public zone as well as the private zone. Delete "[PrivateZone]" from test-case descriptions as each test case is now tested as both a public zone and a private zone.

/hold
Rebase after #880 merges.

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/test-infra repository.

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/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants