Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
man keepalived.conf clearly states
"
$IF_MAIN=@main
$IF_MAIN priority 240
will produce:
priority 240
if the config_id is main and nothing if the config_id is not main,
although why anyone would want to use this rather than simply the
following is not known (but still possible):
@main priority 240
"
Yet this does not work correctly under all circumstances.
Version-Release number of selected component (if applicable):
2.2.4 (also affects 2.1.5)
How reproducible:
Consistently reproducible on RHEL 8.6 and 9.0
Steps to Reproduce:
1.
set the following in keepalived.conf
$PRI=@my-server-id
$PRI priority 240
on expansion will produce garbled output
Actual results:
journalctl -xe shows in the log:
Unknown keyword 'priorixxxx' where xxxx is trailing part of host name.
Expected results:
For priority to be set
Additional info:
The reason is that after the variable value substitution, the line-length is not recalculated.
Fix is to apply the following patch
I've recalculated the buffer length at the head of the loop for obvious correctness and resilience in the case of future code changes
--- a/lib/parser.c 2022-06-27 08:58:01.163365991 +0100
+++ b/lib/parser.c 2022-06-27 09:05:08.456532867 +0100
@@ -2735,7 +2735,8 @@
do {
recheck = false;
- if (buf[0] == '@') {
+ len = strlen(buf);
+ if (buf[0] == '@') {
/* If the line starts '@', check the following word matches the system id.
@^ reverses the sense of the match */
if (buf[1] == '^') {
Tested for keepalived-2.2.4-6.el9.x86_64
keepalived.conf:
vrrp_instance VI_1 {
$PRI=@my-server-id
$PRI priority 240
...
Running journalctl does not show any errors.
Keepalived parses conf file properly and works as expected.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (keepalived bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:2335
Description of problem: man keepalived.conf clearly states " $IF_MAIN=@main $IF_MAIN priority 240 will produce: priority 240 if the config_id is main and nothing if the config_id is not main, although why anyone would want to use this rather than simply the following is not known (but still possible): @main priority 240 " Yet this does not work correctly under all circumstances. Version-Release number of selected component (if applicable): 2.2.4 (also affects 2.1.5) How reproducible: Consistently reproducible on RHEL 8.6 and 9.0 Steps to Reproduce: 1. set the following in keepalived.conf $PRI=@my-server-id $PRI priority 240 on expansion will produce garbled output Actual results: journalctl -xe shows in the log: Unknown keyword 'priorixxxx' where xxxx is trailing part of host name. Expected results: For priority to be set Additional info: The reason is that after the variable value substitution, the line-length is not recalculated. Fix is to apply the following patch I've recalculated the buffer length at the head of the loop for obvious correctness and resilience in the case of future code changes --- a/lib/parser.c 2022-06-27 08:58:01.163365991 +0100 +++ b/lib/parser.c 2022-06-27 09:05:08.456532867 +0100 @@ -2735,7 +2735,8 @@ do { recheck = false; - if (buf[0] == '@') { + len = strlen(buf); + if (buf[0] == '@') { /* If the line starts '@', check the following word matches the system id. @^ reverses the sense of the match */ if (buf[1] == '^') {