HomeClusterLabs Projects

Refactor: all: use clearer symbols to avoid interval confusion

Description

Refactor: all: use clearer symbols to avoid interval confusion

A recurring source of bugs has been confusion between strings with interval
specifications supplied by the user and strings with intervals normalized to
milliseconds.

To help avoid this, symbols have been updated throughout the code base to be
more specific and consistent:

  • XML_LRM_ATTR_INTERVAL: XML attribute that takes interval specification (user-facing configuration)
  • XML_LRM_ATTR_INTERVAL_MS: XML attribute that takes interval in milliseconds (daemon APIs)
  • period_s: string with user-supplied ISO8601 time period specification
  • interval_spec: string with user-supplied interval specification (e.g. "60", "5min", "P30S")
  • interval_ms_s: string with interval in integer milliseconds (no units)
  • interval_ms: integer interval in milliseconds
  • interval_sec: integer interval in seconds

Details

Provenance
kgaillotAuthored on Mar 5 2018, 6:42 PM
Parents
rP2c83c6872af5: Merge pull request #1434 from kgaillot/changes20
Branches
Unknown
Tags
Unknown

Event Timeline