Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1141451

Summary: Failures in tests: /dev/sda1: No such file or directory
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: agk, mbooth, prajnoha, ptoscano, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-14 10:34: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:
Embargoed:
Bug Depends On:    
Bug Blocks: 910269    
Attachments:
Description Flags
build.log none

Description Richard W.M. Jones 2014-09-13 15:56:03 UTC
Created attachment 937243 [details]
build.log

Description of problem:

This is a placeholder for the extremely mysterious heisenbug where
the /dev/sda1 device node does not get created, or magically disappears.

Version-Release number of selected component (if applicable):

It started happening in Fedora 21 and above.

How reproducible:

Rare, but annoying.  Happens a lot more often under Koji than
anywhere else, but can be reproduced in a VM occasionally.

Only appears to happen after we write to the first sector of /dev/sda.

In the attached build log, it happens twice.  Search for the
error message "/dev/sda1: No such file or directory"

Comment 1 Richard W.M. Jones 2014-09-14 11:47:40 UTC
Ugh.

Turns out to be a stupid udev rule.  Whenever you close a device,
the kernel sends a "change" event to udev which fires off a whole
set of rules.  It runs at least: scsi_id, path_id, blkid.  And these
operations overlap the subsequent mkfs or other operation.

More udev workarounds needed.

Thanks agk for pointing me in the right direction.

Comment 2 Richard W.M. Jones 2014-09-14 13:03:00 UTC
Added a workaround:

https://github.com/libguestfs/libguestfs/commit/4515413217c7d4a6fe026254bffa6f82746047c4