TESK icon indicating copy to clipboard operation
TESK copied to clipboard

Are there anybody use locally input file to calculate by TESK and how to configuration?

Open pengchunhua opened this issue 4 years ago • 7 comments

Are there anybody use locally input file to calculate by TESK and how to configuration? Anybody can help me?

pengchunhua avatar Mar 24 '21 09:03 pengchunhua

In my deployment I use configuration like this: - name: TESK_API_TASKMASTER_ENVIRONMENT_HOST_BASE_PATH value: '/nfs'

    - name: TESK_API_TASKMASTER_ENVIRONMENT_CONTAINER_BASE_PATH
      value: '/transfer'

    - name: TESK_API_TASKMASTER_ENVIRONMENT_TRANSFER_PVC_NAME
      value: 'tesk-claim'

but I get the error: Traceback (most recent call last): File "/usr/bin/filer", line 10, in sys.exit(main()) File "/usr/lib/python3.7/site-packages/tesk_core/filer.py", line 509, in main if process_file(args.transputtype, afile): File "/usr/lib/python3.7/site-packages/tesk_core/filer.py", line 464, in process_file return transfer.download() File "/usr/lib/python3.7/site-packages/tesk_core/filer.py", line 50, in download return self.download_file() File "/usr/lib/python3.7/site-packages/tesk_core/filer.py", line 173, in download_file def download_file(self): self.transfer(shutil.copy , self.urlContainerPath , self.path) File "/usr/lib/python3.7/site-packages/tesk_core/filer.py", line 171, in transfer copyFn(src, dst) File "/usr/lib/python3.7/shutil.py", line 248, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib/python3.7/shutil.py", line 120, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: '/transfer/inputs/README.md' how to solve this problem?

pengchunhua avatar Mar 24 '21 10:03 pengchunhua

It would help, if you provided more information.

  1. When are you getting the error? (What was the TES API call; specifically which input path led to this error?)
  2. How have you configured your PVC (what storage class it is etc)?
  3. Is there any README.md file and if so, where? Answering your question - there were people who successfully used TESK in shared filesystem mode. I assume you read this, as your are trying to set correct variables.

aniewielska avatar Mar 24 '21 10:03 aniewielska

thank you for your response! 1、I didn't use TES api, I use yaml configuration file to run my job, the job configuration file like this: { "description": "FTP outputting file and directory from volume location", "volumes": [ "/mnt" ], "inputs": [ { "description": "test local file", "path": "/mnt/volumes/file1.txt", "type": "FILE", "url": "file:///nfs/inputs/README.md" } ], "executors": [ { "image": "10.50.10.48:5000/centos:7", "command": [ "sh", "-c", "echo 'This goes to file1'" ] } ] } I just want to test locally input file, but the error i get. 2、I defined the pvc storage class by myself,it works fine when i use configuration like this: { "description": "FTP outputting file and directory from volume location", "volumes": [ "/mnt" ], "inputs": [ { "description": "test local file", "path": "/mnt/volumes/file1.txt", "type": "FILE", "content": "file:///nfs/inputs/README.md" } ], "executors": [ { "image": "10.50.10.48:5000/centos:7", "command": [ "sh", "-c", "echo 'This goes to file1'" ] } ] } 3、I try to put the README.md file in path /transfer/inputs and /nfs/inputs/,but it didn't work.Are there anything I forget?

pengchunhua avatar Mar 24 '21 11:03 pengchunhua

I set my storage class and pvc like this:

the storage class

apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: managed-nfs-storage namespace: nfs-test annotations: storageclass.kubernetes.io/is-default-class: "true" provisioner: qgg-nfs-storage archiveOnDelete: "false" reclaimPolicy: Retain allowVolumeExpansion: true

the PVC

kind: PersistentVolumeClaim apiVersion: v1 metadata: name: tesk-claim namespace: tesk-test annotations: volume.beta.kubernetes.io/storage-class: "managed-nfs-storage"
spec: accessModes: - ReadWriteMany resources: requests: storage: 1Mi

pengchunhua avatar Mar 24 '21 11:03 pengchunhua