Commit d6759d0
fix: account lookup / test in multicluster environment (#350)
We need to perform the account testing with `sacctmgr`, first, then with
`sshare`. `sshare` might not provide all accounts, as SLURM in a
multicluster environment is only queried on one cluster. This is an
observation from my cluster, where `sshare` did only show accounts for
cluster _A_, whereas `sacctmgr` displayed for clusters `A` and `B`.
The reason is, that `sshare` queries the `slurmctld` of a given cluster,
whereas `sacctmgr` queries the overlooking SLURM database of all
clusters in a multi cluster environment.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Accept multiple SLURM accounts (comma/space-separated) and handle each
as a distinct account entry; when multiple provided, the first is used
for submission.
* Safer quoting for account and partition values to prevent shell
injection.
* **Bug Fixes**
* Prefer sacctmgr for account validation in multicluster setups, falling
back to sshare when needed.
* Deduplicate reported accounts and provide clearer combined error
reports when validation fails.
* **Documentation**
* Clarified messages and comments about multicluster validation and
deduplication.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>1 parent 660c800 commit d6759d0
1 file changed
+33
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
675 | 686 | | |
676 | 687 | | |
677 | 688 | | |
678 | 689 | | |
679 | 690 | | |
680 | 691 | | |
681 | 692 | | |
682 | | - | |
| 693 | + | |
683 | 694 | | |
684 | 695 | | |
685 | 696 | | |
686 | 697 | | |
687 | 698 | | |
688 | 699 | | |
689 | 700 | | |
690 | | - | |
| 701 | + | |
691 | 702 | | |
692 | 703 | | |
693 | 704 | | |
| |||
702 | 713 | | |
703 | 714 | | |
704 | 715 | | |
705 | | - | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
706 | 719 | | |
707 | 720 | | |
708 | 721 | | |
| |||
730 | 743 | | |
731 | 744 | | |
732 | 745 | | |
733 | | - | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
734 | 750 | | |
735 | 751 | | |
736 | 752 | | |
737 | 753 | | |
738 | 754 | | |
739 | | - | |
| 755 | + | |
740 | 756 | | |
741 | | - | |
| 757 | + | |
742 | 758 | | |
743 | 759 | | |
744 | 760 | | |
745 | 761 | | |
746 | | - | |
| 762 | + | |
747 | 763 | | |
748 | 764 | | |
749 | 765 | | |
750 | 766 | | |
751 | 767 | | |
752 | | - | |
| 768 | + | |
753 | 769 | | |
754 | | - | |
| 770 | + | |
755 | 771 | | |
756 | 772 | | |
757 | | - | |
758 | | - | |
| 773 | + | |
| 774 | + | |
759 | 775 | | |
760 | 776 | | |
761 | 777 | | |
| |||
764 | 780 | | |
765 | 781 | | |
766 | 782 | | |
767 | | - | |
| 783 | + | |
768 | 784 | | |
769 | 785 | | |
770 | 786 | | |
| |||
0 commit comments