Handle cluster names containing a hyphen in slurm probe

Description

As reported by Patrick in https://ggus.eu/index.php?mode=ticket_info&ticket_id=141577,

In a somewhat related vein, there was a problem with the code that queries the v17 database if the cluster name contained a "-" character. My first attempt at setting up a test slurm/gratia instance used a cluster name like "cpb-test". While slurm worked fine with the name, gratia could not query the db. Only after changing the name did I discover that gratia was incompatible with v18.

The slurm probe code, in its sql queries, does not attempt to quote the db table name that contains the cluster name. So if the cluster name has non-identifier characters (/\W/, including hyphens) it will break sql syntax.

If slurm is not doing anything special when making these tables (the actual table names contain a hyphen as-is in the cluster name), then we should be able to fix this by just doing the proper quoting around table names in the sql.

Freshdesk Tickets

None

Status

Assignee

Tim Theisen

Reporter

Carl Edquist

Priority

Major

Labels

Components

Fix versions

Epic Link

None

Sprint

None
Configure