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

VRRP: add thread_timer_expired keyword as a synonym of timer_expired_… #2470

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/man/man5/keepalived.conf.5.in
Original file line number Diff line number Diff line change
Expand Up @@ -1868,7 +1868,7 @@ The syntax for vrrp_instance is :
# whether another instance may have taken over (based on the advert interval and
# the highest priority of the other instances - default 254 unless specified with
# this option), and if that time has expired since the last advert has been sent,
# the VRRP instance will revert to backup state (remember to include and track_script
# the VRRP instance will revert to backup state (remember to include any track_script
# etc. weights when calculating the highest priority of other instances).
\fbthread_timer_expired \fR[HIGHEST_PRIORITY_OF_OTHER_INSTANCES]

Expand Down
9 changes: 8 additions & 1 deletion keepalived/vrrp/vrrp_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1369,13 +1369,19 @@ vrrp_timer_expired_backup_handler(const vector_t *strvec)

if (vector_size(strvec) >= 2) {
if (!read_unsigned_strvec(strvec, 1, &other_priority, 1, VRRP_PRIO_OWNER - 1, false)) {
report_config_error(CONFIG_GENERAL_ERROR, "(%s) timer_expired _backup highest_other_priority not valid! must be between 1 & %d", current_vrrp->iname, VRRP_PRIO_OWNER - 1);
report_config_error(CONFIG_GENERAL_ERROR, "(%s) timer_expired_backup highest_other_priority not valid! must be between 1 & %d", current_vrrp->iname, VRRP_PRIO_OWNER - 1);
return;
}
}

current_vrrp->highest_other_priority = (uint8_t)other_priority;
}
static void
vrrp_thread_timer_expired_handler(const vector_t *strvec)
{
report_config_error(CONFIG_GENERAL_ERROR, "(%s) thread_timer_expired - please replace with keyword 'timer_expired_backup'", current_vrrp->iname);
vrrp_timer_expired_backup_handler(strvec);
}
#ifdef _HAVE_VRRP_VMAC_
static void
vrrp_garp_extra_if_handler(const vector_t *strvec)
Expand Down Expand Up @@ -2215,6 +2221,7 @@ init_vrrp_keywords(bool active)
install_keyword("garp_lower_prio_repeat", &vrrp_garp_lower_prio_rep_handler);
install_keyword("down_timer_adverts", &vrrp_down_timer_adverts_handler);
install_keyword("timer_expired_backup", &vrrp_timer_expired_backup_handler);
install_keyword("thread_timer_expired", &vrrp_thread_timer_expired_handler); // Added to match the release notes
#ifdef _HAVE_VRRP_VMAC_
install_keyword("garp_extra_if", &vrrp_garp_extra_if_handler);
install_keyword("vmac_garp_intvl", &vrrp_garp_extra_if_handler); /* Deprecated after v2.2.2 - incorrect keyword in commit 3dcd13c */
Expand Down
Loading