Merge lp://staging/~bjornt/landscape-client/process-state-key-error into lp://staging/~landscape/landscape-client/trunk
Status: | Merged |
---|---|
Approved by: | Jerry Seutter |
Approved revision: | 591 |
Merged at revision: | 585 |
Proposed branch: | lp://staging/~bjornt/landscape-client/process-state-key-error |
Merge into: | lp://staging/~landscape/landscape-client/trunk |
Diff against target: |
204 lines (+91/-26) 3 files modified
landscape/lib/process.py (+21/-23) landscape/lib/tests/test_process.py (+67/-0) landscape/monitor/tests/test_activeprocessinfo.py (+3/-3) |
To merge this branch: | bzr merge lp://staging/~bjornt/landscape-client/process-state-key-error |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jerry Seutter (community) | Approve | ||
Alberto Donato | Approve | ||
Review via email: mp+128940@code.staging.launchpad.net |
Description of the change
Handle new process states in when getting process information.
The bug report was about "t (tracing stop)", but a bunch of other states
can occur as well that we don't handle. I've change the code to use the
one-character representation of the process state that the kernel uses,
instead of using our own mapping. This ensure that future state
additions will be handled as well. As a result, we now represent the
"tracing stop" state as "t" instead of "I", but as far as I can see, the
only state we're explicitly checking for in our code is Z, so that
change shouldn't cause a problem.
I put in a special-case for "T (tracing stop)", since in Lucid you can
have both "T (stopped)" and "T (tracing stop)". I made it so that the
latter is represented by "t", since that's the way it is in releases
newer than Lucid.
Nice fix, +1!