freeradius-server icon indicating copy to clipboard operation
freeradius-server copied to clipboard

rlm_redis_ippool: break out lua scripts as defacto schema (take 2)

Open jimdigriz opened this issue 5 years ago • 17 comments

Resurrected the work from https://github.com/FreeRADIUS/freeradius-server/pull/2626

Summary of changes:

  • fix redis_ippool unit tests
  • extracted lua code into separate files (can be treated as a schema for redis_ippool)
  • documented the namespace usage in Redis
  • moved rlm_redis_ippool.c:ippool_script to cluster.c:fr_redis_script so to remove code duplication
  • moved IP iteration into Lua (partially addresses concerns in #1744)
    • includes 65k item guard for range based operations
  • support sticky IPs (device keys live for 10x lease time)
  • Misc other unrelated changes
    • includes temporary workaround for #3466 to make tests pass (will be removed once resolved)
    • fix for dockerbuild
    • fix rlm_lua install

Changes since last PR:

  • broken the patch set further to show evolution of Lua scripts
  • removed the netinfo feature that was added (generic KV store)
  • made lease info use arrays instead of JSON
  • retained gateway/counter entries
  • 'modify' retained (reuses 'add')

jimdigriz avatar May 24 '20 11:05 jimdigriz

This pull request introduces 1 alert when merging 3e10f1ff840f6f624665ca72ff2ec88048cb6c34 into ef9fb7334f78da0b70a6563c3f72941566c2a9c1 - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar May 24 '20 11:05 lgtm-com[bot]

  • Misc other unrelated changes
    • includes temporary workaround for #3466 to make tests pass (will be removed once resolved)`

Now dropped after fix.

The cache_rbtree unit tests remains disable until fixed upstream.

jimdigriz avatar May 24 '20 14:05 jimdigriz

This pull request introduces 1 alert when merging 2b18b973ff1bb5e8417a103d6aba430da41183ab into 6569b39943195977711e3f84496ef8e65c64583d - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar May 24 '20 14:05 lgtm-com[bot]

The cache_rbtree unit tests remains disable until fixed upstream.

Now dropped after fix.

jimdigriz avatar May 24 '20 17:05 jimdigriz

This pull request introduces 1 alert when merging 412f6d1ca080c6b3a9fbdb2f834a5727c5dfe8bb into eada45a50c25079e9957b27472f4a510f15e3ed0 - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar May 24 '20 17:05 lgtm-com[bot]

This pull request introduces 1 alert when merging 46997d0510fd0bfee11845333bdd0f6882d458a8 into 7cad2fc1237478c21ff0e86600c36904323a2d21 - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar May 25 '20 06:05 lgtm-com[bot]

This pull request introduces 1 alert when merging 46c6db43bbf1988ebc8a1fdd03300857b2c48855 into 0d6800f8b19377d38196401fb32d8d54afc272bd - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar May 25 '20 16:05 lgtm-com[bot]

This pull request introduces 1 alert when merging 7bf4d045263719bfefb3bc30860eeb62878987ef into 261d0b9fac5ac867839f50cdf85c6c7057fa35bd - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar May 26 '20 00:05 lgtm-com[bot]

This pull request introduces 1 alert when merging 720f734deda33165a88b7d980b3ecde0684329d2 into 436ee70ef63d2fae65178337806020566f01d64c - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar May 26 '20 06:05 lgtm-com[bot]

This pull request introduces 1 alert when merging b81dd951794fa40ba284d973a355a9aef69aa69a into c6fcf296f0fb0ecfd17c4e6bbde3335de6f5a271 - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar May 28 '20 23:05 lgtm-com[bot]

This pull request introduces 1 alert when merging 945dd8ed5cda6a206c4347620583466073396c66 into 6971a29375fdc3dd5721dad1614b0a106e2bcdff - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar May 29 '20 11:05 lgtm-com[bot]

This pull request introduces 1 alert when merging 78a62435410bccb7509cccba034784c7922c3548 into 7af386e6d90e76a8504b746c9af517266df023e2 - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar May 30 '20 14:05 lgtm-com[bot]

On my laptop (from the build-docker10 image) the unit tests work for me:

[snipped]
MODULE-TEST python auth_multi_inst
MODULE-TEST python auth_cext_compat
MODULE-TEST redis cluster_node_fail
MODULE-TEST redis cluster_key
OK: redis.test
MODULE-TEST redis_ippool update_alloc
MODULE-TEST redis_ippool alloc
MODULE-TEST redis_ippool release
MODULE-TEST redis_ippool update
MODULE-TEST redis_ippool pool_tool_modify
MODULE-TEST redis_ippool pool_tool_delete
MODULE-TEST redis_ippool pool_tool_release
OK: redis_ippool.test
MODULE-TEST sql_sqlite acct_2_stop
MODULE-TEST sql_sqlite map
[snipped]

No idea why Travis is grumpy, if someone can get me debug access or have a look themselves?

It is really strange as Travis has no problems doing the redis tests but for the redis ippool tests it fails as the cluster does not start up properly; remap keeps returning bad-input.

jimdigriz avatar May 30 '20 14:05 jimdigriz

This pull request introduces 1 alert when merging 4f21c8e51d39486fb40b5b2f9925870a166311b7 into ff0ed5a8f5ec61fd5a496c9761689da5ba59e982 - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar May 30 '20 19:05 lgtm-com[bot]

This pull request introduces 1 alert when merging 2dfa8cd86f2ca2f2b2f27c68549b9ac4e2d7b0a1 into f39016d7757e7d70702bbe68887ec96f66829cd5 - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar May 31 '20 06:05 lgtm-com[bot]

This pull request introduces 1 alert when merging 7aaa897b9ec613f2eabe5c854801787b831132d3 into 69f1575e43d8eead74dd486d900ca406cd30f90a - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar Jun 09 '20 17:06 lgtm-com[bot]

This pull request introduces 1 alert when merging 4cde0a255287648dcfe654fe7ce543c57dc3d4c0 into 7a1293c17640e38a908c87d1d76f4e0b3fea6334 - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar Jul 07 '20 11:07 lgtm-com[bot]