When external commands, issued by MAAS, fail, the log output does not give any information about the failure.
Bug #1184589 reported by
Raphaël Badin
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Julian Edwards |
Bug Description
MAAS uses external commands to handle a few things: powering up machines, DHCP, DNS, etc. When these fail, the celery logs are not giving any detail about the failure and this is seriously hindering our ability to debug stuff. This is an example of a failing rndc command http://
Related branches
lp://qastaging/~gmb/maas/fix-bug-1184589
- Gavin Panella (community): Approve
-
Diff: 719 lines (+214/-56)16 files modifiedsrc/maasserver/models/tests/test_nodegroup.py (+1/-1)
src/maasserver/tests/test_api_nodegroup.py (+1/-1)
src/maasserver/tests/test_dhcp.py (+1/-1)
src/provisioningserver/dns/config.py (+4/-6)
src/provisioningserver/dns/tests/test_config.py (+6/-2)
src/provisioningserver/import_images/config.py (+5/-3)
src/provisioningserver/import_images/ephemerals_script.py (+3/-3)
src/provisioningserver/import_images/tests/test_config.py (+2/-2)
src/provisioningserver/import_images/tests/test_ephemerals_script.py (+7/-6)
src/provisioningserver/import_images/tgt.py (+5/-4)
src/provisioningserver/omshell.py (+6/-6)
src/provisioningserver/tasks.py (+8/-7)
src/provisioningserver/tests/test_omshell.py (+21/-4)
src/provisioningserver/tests/test_tasks.py (+9/-9)
src/provisioningserver/tests/test_utils.py (+70/-0)
src/provisioningserver/utils.py (+65/-1)
lp://qastaging/~julian-edwards/maas/log-celery-exceptions-bug-1184589
- Gavin Panella (community): Approve
-
Diff: 215 lines (+45/-3)1 file modifiedsrc/provisioningserver/tasks.py (+45/-3)
tags: | added: tech-debt |
Changed in maas: | |
milestone: | none → 13.10 |
tags: | added: trivial |
tags: | added: log |
Changed in maas: | |
assignee: | nobody → Graham Binns (gmb) |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
milestone: | 13.10 → 14.04 |
Changed in maas: | |
status: | In Progress → Fix Committed |
tags: | removed: trivial |
tags: | added: cloud-installer |
Changed in maas: | |
assignee: | nobody → Julian Edwards (julian-edwards) |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
When a command fails, the logs should contain:
- the exact command that was run (because, very often, one will be able to re-launch that same command plus debugging enabled to understand what the problem is).
- the error returned by the command
Note that this was done for the power commands (but only for them) in src/provisionin gserver/ power/poweracti on.py:PowerActi onFail.
I think this should be generalized and applied to every single call we make to subprocess. check_output and the likes.