Skip to content

Monitoring script stops on unknown uid #382

@sterni1971

Description

@sterni1971

Hello!
Today I noticed that my monitoring script is failing. The problem is that a user account was removed from LDAP, but the user still had a running job. I got an exception: getpwuid(): uid not found: 12345.

My code:

        try:
            jobs = pyslurm.Jobs.load().to_dict()
            partitions = pyslurm.Partitions.load().to_dict()
            nodes = pyslurm.Nodes.load().to_dict()
        except KeyError as e:
                print(‘Exception accessing job and partition information.’)
                print(e)
                pass

I found err_on_invalid in utils/helpers.pyx, but I can't find a way to set it to false.

Best regards!
Sven

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions