Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listerner in client dies when permission denied for mkdir. Feature or bug? #98

Open
TAlonglong opened this issue Nov 4, 2021 · 3 comments

Comments

@TAlonglong
Copy link
Collaborator

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.

@pnuu
Copy link
Member

pnuu commented Nov 4, 2021

I'd say this is a bug in trollmoves.client.create_local_dir().

@pnuu
Copy link
Member

pnuu commented Nov 4, 2021

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.

@pnuu
Copy link
Member

pnuu commented Nov 19, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants