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

neofs-cli object get doesn't write header to file #2090

Closed
vkarak1 opened this issue Nov 23, 2022 · 5 comments · Fixed by #2103
Closed

neofs-cli object get doesn't write header to file #2090

vkarak1 opened this issue Nov 23, 2022 · 5 comments · Fixed by #2103
Assignees
Labels
bug Something isn't working neofs-storage Storage node application issues U3 Regular
Milestone

Comments

@vkarak1
Copy link

vkarak1 commented Nov 23, 2022

I expected to see two new files when running neofs-cli object get with --header and --file flags, but I see only one file with object payload.

Steps to Reproduce (for bugs)

root@az:/home/service# neofs-cli object put   -g  -r node1:8080  --cid 9RP8Wtjpe2sj4KAvmUBrbjE1xU1NwFDZJiiwQ11Vkk4Z --file /etc/neofs/storage/tatlin-object-sber-tfstate/vkarakozov/object1 -t 100m
 157286400 / 157286400 [====================================================================================================================================================================================] 100.00% 2m45s
[/etc/neofs/storage/tatlin-object-sber-tfstate/vkarakozov/object1] Object successfully stored
  OID: 3Yay7NX8TmtCtT4cSJYrhNi5YNCMxZBBpShi48FpgCCe
  CID: 9RP8Wtjpe2sj4KAvmUBrbjE1xU1NwFDZJiiwQ11Vkk4Z
root@az:/home/service# neofs-cli object get -g --cid 9RP8Wtjpe2sj4KAvmUBrbjE1xU1NwFDZJiiwQ11Vkk4Z --oid 3Yay7NX8TmtCtT4cSJYrhNi5YNCMxZBBpShi48FpgCCe **--file new_object** --header head_file  -r node1:8080
 157286400 / 157286400 [=======================================================================================================================================================================================] 100.00% 7s
[new_object] Object successfully saved
ID: 3Yay7NX8TmtCtT4cSJYrhNi5YNCMxZBBpShi48FpgCCe
CID: 9RP8Wtjpe2sj4KAvmUBrbjE1xU1NwFDZJiiwQ11Vkk4Z
Owner: NQxxfEF2Qoy7Hr7mcbR2pyTauwvdF12gtT
CreatedAt: 72
Size: 157286400
HomoHash: 171b149acd18da43e3d829d14e54d1d80d28ac4f118e7811cf2350f0e3b6ad6d5b69b9066acd8571425af2d8e6e8322a175b90c0f48bf0b2b00c220663a72d38
Checksum: cdaa47e7468a4e1d78e2b6739f48999038bdb12ef92b9137fc0c64b52af2c5aa
Type: REGULAR
Attributes:
  FileName=object1
  Timestamp=1669197334 (2022-11-23 09:55:34 +0000 UTC)
Split Header Signature:
  public key: 03f0a17d5df69a7495aa5ccf2a6e061ca142df1c51dd80e08c8e0fb62f058eb0bb
  signature: 0441945f22ebfdf0f94cc5becefe5356d4744b20f8bf99d61a6b9a9ddceb8b248986d1c59425da6450b1f3c4be6f391cb96ccfd2e316a4a21bfefd48ca277d4ad4
root@az:/home/service# ls -l
total 154080
drwxr-xr-x 2 service adm       4096 Nov 21 13:42 bin
-rw-r--r-- 1 root    root     87438 Nov 23 09:49 ir_log.txt
**-rw-r--r-- 1 root    root 157286400 Nov 23 09:59 new_object**
-rw------- 1 root    root      7912 Nov 22 21:31 nohup.out
-rw-r--r-- 1 root    root       100 Nov 21 12:49 object1
-rw-r--r-- 1 root    root     75644 Nov 21 12:26 put.txt
-rwxrwxrwx 1 root    root       338 Nov 22 09:06 search.sh
-rw-r--r-- 1 root    root    300195 Nov 23 09:49 storage_log.txt

Attached logs

Your Environment

root@az:/home/service# neofs-node --version
NeoFS Storage node
Version: v0.34.0-60-g02049ca5
GoVersion: go1.19.3
@alexchetaev alexchetaev added the U3 Regular label Nov 23, 2022
@acid-ant
Copy link
Contributor

@vkarak1 to print header in file we need to marshal it in json or proto. But there are no flags --proto\--json in object get command.
Looks like we need to add these flags.
@fyrchik, should we choose some format by default or we need to reject writing?

@acid-ant
Copy link
Contributor

Also we already have flag --binary which is similar to proto.

@carpawell
Copy link
Member

IMO there is no use-case for dumping the header only in proto format.

@acid-ant
Copy link
Contributor

Flag --proto we are using in commands get/head, --binary in delete/get/put.
How about to use --binary instead of --proto and in get write header in file in binary format if flag --header provided?
And do the same in command head if flag --file provided.

@fyrchik
Copy link
Contributor

fyrchik commented Nov 25, 2022

I vote for removing --header, it seems too complex and you can always use object head if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working neofs-storage Storage node application issues U3 Regular
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants