List current lanes

It would be nice to have a cryosparcm cluster list command to list all installed lanes. I need the lane names to run cryosparcm remove, but these are only available through the GUI.

As a workaround, can the names be accessed via python?

I found the start to a solution:

$ echo 'db.sched_config.aggregate([ {$match: {name: "lanes"}}, {$unwind: "$value"}, {$project: {_id:0, name: "$"}} ])' | cryosparcm_bliven mongo
MongoDB shell version v3.4.10
connecting to: mongodb://localhost:39061/meteor
MongoDB server version: 3.4.10
{ "name" : "gpu" }
{ "name" : "gpu-big" }
{ "name" : "gpu-short" }
{ "name" : "gpu-rtx2080ti" }
{ "name" : "cpu-daily" }

Probably cleaning up the output will require a bit of python to wrap that mongodb query.

Perhaps cryosparcm cli 'get_scheduler_lanes()' gets you closer to what you need?

1 Like

Thanks, this is much cleaner than the mongo solution.

It’s slightly annoying that the cli command just prints python objects. I ended up re-parsing it to get just the names:

$ cryosparcm cli 'get_scheduler_lanes()' | 
    python -c 'import sys;print("\n".join(d["name"] for d in eval('