Message content and context improvements
In order to increase serviceability and usability of OpenStack, it has been suggested that some messages could use some tweaking and in some cases some new log messages added. The change may be related to message wording and content, or context provided, or even the log level.
Blueprint information
- Status:
- Complete
- Approver:
- Russell Bryant
- Priority:
- Undefined
- Drafter:
- Mark Vanderwiel
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
- Matt Riedemann
Related branches
Related bugs
Sprints
Whiteboard
Starting with for example, nova/compute manager.py, looking at Info, Warning, Error and Critical messages, the following might be some of the suggested improvements.
An example of improving wording. It looks like a great code comment was added, but a rather poor message is given.
Before:
# NOTE(vish): The instance failed to resume, so we set the
# instance to error and attempt to continue.
After:
An example of improving context: Knowing the host should be useful.
Before:
After:
Some suggestions for better message context:
Request information included when available.
If there's more than one resource that the message could apply to, specify which resource is
affected in the message.
User/project that is involved.
VM/Host that is involved.
Storage/Network that is involved.
Some suggestions for better message content and wording:
A short but clear description of the issue.
Keep message wording consistent.
State the problem. Focus on the problem, not the error.
State what detected the problem.
State what caused the problem.
State why the problem happened.
State what can be done to recover from/correct the issue if possible.
For information on log message levels and IDs, see blueprint
https:/
Starting with for example, nova/compute manager.py, looking at Info, Warning, Error and Critical messages, the following might be some of the suggested improvements.
An example of improving wording. It looks like a great code comment was added, but a rather poor message is given.
Before:
# NOTE(vish): The instance failed to resume, so we set the
# instance to error and attempt to continue.
After:
An example of improving context: Knowing the host should be useful.
Before:
After:
Some suggestions for better message context:
Request information included when available.
If there's more than one resource that the message could apply to, specify which resource is
affected in the message.
User/project that is involved.
VM/Host that is involved.
Storage/Network that is involved.
Some suggestions for better message content and wording:
A short but clear description of the issue.
Keep message wording consistent.
State the problem. Focus on the problem, not the error.
State what detected the problem.
State what caused the problem.
State why the problem happened.
State what can be done to recover from/correct the issue if possible.
For information on log message levels and IDs, see blueprint
https:/
Marking this blueprint as definition: Drafting. If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)