We can’t do this in a spec file, as /var/run is on tmpfs, so the dir would be lost on the subsequent reboot. But we do have the following:
controller-0:~$ rpm -qf /usr/lib/tmpfiles.d/resource-agents.conf
resource-agents-3.9.5-124.el7.tis.12.x86_64
controller-0:~$ cat /usr/lib/tmpfiles.d/resource-agents.conf
d /var/run/resource-agents/ 1755 root root
So we could probably drop patch [1] and safely rely on the tmpfiles.d to create it.
From: Lin, Shuicheng [mailto:shuicheng.lin@intel.com]
Sent: Tuesday, November 20, 2018 11:51 PM
To: Little, Scott; Penney, Don; Rowsell, Brent
Cc: starlingx-discuss@lists.starlingx.io
Subject: question about create-var-run-resource-agents.patch in cluster-resource-agent
Hi Scott/Penney,
I am looking at story [0], which want to remove patches [1] for create directory /var/run/resource-agents.
And I find another patch [2] disabled explicit requires the directory in spec file.
(#%dir %attr (1755, root, root) %{_var}/run/resource-agents)
Could you share me the history of patch [1] and [2]?
I prefer to add back this line in patch [2], and patch [1] could be removed without puppet replacement.
What’s your suggestion?
Thanks.
[0]:
https://storyboard.openstack.org/#!/story/2004019
Best Regards
Shuicheng