Bug 2216492
Summary: | iso8601 evaluates date in format "YYYY-DDD/XX" as valid | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Michal Mazourek <mmazoure> |
Component: | pacemaker | Assignee: | Ken Gaillot <kgaillot> |
Status: | CLOSED NOTABUG | QA Contact: | cluster-qe <cluster-qe> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 9.3 | CC: | cluster-maint, nwahl |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-06-27 16:51:35 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
Michal Mazourek
2023-06-21 15:28:48 UTC
Thanks for reporting this. This isn't terribly surprising. There are a number of known issues with Pacemaker's date/time parsing. See also: - Use a consistent API for time values (https://projects.clusterlabs.org/T432) - Parse ISO8601 time zone offsets correctly (https://projects.clusterlabs.org/T188) We can probably fix this particular issue without too much trouble. However, QE will likely find other edge cases until we either switch to a third-party date/time library (like GDateTime) or spend far too much time making our own iso8601 library robust (not worth it). Pacemaker's time parser is extremely lenient, probably too much so. ISO 8601 uses a slash in period (interval) specifications, which Pacemaker also parses, for example: # iso8601 --period "2023-06-01/2023-06-15" Period: 2023-06-01 00:00:00Z to 2023-06-15 00:00:00Z # iso8601 --period "2023-06-20/XXX" iso8601: Invalid interval specified: 2023-06-20/XXX What is basically happening is that `iso8601 --date` accepts period-format specifications, in which case it only looks at the start of the period, so it doesn't care that the end of the period is invalid. Since Pacemaker itself will do the same thing (where a date is needed), it's not really a bug -- iso8601 is validating what Pacemaker would accept. It's definitely a reasonable feature request to be more strict about what Pacemaker accepts. I lean to doing that at RHEL 10 though, to avoid breaking backward compatibility within the RHEL 8 or 9 series. Once RHEL 10 issue reporting is settled, I'll open an issue for that. |