DIRAC icon indicating copy to clipboard operation
DIRAC copied to clipboard

dirac-proxy-info broken in recent releases

Open marianne013 opened this issue 2 years ago • 4 comments

Hi,

At Imperial we use a script that recreates the sequence of commands we give our users to install a UI. It's also used to test upgrades to our pre-prod server. I'm currently testing upgrading to v8.0.27 and I came across the following issue: At some point between the beginning of July (i.e. last time I ran this script) and now something changed and the script started failing at the step below, i.e. after getting a proxy and before configuring the UI for a specific DIRAC server. Unfortunately I have not been able to pinpoint the exact combination of where things have started to go wrong.
While using dirac-proxy-info at this step is not vital I don't like when stuff randomly breaks and I don't know why. (The script in question has worked for the last 3+ years, so I'm even more concerned.)

Below is latest diracos and v8.1.a17. It looks identical for 8.0.27.

(base) lxplus7122:whatnowagain :~] dirac-proxy-init -x -N 
No CFG file loaded, was that intentional?
Running without remote configuration
Generating proxy...
Enter Certificate password: **********
Proxy generated:
subject      : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=daniela bauer/CN=1668351719
issuer       : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=daniela bauer
identity     : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=daniela bauer
timeleft     : 23:59:59
path         : /tmp/x509up_u35289
(base) lxplus7122:whatnowagain :~] dirac-proxy-info
No CFG file loaded, was that intentional?
Running without remote configuration
Missing mandatory local configuration option /DIRAC/Setup
There were errors when loading configuration

Anyone know what happened here ?

Daniela

marianne013 avatar Aug 23 '23 11:08 marianne013

I can't reproduce it. Can you detail how you install it, and run these commands with -ddd ?

chaen avatar Aug 23 '23 15:08 chaen

  990  curl -LO https://github.com/DIRACGrid/DIRACOS2/releases/latest/download/DIRACOS-Linux-$(uname -m).sh
  991  bash DIRACOS-Linux-$(uname -m).sh
  992  source diracos/diracosrc 
  993  pip install DIRAC==v8.1.0a17
  994  dirac-proxy-init -x -N 
  995  dirac-proxy-info 

I never run this in a container (never have done), so far this wasn't a problem.

marianne013 avatar Aug 23 '23 15:08 marianne013

It fails even with 8.0 so the problem must be older. (but just to note, you do not run dirac-configure, so indeed there's no config file) Though I agree that there is no reason for it to fail, you may want the info stored solely in the proxy Could it be that the environment in which you ran that changed, and that you had a dirac.cfg in the usual locations before ?

chaen avatar Aug 23 '23 19:08 chaen

Yes, it's probably the .cfg file,

(base) lx03:dirac_ui > dirac-proxy-init -ddd -x -N
2023-09-18 11:36:14 UTC Framework [139948776924992] DEBUG: dirac.cfg should be at /home/hep/dbauer/check_test_dirac/dirac_ui/diracos/etc/dirac.cfg
2023-09-18 11:36:14 UTC Framework [139948776924992] DEBUG: Can't load /home/hep/dbauer/check_test_dirac/dirac_ui/diracos/etc/dirac.cfg file
2023-09-18 11:36:14 UTC Framework [139948776924992] DEBUG: Updating configuration internals
Parsing command line
No CFG file loaded, was that intentional?
Running without remote configuration
Trying to load Resources.LogBackends.StdoutBackend
Trying to load DIRAC.Resources.LogBackends.StdoutBackend
2023-09-18 11:36:17 UTC dirac-proxy-init [139948776924992] DEBUG: Updating configuration internals
2023-09-18 11:36:17 UTC dirac-proxy-init [139948776924992] NOTICE: Generating proxy...
Enter Certificate password: **********
2023-09-18 11:36:26 UTC dirac-proxy-init [139948776924992] WARN: No CRL files found for /home/hep/dbauer/check_test_dirac/dirac_ui/diracos/etc/grid-security/certificates/*.r0. Abort check of CAs
2023-09-18 11:36:26 UTC dirac-proxy-init [139948776924992] NOTICE: Proxy generated:
2023-09-18 11:36:26 UTC dirac-proxy-init [139948776924992] NOTICE: subject      : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=daniela bauer/CN=4541846855
issuer       : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=daniela bauer
identity     : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=daniela bauer
timeleft     : 23:59:59
path         : /tmp/x509up_u97790
(base) lx03:dirac_ui > dirac-proxy-info -ddd
2023-09-18 11:36:37 UTC Framework [140069689018176] DEBUG: dirac.cfg should be at /home/hep/dbauer/check_test_dirac/dirac_ui/diracos/etc/dirac.cfg
2023-09-18 11:36:37 UTC Framework [140069689018176] DEBUG: Can't load /home/hep/dbauer/check_test_dirac/dirac_ui/diracos/etc/dirac.cfg file
2023-09-18 11:36:37 UTC Framework [140069689018176] DEBUG: Updating configuration internals
Parsing command line
No CFG file loaded, was that intentional?
Running without remote configuration
Trying to load Resources.LogBackends.StdoutBackend
Trying to load DIRAC.Resources.LogBackends.StdoutBackend
2023-09-18 11:36:37 UTC dirac-proxy-info [140069689018176] FATAL: Missing mandatory local configuration option /DIRAC/Setup
2023-09-18 11:36:37 UTC dirac-proxy-info [140069689018176] ERROR: There were errors when loading configuration
(base) lx03:dirac_ui > 
(base) lx03:dirac_ui > ls -l /home/hep/dbauer/check_test_dirac/dirac_ui/diracos/etc/dirac.cfg
ls: cannot access /home/hep/dbauer/check_test_dirac/dirac_ui/diracos/etc/dirac.cfg: No such file or directory

I still don't like it.

marianne013 avatar Sep 18 '23 11:09 marianne013