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

IPVS SNMP fixes, improvements and enhancements #2409

Merged
merged 24 commits into from
Apr 28, 2024

Commits on Apr 28, 2024

  1. ipvs: Add snmp_vs_stats_update_interval for updating SNMP stats

    The timer for updating VS and RS stats for SNMP was hard coded to
    5 seconds. This commit still deffaults to 5 seconds but allows the
    timer to be configured.
    
    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    5f374fc View commit details
    Browse the repository at this point in the history
  2. ipvs: Don't call calloc() in ipvs_get_service()

    We need to use our wrappers around malloc/free calls, so it now
    just calls MALLOC().
    
    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    7361417 View commit details
    Browse the repository at this point in the history
  3. ipvs: Make ipvs_get_dests() use individual parameters

    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    f94ddac View commit details
    Browse the repository at this point in the history
  4. ipvs: rs_cnt is only used when using SNMP

    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    cd8a13e View commit details
    Browse the repository at this point in the history
  5. ipvs: optimise setting tsvc in ipvs_get_service()

    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    91496f8 View commit details
    Browse the repository at this point in the history
  6. configure: add comment re when IPVS netlink support started

    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    97d0ac4 View commit details
    Browse the repository at this point in the history
  7. ipvs: Add snmp_rs_stats_update_interval

    This compliments snmp_vs_stats_update_interval, and also real server
    stats are now only fetched from the kernel when there is an SNMP
    request for them; i.e. VS stats and RS stats are updated separately.
    
    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    3a8ea5f View commit details
    Browse the repository at this point in the history
  8. ipvs: Use assignment of structures rather than memcpy()

    This allows proper type checking by the compiler.
    
    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    c7bade7 View commit details
    Browse the repository at this point in the history
  9. ipvs: fix updating stats for SNMP when fetched via socket interface

    This code is probably never used, since netlink is now used in
    preference to the old socket interface, and the socket interface is
    only used if netlink fails, which should neveer be the case.
    
    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    7752c33 View commit details
    Browse the repository at this point in the history
  10. ipvs: Don't duplicate storage of 32 bit SNMP stats

    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    930f3b7 View commit details
    Browse the repository at this point in the history
  11. ipvs: Use correct variable for returning 64 bit stats for SNMP

    The long_ret variable was being set but the address of the
    counter64_ret variable was being return for the low 32 bits of
    the stats counters.
    
    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    aa83c57 View commit details
    Browse the repository at this point in the history
  12. ipvs: Add counter64 options for 64 bit SNMP stats

    For most 64 bit counter stats, the only way of reading them was
    to read the high and low 32 bits seperately.
    
    This commit adds 64 bit counters for this stats, so they can be
    read with only one snmp get.
    
    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    7f3f2ba View commit details
    Browse the repository at this point in the history
  13. ipvs: Use structure sizes for lengths of IPv4/6 addresses

    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    e13b3b8 View commit details
    Browse the repository at this point in the history
  14. ipvs: Use SNMP variable3/4/7 instead of variable8 where appropriate

    This reduces the memory usage of keepalived
    
    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    63591bc View commit details
    Browse the repository at this point in the history
  15. ipvs: streamline SNMP real server code when no sorry server

    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    b37052a View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    062f1df View commit details
    Browse the repository at this point in the history
  17. ipvs: Use kernel structures for ipvs daemon parameters

    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    18f3835 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    247fd14 View commit details
    Browse the repository at this point in the history
  19. ipvs: Streamline finding VS group entry for SNMP

    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    c3133e9 View commit details
    Browse the repository at this point in the history
  20. ipvs: Streamline finding RS for SNMP

    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    280e16b View commit details
    Browse the repository at this point in the history
  21. ipvs: Streamline finding VS for SNMP

    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    254513a View commit details
    Browse the repository at this point in the history
  22. ipvs: don't duplicate ipvs_getinfo() functionality

    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    35195dc View commit details
    Browse the repository at this point in the history
  23. ipvs: set var_len = 0 when returning an error to SNMP

    The net-snmp code does this in header_simple_table(), so we should
    do so when using a non-simple table.
    
    Signed-off-by: Quentin Armitage <[email protected]>
    pqarmitage committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    2e165df View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    5a85dec View commit details
    Browse the repository at this point in the history