-
Notifications
You must be signed in to change notification settings - Fork 844
Add Nexthop selection strategies and @strategy tag to remap.config. #5960
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
Conversation
f6b21e2 to
2420a8e
Compare
7594037 to
3c0d503
Compare
|
This is a big PR. I'll try to read through this over the next week. |
randall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with the general format here. (strategies, groups, hosts). Personally, I find the #include business weird. Maybe what Alan suggested with include: [filename.yaml, file2.yaml] is better. I don't have a strong enough option here to argue either way.
ddb3388 to
274ea6c
Compare
|
@randall the #include is used to concatenate multiple file streams into a single stream as a single YAML document that then may be parsed. @AMC idea of using 'include: [ file1.yaml, file2.yaml] complicates this IMHO. I'd have to parse a partial YAML file, look for a YAML 'include:' name space then re-read all the files so that I can then parse 'strategies'. I think this makes it too complicated and I think the '#include file' is simpler and more flexible. I do like @AMC's idea of reading a directory and concatenating YAML files in 'ls' order and I'll probably add that. But, using a YAML list to include other files just seems to complicated to me so, I'm leaving the '#include' for now. |
6fe13f0 to
31ca77b
Compare
a-canary
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of comments and questions. Only blocking concerns are:
- REMAP_OPTFLG_STRATEGY 0x800000000u is too big.
- NextHopSelectionStrategy::markNextHopDown isn't called from anywhere.
@a-canary this is fixed. |
44316d7 to
c032f79
Compare
|
rebased to pick up fix for FreeBSD CI build |
|
+1 |
|
I am still looking into this PR |
vmamidi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gtenev is looking into this PR.
|
+1. I agree I’ve already seen the code. I am now waiting for Gancho’s feedback.
… On Nov 12, 2019, at 7:48 AM, a-a-ron ***@***.***> wrote:
@gtenev @vmamidi This code isn't perfect. But it's a step in the right direction. I expect this to evolve and mature greatly over the next few releases. We'll start testing this for production in Q1.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
c032f79 to
f54a0af
Compare
|
rebased to pick up yaml 0.6.3 update. |
8fedbe5 to
e6f5c69
Compare
calavera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks very useful. I really like the failover strategies part 👍
|
@calavera still working on some review comments. It'll go in soon. |
161ab8c to
d3c57a9
Compare
d3c57a9 to
37ce23f
Compare
|
This is breaking big time on the CI, segfaulting the tests. |
This PR adds NextHop selection strategies that may be used in place of the parent selection strategies in parent.config. The NextHop selection strategies are used in remap.config with a new @strategy tag. NextHop strategies are defined in a new config file, 'strategies.yaml'. When the remap.config is loaded, the NextHopStrategy factory loads the strategies.yaml and creates and configures instances of NextHopSelectionStrategies. When remap.config is parsed, a strategy is associated with a remap entry if there is a tag '@strategy=$name' in the config. If the strategy is configured for a remap, wrapper functions used for parent selection in HttpTransact will prefer the NextHopSelection strategies over the ParentSelection strategies when searchin for a NextHop or parent host. Sample strategy.yaml files are at proxy/http/remap/unit-tests.