Bug 1109614

Summary: Post install done checkin should be done only after all post install scriptlets have executed
Product: [Retired] Beaker Reporter: Amit Saha <asaha>
Component: generalAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.17CC: aigao, asaha, dcallagh, dowang, ebaak
Target Milestone: 20.0Keywords: Patch
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-20 02:23:09 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:

Description Amit Saha 2014-06-16 00:24:45 UTC
Description of problem:

After a distro's post installation scriptlets has finished execution, the test system "checks in" with the Beaker lab controller. However, currently, this check in can happen even though there are more scriptlets to be be executed. 

For example, in Fedora kickstart template, we have:

%post --log=/dev/console
{% snippet 'rhts_post' %}
{% snippet 'Fedora_post' %}
{% snippet 'system_post' %}
%end

So, if Fedora_post or system_post snippets exist, these will  be executed after the check in was done:

# Check in with Beaker Server, record our postinstall time.
curl http://beaker-server-lc.beaker:8000/postinstall_done/145
# Disable rhts-compat for Fedora15/RHEL7 and newer.
cat >> /etc/profile.d/task-overrides-rhts.sh <<END
export RHTS_OPTION_COMPATIBLE=
export RHTS_OPTION_COMPAT_SERVICE=
END
touch /root/myfile
# no snippet data for system_post
%end

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:

Post install done check in should be done only when all the %post scriptlets have completed execution.


Additional info:

Comment 2 Dan Callaghan 2014-06-16 02:45:10 UTC
Another idea, only somewhat related: maybe we should add a sleep at the end of %post to give anamon a chance to pick up all logs. If the postinstall_done call is in a snippet that is always last, that's a good place for the sleep too.

Comment 3 Dan Callaghan 2014-11-13 02:57:41 UTC
http://gerrit.beaker-project.org/3483

Comment 4 Dan Callaghan 2014-11-19 00:15:51 UTC
This is better suited to a major release since it's a quite low priority fix but has the potential for unexpected side-effects due to the kickstart changes.

Comment 5 Dan Callaghan 2014-11-19 01:24:04 UTC
http://gerrit.beaker-project.org/3493

Comment 9 Dan Callaghan 2015-04-20 02:23:09 UTC
Beaker 20.0 has been released.