Page MenuHomeClusterLabs Projects

OCF_OUTPUT_FORMAT is set inappropriately
Open, NormalPublic

Description

Each time a new pcmk__output_t object is created, it sets the OCF_OUTPUT_FORMAT environment variable. This is problematic for at least two reasons:

  1. The environment variable is set based on the most recently created output object. So for example, if we had a log object and a text object, the order in which they're created determines the value of the environment variable.
  2. This approach doesn't seem to align with the intent of OCF_OUTPUT_FORMAT. The environment variable is supposed to tell an OCF resource agent which format to use for any output that it generates. But a resource agent isn't coupled to any pcmk__output_t object that may (or may not exist). So IMO it doesn't make sense to set the variable based on a pcmk__output_t object.

Also note that no ClusterLabs-provided resource agents actually check OCF_OUTPUT_FORMAT yet.

Ref:

Event Timeline

nrwahl2 triaged this task as Normal priority.Dec 19 2023, 2:24 AM
nrwahl2 created this task.
nrwahl2 created this object with edit policy "Restricted Project (Project)".