Don't ask if should overwrite proxy if user didn't set the voRole and/or voGroup in the command line or in the config. Fixes #4326.


I have set this in my CRAB Config:
config.section_("User")
config.User.voRole = "cms"
config.User.voGroup = "atlas"With this PR, in case the proxy is valid for enough time but the user has specified a VO role and/or VO group in the command line or in the CRAB config that is/are different from the proxy, we give the following messages:

------------------------------------------------------------------------------------------------------------
$ crab checkusername --voGroup hola
Proxy file /tmp/x509up_u57506 exists with VO group = '', but you have specified to use VO group = 'hola'.
Do you want to overwrite the proxy (Y/N)?
N
Then please don't specify the --voGroup command line option.
------------------------------------------------------------------------------------------------------------
$ crab checkusername --voRole ciao
Proxy file /tmp/x509up_u57506 exists with VO role = 'NULL', but you have specified to use VO role = 'ciao'.
Do you want to overwrite the proxy (Y/N)?
N
Then please don't specify the --voRole command line option.
------------------------------------------------------------------------------------------------------------
$ crab checkusername --voGroup hola --voRole ciao
Proxy file /tmp/x509up_u57506 exists with VO group = '' and VO role = 'NULL', but you have specified to use VO group = 'hola' and VO role = 'ciao'.
Do you want to overwrite the proxy (Y/N)?
N
Then please don't specify the --voRole and --voGroup command line options.
------------------------------------------------------------------------------------------------------------
$ crab submit -c crabConfig_test.py --voGroup hola --voRole ciao
Will use configuration file crabConfig_test.py
Ignoring the VO role specified in the configuration file. Using VO role 'ciao' as specified in the command line.
Ignoring the VO group specified in the configuration file. Using VO group 'hola' as specified in the command line.
Proxy file /tmp/x509up_u57506 exists with VO group = '' and VO role = 'NULL', but you have specified to use VO group = 'hola' and VO role = 'ciao'.
Do you want to overwrite the proxy (Y/N)?
N
Then please don't specify the --voRole and --voGroup command line options.
------------------------------------------------------------------------------------------------------------
$ crab submit -c crabConfig_test.py --voGroup hola
Will use configuration file crabConfig_test.py
Ignoring the VO group specified in the configuration file. Using VO group 'hola' as specified in the command line.
Proxy file /tmp/x509up_u57506 exists with VO group = '' and VO role = 'NULL', but you have specified to use VO group = 'hola' and VO role = 'cms'.
Do you want to overwrite the proxy (Y/N)?
N
Then please modify the User.voRole parameter in the CRAB configuration file to match the existing proxy and please don't specify the --voGroup command line option.
------------------------------------------------------------------------------------------------------------
$ crab submit -c crabConfig_test.py --voRole ciao
Will use configuration file crabConfig_test.py
Ignoring the VO role specified in the configuration file. Using VO role 'ciao' as specified in the command line.
Proxy file /tmp/x509up_u57506 exists with VO group = '' and VO role = 'NULL', but you have specified to use VO group = 'atlas' and VO role = 'ciao'.
Do you want to overwrite the proxy (Y/N)?
N
Then please modify the User.voGroup parameter in the CRAB configuration file to match the existing proxy and please don't specify the --voRole command line option.
------------------------------------------------------------------------------------------------------------
$ crab submit -c crabConfig_test.py
Will use configuration file crabConfig_test.py
Proxy file /tmp/x509up_u57506 exists with VO group = '' and VO role = 'NULL', but you have specified to use VO group = 'atlas' and VO role = 'cms'.
Do you want to overwrite the proxy (Y/N)?
N
Then please modify the User.voRole and User.voGroup parameters in the CRAB configuration file to match the existing proxy.
------------------------------------------------------------------------------------------------------------