Formula install hook never completes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloudfoundry |
Fix Released
|
High
|
Unassigned | ||
pyjuju |
Fix Released
|
Medium
|
Jim Baker |
Bug Description
Deploying lp:~gandelman-a/+junk/rabbitmq to a fresh system, ensemble fires the install hook but its exit seems to not be caught by ensemble *IF* it needs to install the package rabbitmq-server. ensemble status shows its state as 'null' On the machine, the hook is no longer running and log msgs generated by the hook show it is exiting successfully. ensemble.executor does not seem to catch the child process exiting and does not continue on to fire the 'start' hook:
2011-07-14 22:52:19,905: statemachine@DEBUG: unitworkflowstate: execute action do_install
2011-07-14 22:52:19,905: hook.executor@
2011-07-14 22:52:20,331: unit.hook.api@INFO: rabbitmq: Firing hook install.
2011-07-14 22:52:20,370: hook.output@INFO: Reading package lists...
<......snip......>
2011-07-14 22:52:25,807: unit.hook.api@INFO: rabbitmq: Installation complete. 0
2011-07-14 22:52:26,237: unit.hook.api@INFO: rabbitmq: Hook install complete. Exiting 0
However, if I destroy the service and deploy once again (without removing the packages), it successfully installs and moves onto starting:
2011-07-14 23:57:47,461: statemachine@DEBUG: unitworkflowstate: transition install (None -> installed) {}
2011-07-14 23:57:47,461: statemachine@DEBUG: unitworkflowstate: execute action do_install
2011-07-14 23:57:47,462: hook.executor@
2011-07-14 23:57:47,803: unit.hook.api@INFO: rabbitmq: Firing hook install.
<<...snip....>
2011-07-14 23:57:49,111: unit.hook.api@INFO: rabbitmq: Installation complete. 0
2011-07-14 23:57:49,511: unit.hook.api@INFO: rabbitmq: Hook install complete. Exiting 0
2011-07-14 23:57:49,554: hook.output@DEBUG: hook install ended, exit code 0.
2011-07-14 23:57:49,554: hook.executor@
2011-07-14 23:57:49,562: statemachine@DEBUG: unitworkflowstate: transition complete install (state installed) {}
2011-07-14 23:57:49,563: statemachine@DEBUG: unitworkflowstate: transition state (installed -> started)
2011-07-14 23:57:49,564: statemachine@DEBUG: unitworkflowstate: transition start (installed -> started) {}
If I destroy the service, remove the package and re-deploy, the problem reproduces. From what I can tell, the rabbitmq-server package is fine as it installs fine on a fresh machine, returns appropriate return codes and does not require any debconf/user dialog.
Related branches
- Kapil Thangavelu (community): Approve
- Gustavo Niemeyer: Approve
-
Diff: 461 lines (+233/-68)3 files modifiedensemble/hooks/invoker.py (+167/-67)
ensemble/hooks/tests/hooks/hanging-hook (+3/-0)
ensemble/hooks/tests/test_invoker.py (+63/-1)
Changed in cloudfoundry: | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in cloudfoundry: | |
status: | Confirmed → Fix Released |
I've noticed this problem with 0.5+bzr275- 0ensemble1~ natty1. Basically if deploy-service or add-unit need to start a new machine, the unit is never usable and the state stays at "null".