Bug 1370259

Summary: fedora-import-state: mkdir: cannot create directory ‘’: No such file or directory
Product: [Fedora] Fedora Reporter: Tomasz Kłoczko <kloczko.tomasz>
Component: initscriptsAssignee: David Kaspar // Dee'Kej <deekej>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: deekej, jonathan, kloczko.tomasz, lnykryn, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: initscripts-9.69-1.fc25 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-03 17:36:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
do-not-try-to-create-folder-empty-name.patch none

Description Tomasz Kłoczko 2016-08-25 18:22:03 UTC
Description of problem:

After reboot host from "journalctl -x -p info" output:

Aug 25 18:52:49 domek fedora-import-state[843]: mkdir: cannot create directory ‘’: No such file or directory
Aug 25 18:52:49 domek fedora-import-state[843]: chmod: cannot access '': No such file or directory
Aug 25 18:52:49 domek fedora-import-state[843]: chown: cannot access '': No such file or directory

Comment 1 Lukáš Nykrýn 2016-08-26 06:14:33 UTC
Can you please add 'set -x' to /usr/lib/systemd/fedora-import-state

so it looks like this:

[lnykryn@notas ~]$ head -5  /usr/lib/systemd/fedora-import-state
#!/bin/bash
# fedora-import-state: import state files from initramfs (e.g. network config)
set -x

# copy state into root

and then reboot and send us output of journalctl -u fedora-import-state.service

Comment 2 David Kaspar // Dee'Kej 2016-08-30 11:41:45 UTC
Hello,

thank you very much for the report! :)

I see the problem now. It is caused by missing "-mindepth 1" argument for the 'find' command (fedora-import-state:11).

I will create a patch and do a new release.

Best regards,

Dee'Kej

Comment 3 Tomasz Kłoczko 2016-08-30 16:50:17 UTC
I'm really sorry but I was busy in mean time.
Good that it was possible in mean time identify the bug :)

Thx

Comment 4 David Kaspar // Dee'Kej 2016-08-31 07:32:55 UTC
Created attachment 1196246 [details]
do-not-try-to-create-folder-empty-name.patch

So, after looking into it more, I just can't add the '-mindepth 1' option, because then the fedora-import-state script might skip files inside the /run/initramfs/state...

Therefore, I just added a simple condition that will skip the folder creation in case the folder name string is empty.

Comment 5 Fedora Update System 2016-08-31 10:22:29 UTC
initscripts-9.69-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6ccf6991b5

Comment 6 Fedora Update System 2016-08-31 16:22:57 UTC
initscripts-9.69-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-6ccf6991b5

Comment 7 Fedora Update System 2016-09-03 17:36:49 UTC
initscripts-9.69-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.