Open TAlonglong opened 2 years ago
I'd say this is a bug in trollmoves.client.create_local_dir()
.
Hmm, actually that might not be the correct place for the fix. The exception handling should probably be in request_push
where this function is called.
Hmm. Now that I was going to fix this, I'm not actually sure what should happen. Maybe a more graceful exit without a stack trace and a log message?
Describe the bug
Listener dies when permission denied for mkdir. Is this expected bahviour?
Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: [2021-11-03 15:03:34,738 ERROR trollmoves.client] Listener died. Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: Traceback (most recent call last): Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: File "/home/remotesensing/miniconda3-bionic/envs/pytroll/lib/python3.8/site-packages/trollmoves/client.py ", line 231, in run Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: self.callback(msg, *self.cargs, **self.ckwargs) Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: File "/home/remotesensing/miniconda3-bionic/envs/pytroll/lib/python3.8/site-packages/trollmoves/client.py ", line 573, in request_push Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: local_dir = create_local_dir(_destination, kwargs.get('ftp_root', '/')) Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: File "/home/remotesensing/miniconda3-bionic/envs/pytroll/lib/python3.8/site-packages/trollmoves/client.py ", line 375, in create_local_dir Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: os.makedirs(local_dir) Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: File "/home/remotesensing/miniconda3-bionic/envs/pytroll/lib/python3.8/os.py", line 213, in makedirs Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: makedirs(head, exist_ok=exist_ok) Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: File "/home/remotesensing/miniconda3-bionic/envs/pytroll/lib/python3.8/os.py", line 213, in makedirs Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: makedirs(head, exist_ok=exist_ok) Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: File "/home/remotesensing/miniconda3-bionic/envs/pytroll/lib/python3.8/os.py", line 213, in makedirs Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: makedirs(head, exist_ok=exist_ok) Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: [Previous line repeated 4 more times] Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: File "/home/remotesensing/miniconda3-bionic/envs/pytroll/lib/python3.8/os.py", line 223, in makedirs Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: mkdir(name, mode) Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: PermissionError: [Errno 13] Permission denied: '/lustre/storeB/project' Nov 03 15:03:34 ppi-adm-b2 move_it_client.py[30194]: [2021-11-03 15:03:34,739 ERROR trollmoves.client] Listener for tcp://sater6.met.no:9010 died 1 time: [Er rno 13] Permission denied: '/lustre/storeB/project'
Expected behavior Not sure if this is as expected or this is a bug.