openbmc / phosphor-state-manager

Apache License 2.0
11 stars 21 forks source link

PSM Assumes /run/openbmc/ Always Exists #22

Closed iwoloschin closed 4 months ago

iwoloschin commented 1 year ago

PSM appears to always assume that /run/openbmc/always exists, but in a fairly generic OpenBMC build (private repo so I can't share directly, but very, very basic) this directory does not exist by default. It appears that PSM itself does not ensure this directory is created, and worse, PSM does not have any log errors if files could not be created. Obviously without /run/openbmc/ none of the various ConditionPathExists checks in unit files work as expected.

A silly and terrible fix is to just ExecStartPre=/bin/mkdir -p /run/openbmc/ on one of the PSM service files. I've confirmed this fixes the problem, though is clearly not the right way to fix this.

geissonator commented 1 year ago

Yeah, we've had a few bugs in the past around this assumption. The initial design was that whoever needed to put a file in the dir, made sure the dir was there. But then there were some misses and assumptions (if host file getting created, then "something" must have made dir for chassis). Lets just make the dir by default when the chassis app first comes up.