Bug 1208855 - create-dirs-from-rpmdb.service failed to start ('/var/lib/pcp/config/derived': No such file or directory)
Summary: create-dirs-from-rpmdb.service failed to start ('/var/lib/pcp/config/derived'...
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: David Disseldorp
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-02 14:58 UTC by Felix Niederwanger
Modified: 2023-04-21 07:34 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Niederwanger 2023-03-02 14:58:30 UTC
On a fresh MicroOS installation, the create-dirs-from-rpmdb.service fails to start:

> Mar 02 14:53:24 microos dbus-daemon[1110]: [session uid=0 pid=1110] Successfully activated service 'org.freedesktop.systemd1'
> Mar 02 14:53:24 microos dbus-daemon[664]: [system] Successfully activated service 'org.freedesktop.timedate1'
> Mar 02 14:53:24 microos systemd[1]: Started Time & Date Service.
> Mar 02 14:53:33 microos systemd[1]: Starting Create missing directories from rpmdb...
> Mar 02 14:53:34 microos create_dirs_from_rpmdb[1117]: Failed to create directory '/var/lib/pcp/config/derived': No such file or directory
> Mar 02 14:53:34 microos create_dirs_from_rpmdb[1117]: Create /var/lib/pcp/config/derived
> Mar 02 14:53:34 microos systemd[1]: create-dirs-from-rpmdb.service: Main process exited, code=exited, status=1/FAILURE
> Mar 02 14:53:34 microos systemd[1]: create-dirs-from-rpmdb.service: Failed with result 'exit-code'.
> Mar 02 14:53:34 microos systemd[1]: Failed to start Create missing directories from rpmdb.
> Mar 02 14:53:54 microos systemd[1]: systemd-hostnamed.service: Deactivated successfully.

I didn't install anything related to pcp, and could only find the following packages being present:

* libpcp3
* libpcp_import1
* pcp-conf

The `/var/lib/pcp/` directory doesn't exist on this system. However, generating the '/var/lib/pcp/config/' directory and restarting the service seems to resolve the issue.
Comment 1 Thorsten Kukuk 2023-03-02 15:33:48 UTC
(In reply to Felix Niederwanger from comment #0)

> * libpcp3
> * libpcp_import1
> * pcp-conf
> 
> The `/var/lib/pcp/` directory doesn't exist on this system. However,
> generating the '/var/lib/pcp/config/' directory and restarting the service
> seems to resolve the issue.

Sounds like pcp-conf is broken, either there is a dependency missing or it should not contain a subdirectory of a not packaged directory. Our build scripts try to find such errors, but looks like that checks didn't worked here.

If a directory in the path is missing, we don't know which owner and permissions this should have, and random ownership and permissions could lead to a security problem.

So create-dirs-from-rpmdb is correct here to refuse to create a directory with unknown ownership and permissions.
Comment 2 Felix Niederwanger 2023-04-21 07:34:58 UTC
The issue is still present on a fresh MicroOS installation.