Description of problem: Some VIP IDs fails to work. Version-Release number of selected component (if applicable): ucarp-1.5.2-1.el6.x86_64 (I'm testing the EPEL version but reporting to the Fedora product since it most likely applies to both.) How reproducible: Always. Steps to Reproduce: 1. Install ucarp 2. Add a vip-008.conf 3. Start ucarp Actual results: Syslog report: [ERROR] You must supply a valid virtual host id Expected results: Working ucarp Additional info: It works with vip-007.conf, so I'm assuming the leading zeroes causes the number to be interpreted as octal. The easy fix would be to change the sed in the old sysv script and the new unit file helper script to "sed 's/^vip-0*\(.*\).conf/\1/'". This would be an incompatible change so it might not be possible to apply it current releases. I suppose the reason why the sample vip-001.conf.example has the leading zeroes in the name is to suggest using those to make the directory listing sorting order match a numeric sort.
Incompatible how, as in will change behaviour with existing conf files?
Yeah, (if my guess about octal is right then) if you have a file vip-010.conf currently that's actually VIP 8 (in decimal), but if the sed is changed to remove the leading zeroes it'll be VIP 10. It's likely that the admin would update or upgrade one machine at a time, so this could cause some problems, but the current state is very confusing too.
Are you able to test?
I can easily test on el6, but I could test on rawhide too if needed. You could replace the line: [ ${ID} ] || ID=`echo ${FILE} | sed 's/^vip-\(.*\).conf/\1/'` with something like if [[ -z "$ID" ]]; then ID="${FILE#vip-}"; ID="${ID%.conf}" IDnozero="${ID#0}"; IDnozero="${IDnozero#0}" if [[ "$ID" != "$IDnozero" ]]; then if [[ "${ID}" != "${ID/8}" || "${ID}" != "${ID/9}" ]]; then # Has leading zeroes, is not a valid octal number. # Remove leading zeroes, interpret it as decimal. ID="$IDnozero" else # Has leading zeroes, will be interpreted as octal. ${LOGGER} "$FILE uses VIP ID" $(($ID)) "(octal $ID). To use $ID, add the line 'ID=$IDnozero' to $FILE or rename it to vip-$IDnozero.conf" fi fi fi It makes "008" mean decimal 8 instead of failing to start ucarp and warns on "010" (decimal 8) but lets it keep working. Or do the incompatible change, which is simpler: if [[ -z "$ID" ]]; then ID="${FILE#vip-}"; ID="${ID%.conf}" IDnozero="${ID#0}"; IDnozero="${IDnozero#0}" if [[ "$ID" != "$IDnozero" ]]; then if [[ "${ID}" = "${ID/8}" && "${ID}" = "${ID/9}" ]]; then # Only warn if it is a valid octal number. ${LOGGER} "$FILE uses VIP ID $IDnozero, in previous releases it may have been using" $(($ID)) "(octal $ID). Add the line 'ID=$((ID))' or 'ID=$IDnozero' to $FILE to avoid this warning." fi ID="$IDnozero" fi fi
It doesn't apply to rawhide, I'll get an update out and it'll post a link here so you can test.
ucarp-1.5.2-6.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/ucarp-1.5.2-6.el6
Package ucarp-1.5.2-6.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing ucarp-1.5.2-6.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-13735/ucarp-1.5.2-6.el6 then log in and leave karma (feedback).
ucarp-1.5.2-6.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.