Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

CSM BDS: python scripts TypeError with --state reverted #990

Description

@thanh-lam

Describe the bug
For querying allocation data, CSM provides python scripts in /opt/ibm/csm/bigdata/python/. One example is "findUserJobs.py" that lists allocation info such as "state" and so on of a job. It produced following error when running with --state reverted. Other states (running, failed, complete) were listed with no error.

# ./findUserJobs.py -u tlam --state reverted
     State |   AID | P Job ID | S Job ID | Begin Time                 | End Time                  
Traceback (most recent call last):
  File "./findUserJobs.py", line 167, in <module>
    sys.exit(main(sys.argv))
  File "./findUserJobs.py", line 135, in main
    data.get("state")))
TypeError: unsupported format string passed to NoneType.__format__

To Reproduce
Steps to reproduce the behavior:

  1. Login to CSM master or BDS node as root.
  2. Change to /opt/ibm/csm/bigdata/python/ then run the command:
# ./findUserJobs.py -u <userid> --state reverted
  1. See error.

Expected behavior
The command should not produce the error (which looked like an internal condition needed to be handled with the reverted state). Example of a good command output:

# ./findUserJobs.py -u root
     State |   AID | P Job ID | S Job ID | Begin Time                 | End Time                  
  complete |     1 |      526 | 0        | 2020-09-17 12:06:01.183794 | 2020-09-17 12:06:58.382907
  complete |     2 |      527 | 0        | 2020-09-17 12:06:02.483204 | 2020-09-17 12:06:56.800503
  complete |     3 |      528 | 0        | 2020-09-17 12:10:25.346929 | 2020-09-17 12:10:26.374556
  complete |     4 |      530 | 0        | 2020-09-17 12:12:52.830307 | 2020-09-17 12:12:53.838649
  complete |     5 |      531 | 0        | 2020-09-17 12:18:24.195737 | 2020-09-17 12:18:25.275275
  complete |     6 |      532 | 0        | 2020-09-17 12:20:02.431532 | 2020-09-17 12:20:27.420373
  complete |     7 |      533 | 0        | 2020-09-17 12:22:12.25542  | 2020-09-17 12:22:33.375314
  complete |     8 |      534 | 0        | 2020-09-17 12:27:51.261522 | 2020-09-17 12:28:11.101704
  complete |     9 |      535 | 0        | 2020-09-17 12:28:01.331114 | 2020-09-17 12:28:11.447308
  complete |    10 |        1 | 0        | 2020-09-17 12:30:36.073652 | 2020-09-17 14:55:39.055421
  complete |    11 |        2 | 0        | 2020-09-17 12:30:36.137917 | 2020-09-17 14:55:40.508644
    failed |    24 |        1 | 0        | 2020-09-23 16:41:58.746747 | 2020-09-23 16:41:58.951312
  complete |   168 |      557 | 0        | 2020-10-28 10:35:17.335562 | 2020-10-28 10:41:13.049669
  complete |   169 |      661 | 0        | 2020-10-28 10:51:58.674377 | 2020-10-28 11:52:02.579073

Environment (please complete the following information):

  • IST BDS cluster, CSM dev cluster.
  • Version: CSM 1.8.2-3577

Additional context
The TypeError could be caused by some "empty" field in the data record with reverted state.

Issue Source:
CSM regression tests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions