Chandan Kumar (raukadah) d8ffce23ff Use mkdir -p while creating prometheus directory
On Re-run, prometheus directory exists and the run fails
with mkdir: cannot create directory ‘/etc/prometheus’: File exists.

Or when we use sg_core plugin with their prothemeus config file,
It also creates prometheus config directory. Then again prometheus
devstack plugin fails with same error.

In order to fix it, use mkdir -p while creating prometheus directory.
It will ignore error if parent exists.

Depends-On: https://review.opendev.org/c/openstack/watcher/+/946230

Change-Id: Ie82346577d836d61c5ca986614e431adbf216d6d
Signed-off-by: Chandan Kumar (raukadah) <raukadah@gmail.com>
2025-04-14 13:04:12 +05:30
..