Skip to content

pkg/destroy/aws: Fix zone id in debug output #988

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

Merged

Conversation

Miciah
Copy link
Contributor

@Miciah Miciah commented Jan 3, 2019

Before this commit, when the installer requested tags for the zone from the AWS API and the request was throttled, the installer printed a message with the string pointer value of the zone id:

DEBUG sleeping before trying to resolve tags for zone %!s(*string=0xc420e7fdc8): Throttling: Rate exceeded

After this commit, the installer prints the string value:

DEBUG sleeping before trying to resolve tags for zone /hostedzone/Z2J66YWY5ZGE1: Throttling: Rate exceeded
  • pkg/destroy/aws/aws.go (r53ZonesToAWSObject): Dereference zone.Id when printing it.

Before this commit, when the installer requested tags for the zone from the
AWS API and the request was throttled, the installer printed a message with
the string pointer value of the zone id:

    DEBUG sleeping before trying to resolve tags for zone %!s(*string=0xc420e7fdc8): Throttling: Rate exceeded

After this commit, the installer prints the string value:

    DEBUG sleeping before trying to resolve tags for zone /hostedzone/Z2J66YWY5ZGE1: Throttling: Rate exceeded

* pkg/destroy/aws/aws.go (r53ZonesToAWSObject): Dereference zone.Id when
printing it.
@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 3, 2019
@wking
Copy link
Member

wking commented Jan 3, 2019

/lgtm
/retest

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 3, 2019
@openshift-bot
Copy link
Contributor

/retest

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

9 similar comments
@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

Copy link

@pravisankar pravisankar left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Miciah, pravisankar, wking

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-bot
Copy link
Contributor

/retest

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

@@ -1206,7 +1206,7 @@ func r53ZonesToAWSObjects(zones []*route53.HostedZone, r53Client *route53.Route5
})
if err != nil {
if request.IsErrorThrottle(err) {
logger.Debugf("sleeping before trying to resolve tags for zone %s: %v", zone.Id, err)
logger.Debugf("sleeping before trying to resolve tags for zone %s: %v", *zone.Id, 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 zone.Id guaranteed not to be nil?

Copy link
Contributor Author

@Miciah Miciah Jan 4, 2019

Choose a reason for hiding this comment

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

I think so. We already dereference it without checking on line 1225. We could use aws.StringValue(zone.Id) though.

Copy link
Member

@wking wking Jan 4, 2019

Choose a reason for hiding this comment

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

Is zone.Id guaranteed not to be nil?

If zone.Id is not nil, we have a big problem and want to panic ;). It's going to be impossible to remove a zone if we don't know its ID.

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-merge-robot openshift-merge-robot merged commit 94746bd into openshift:master Jan 5, 2019
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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants