Bug 809421
| Summary: | VIP ID interpretation | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Alexander Boström <abo> |
| Component: | ucarp | Assignee: | Gwyn Ciesla <gwync> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | fabian.deutsch, gwync |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-12-27 20:06:24 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Alexander Boström
2012-04-03 10:29:19 UTC
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. |