Bug 1109568

Summary: fence-agents: Race condition in build scripts
Product: [Fedora] Fedora Reporter: Kristoffer Gronlund <kgronlund>
Component: fence-agentsAssignee: Marek Grac <mgrac>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: fdinitto, mgrac
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-01 07:16:28 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:
Attachments:
Description Flags
Proposed patch none

Description Kristoffer Gronlund 2014-06-15 13:15:34 UTC
This was originally reported on the SUSE bugzilla here:
https://bugzilla.novell.com/show_bug.cgi?id=878580

When building the fence-agents package, we would randomly get failures like the below:

[   46s] xmllint --noout --relaxng
/home/abuild/rpmbuild/BUILD/fence-agents-4.0.9/fence/agents/ipmilan/../lib/metadata.rng
.fence_idrac.8.tmp && \
[   46s] xsltproc ../../../fence/agents/lib/fence2man.xsl .fence_idrac.8.tmp >
fence_idrac.8
[   46s] python: can't open file 'fence_ilo3': [Errno 2] No such file or
directory
[   46s] Makefile:590: recipe for target 'fence_ilo3.8' failed
[   46s] make[4]: *** [fence_ilo3.8] Error 2
[   46s] make[4]: *** Waiting for unfinished jobs....


[   52s]     python fence_idrac -o metadata > .fence_idrac.8.tmp && \
[   52s] xmllint --noout --relaxng
/home/abuild/rpmbuild/BUILD/fence-agents-4.0.9/fence/agents/ipmilan/../lib/metadata.rng
.fence_idrac.8.tmp && \
[   52s] xsltproc ../../../fence/agents/lib/fence2man.xsl .fence_idrac.8.tmp >
fence_idrac.8
[   52s] python: can't open file 'fence_idrac': [Errno 2] No such file or
directory
[   52s] Makefile:590: recipe for target 'fence_idrac.8' failed
[   52s] make[4]: *** [fence_idrac.8] Error 2
[   52s] make[4]: *** Waiting for unfinished jobs....


Disabling SMP support in the build scripts works as a workaround, but the actual bug is in the copying of fence_ilo to different names. The script which tries to check the copied fence agent may run in parallel with the copying itself, which causes the failure.

I am not familiar enough with autotools to know what a proper fix would look like, unfortunately.

Comment 1 Marek Grac 2014-06-16 12:58:17 UTC
Created attachment 909120 [details]
Proposed patch

Hi,

thanks for report, I was not able to reproduce that bug (even with -j10) but I found another bug and fix problem place. Can you try that patch and verify if it helps?

Comment 2 Kristoffer Gronlund 2014-06-16 14:18:17 UTC
Actually I suppose it could be an issue in the version of the autotools suite used..

I will try the patch and see if that helps. Thanks!