preset: use temporary file for payload #58

Merged
fyrchik merged 1 commit from fyrchik/xk6-frostfs:fix-preset-tempfile into master 2023-05-22 09:06:10 +00:00
Owner

Close #57

Close #57
fyrchik force-pushed fix-preset-tempfile from 6427b803ab to 46f7c8b337 2023-05-03 11:35:03 +00:00 Compare
fyrchik requested review from storage-core-committers 2023-05-03 11:35:07 +00:00
fyrchik requested review from storage-core-developers 2023-05-03 11:35:08 +00:00
fyrchik requested review from storage-services-committers 2023-05-03 11:35:13 +00:00
fyrchik requested review from storage-services-developers 2023-05-03 11:35:18 +00:00
fyrchik requested review from anikeev-yadro 2023-05-03 11:35:24 +00:00
fyrchik requested review from abereziny 2023-05-03 11:35:25 +00:00
fyrchik force-pushed fix-preset-tempfile from 46f7c8b337 to bd41c009f3 2023-05-03 11:35:57 +00:00 Compare
abereziny approved these changes 2023-05-03 11:37:39 +00:00
Member

But this does not closes #57 atm because file is still not deleted after preset.

But this does not closes #57 atm because file is still not deleted after preset.
acid-ant approved these changes 2023-05-03 12:05:14 +00:00
Author
Owner

@abereziny have you checked the behaviour? I have checked with raw python interpreter, the file was deleted after exit.

@abereziny have you checked the behaviour? I have checked with raw python interpreter, the file was deleted after exit.
anikeev-yadro requested changes 2023-05-12 07:32:54 +00:00
@ -3,6 +3,7 @@
import argparse
import json
import sys
import tempfile
Member

Need to add this line to preset_grpc.py too.

root@tatlinobject:/home/service/xk6-frostfs-preset# ./scenarios/preset/preset_grpc.py --size 64 --containers 1 --out /var/data/tmp/grpc_reset1005-111.json --endpoint 10.78.70.148:8080 --preload_obj 1 --wallet scenarios/files/wallet.json --config scenarios/files/empty_pass.yaml
Namespace(size='64', containers='1', out='/var/data/tmp/grpc_reset1005-111.json', preload_obj='1', wallet='scenarios/files/wallet.json', config='scenarios/files/empty_pass.yaml', policy='REP 2 IN X CBF 2 SELECT 2 FROM * AS X', endpoint='10.78.70.148:8080', update=None, ignore_errors=None, workers=50)
Create containers: 1
Created container: 43m16EUiDmMyDKMShXjRX5xTijhLDL7vL5KFzrYkqAY4
Create containers: Completed
 > Containers: ['43m16EUiDmMyDKMShXjRX5xTijhLDL7vL5KFzrYkqAY4']
Upload objects to each container: 1
Traceback (most recent call last):
  File "/home/service/xk6-frostfs-preset/./scenarios/preset/preset_grpc.py", line 106, in <module>
    main()
  File "/home/service/xk6-frostfs-preset/./scenarios/preset/preset_grpc.py", line 73, in main
    payload_file = tempfile.NamedTemporaryFile()
NameError: name 'tempfile' is not defined
Need to add this line to preset_grpc.py too. ``` root@tatlinobject:/home/service/xk6-frostfs-preset# ./scenarios/preset/preset_grpc.py --size 64 --containers 1 --out /var/data/tmp/grpc_reset1005-111.json --endpoint 10.78.70.148:8080 --preload_obj 1 --wallet scenarios/files/wallet.json --config scenarios/files/empty_pass.yaml Namespace(size='64', containers='1', out='/var/data/tmp/grpc_reset1005-111.json', preload_obj='1', wallet='scenarios/files/wallet.json', config='scenarios/files/empty_pass.yaml', policy='REP 2 IN X CBF 2 SELECT 2 FROM * AS X', endpoint='10.78.70.148:8080', update=None, ignore_errors=None, workers=50) Create containers: 1 Created container: 43m16EUiDmMyDKMShXjRX5xTijhLDL7vL5KFzrYkqAY4 Create containers: Completed > Containers: ['43m16EUiDmMyDKMShXjRX5xTijhLDL7vL5KFzrYkqAY4'] Upload objects to each container: 1 Traceback (most recent call last): File "/home/service/xk6-frostfs-preset/./scenarios/preset/preset_grpc.py", line 106, in <module> main() File "/home/service/xk6-frostfs-preset/./scenarios/preset/preset_grpc.py", line 73, in main payload_file = tempfile.NamedTemporaryFile() NameError: name 'tempfile' is not defined ```
Author
Owner

Fixed

Fixed
fyrchik force-pushed fix-preset-tempfile from bd41c009f3 to 2e918c57d5 2023-05-12 07:34:57 +00:00 Compare
fyrchik requested review from anikeev-yadro 2023-05-18 15:08:57 +00:00
aarifullin approved these changes 2023-05-19 11:25:54 +00:00
JuliaKovshova approved these changes 2023-05-22 07:07:13 +00:00
anikeev-yadro approved these changes 2023-05-22 09:05:21 +00:00
fyrchik merged commit 4c2678077b into master 2023-05-22 09:06:10 +00:00
fyrchik deleted branch fix-preset-tempfile 2023-05-22 09:06:12 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-services-committers
TrueCloudLab/storage-services-developers
No milestone
No project
No assignees
6 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/xk6-frostfs#58
No description provided.