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

Fix for router with dynamic config changes not reloading #20559

Merged
merged 1 commit into from
Aug 7, 2018

Conversation

ramr
Copy link
Contributor

@ramr ramr commented Aug 6, 2018

we need to simulate an actual change otherwise router commit doesn't call reload (as it detects no diffs), so use a generated name and cleanup after.
fixes bugz #1612019

/cc @openshift/sig-network-edge

@openshift-ci-robot openshift-ci-robot added sig/network-edge size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 6, 2018
@ramr
Copy link
Contributor Author

ramr commented Aug 7, 2018

/retest

route := createBlueprintRoute(routeapi.TLSTerminationEdge)
route.Name = fmt.Sprintf("%v-1", route.Name)
route.Name = fmt.Sprintf("%v-temp-%d", route.Name, time.Now().Unix())
Copy link
Contributor

Choose a reason for hiding this comment

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

s/%v/%s/ ?

Copy link
Contributor

Choose a reason for hiding this comment

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

can't we use the route UUID and resource version instead of timestamp?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds nice to me, what do you think @ramr?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure that will work too - will do.

Copy link
Contributor Author

@ramr ramr Aug 7, 2018

Choose a reason for hiding this comment

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

Hmm, ok so weirdly I don't have that UUID and resource version.
Here's a log dump from the code in the router image:

W0807 04:27:03.848930       1 manager.go:665] dummy blueprint route = &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:_blueprint-edge-route-temp-1533616023 GenerateName: Namespace:_hapcm_blueprint_pool SelfLink: UID: ResourceVersion: Generation:0 CreationTimestamp:0001-01-01 00:00:00 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[] Initializers:nil Finalizers:[] ClusterName:} Spec:{Host: Path: To:{Kind: Name:_hapcm_blueprint_pool.svc Weight:0xc421bd4a7c} AlternateBackends:[] Port:<nil> TLS:0xc421722120 WildcardPolicy:} Status:{Ingress:[]}}

And I just realized why - this is not a real route object in etcd per se - it is just a prototype route created by the config manager to force the router to allocate a pre-allocated pool of routes.
So can't use that - will do the s#%v#%s# fix though.

Edited typos

simulate an actual change otherwise router commit doesn't call reload.
And address @mfojtik review comments.
fixes bugz #1612019
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 openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 7, 2018
@ironcladlou
Copy link
Contributor

/lgtm

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ironcladlou, pravisankar, ramr

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 7, 2018
@ramr
Copy link
Contributor Author

ramr commented Aug 7, 2018

/retest

@openshift-merge-robot openshift-merge-robot merged commit aa0979c into openshift:master Aug 7, 2018
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. sig/network-edge 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.

None yet

6 participants