Add DNs from a file for glidecondor_addDN
glidecondor_addDN currently only supports adding one DN at a time, and requires them to be passed as arguments.
This is particularly annoying when one is installing Condor from scratch, and wants to populate the mapfile
with all the needed DNs.
I thus propose to add the option to read the list from a file.
#2 Updated by Burt Holzman almost 7 years ago
I didn't review the patch but just reviewed the script as of the last commit (commit:98644297) in the 3777 branch.
- We need the documentation on the formatting of the listfile obviously.
- The argument parsing is currently order-dependent, we should fix that:
glidecondor_addDN -import dn.txt -qwill not do what you want.
- I don't understand the
(len(dnlist) != 1 or dnlist['is_daemon_dn'])logic. Doesn't that imply different behavior based on the order of DNs
in the import file?
- We seem to be catching and reraising IOErrors in some places. Some of that could be dropped if the catching statement doesn't add any
useful information to the exception.
- Some of the code in parse_import_args could be cleaned up a bit, but that's more cosmetic; I'll take care of that before it gets merged.
- update_mapfile won't work on a brand new condor_mapfile (only the anon mappings), it goes looking for
GSI ". Why not just prepend the new DN? (And if you want to keep this behavior, why use
for i in rangeinstead of
for line in lines?
#5 Updated by Igor Sfiligoi almost 7 years ago
The file format of -import is
username type DN
- type is either daemon or client
- DN must not be quoted and can contain spaces.... any initial and trailing spaces are stripped off
Comments and empty lines are allowed.