Page MenuHomeClusterLabs Projects

Reject too-large --timeout values in crm_resource
Open, NormalPublic

Assigned To
Authored By
Tue, Jul 2, 10:39 AM
  • Restricted Project
  • Restricted Project
  • Restricted Project
Referenced Files


Currently, crm_resource --wait --timeout 900000000s returns immediately with a "Timeout occurred" message. It should either cap the value to UINT_MAX or return an error.

Deprecate crm_get_msec() and replace it internally with a new function int pcmk__parse_ms(const char *str, long long *ms) that returns a standard Pacemaker return code (including EOVERFLOW when appropriate instead of silently capping), allows negative numbers, either handles (and rounds) floating-point values or rejects them (instead of silently truncating), and matches units exactly.

It becomes the caller's responsibility to handle negative values and overflow as desired.

The unit matching would be a change in behavior that should only be done at a minor or major series bump, and could be split off as a separate project for that reason.


Event Timeline

kgaillot triaged this task as Normal priority.Tue, Jul 2, 10:39 AM
kgaillot created this task.
kgaillot created this object with edit policy "Restricted Project (Project)".