Skip to content

Commit a7f34c9

Browse files
authored
Merge pull request #2470 from pqarmitage/updates
VRRP: add thread_timer_expired keyword as a synonym of timer_expired_…
2 parents b6681f9 + 9c7d00c commit a7f34c9

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

doc/man/man5/keepalived.conf.5.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1868,7 +1868,7 @@ The syntax for vrrp_instance is :
18681868
# whether another instance may have taken over (based on the advert interval and
18691869
# the highest priority of the other instances - default 254 unless specified with
18701870
# this option), and if that time has expired since the last advert has been sent,
1871-
# the VRRP instance will revert to backup state (remember to include and track_script
1871+
# the VRRP instance will revert to backup state (remember to include any track_script
18721872
# etc. weights when calculating the highest priority of other instances).
18731873
\fbthread_timer_expired \fR[HIGHEST_PRIORITY_OF_OTHER_INSTANCES]
18741874

keepalived/vrrp/vrrp_parser.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1369,13 +1369,19 @@ vrrp_timer_expired_backup_handler(const vector_t *strvec)
13691369

13701370
if (vector_size(strvec) >= 2) {
13711371
if (!read_unsigned_strvec(strvec, 1, &other_priority, 1, VRRP_PRIO_OWNER - 1, false)) {
1372-
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);
1372+
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);
13731373
return;
13741374
}
13751375
}
13761376

13771377
current_vrrp->highest_other_priority = (uint8_t)other_priority;
13781378
}
1379+
static void
1380+
vrrp_thread_timer_expired_handler(const vector_t *strvec)
1381+
{
1382+
report_config_error(CONFIG_GENERAL_ERROR, "(%s) thread_timer_expired - please replace with keyword 'timer_expired_backup'", current_vrrp->iname);
1383+
vrrp_timer_expired_backup_handler(strvec);
1384+
}
13791385
#ifdef _HAVE_VRRP_VMAC_
13801386
static void
13811387
vrrp_garp_extra_if_handler(const vector_t *strvec)
@@ -2215,6 +2221,7 @@ init_vrrp_keywords(bool active)
22152221
install_keyword("garp_lower_prio_repeat", &vrrp_garp_lower_prio_rep_handler);
22162222
install_keyword("down_timer_adverts", &vrrp_down_timer_adverts_handler);
22172223
install_keyword("timer_expired_backup", &vrrp_timer_expired_backup_handler);
2224+
install_keyword("thread_timer_expired", &vrrp_thread_timer_expired_handler); // Added to match the release notes
22182225
#ifdef _HAVE_VRRP_VMAC_
22192226
install_keyword("garp_extra_if", &vrrp_garp_extra_if_handler);
22202227
install_keyword("vmac_garp_intvl", &vrrp_garp_extra_if_handler); /* Deprecated after v2.2.2 - incorrect keyword in commit 3dcd13c */

0 commit comments

Comments
 (0)