"header:version" is NULL in JSON output for OBJECT HEAD command in frosfs-cli (session token + complex object) #439

Closed
opened 2023-06-09 13:51:03 +00:00 by anikeev-yadro · 0 comments
Member

autotest testsuites.session_token.test_static_object_session_token.TestObjectStaticSession#test_static_session_expiration_at_next

Expected Behavior

Header version should be available in JSON. For example in output for simple object:

   "header":{
      "version":{
         "major":2,
         "minor":13
      },
      "containerID":{
         "value":"MZ3gcbH8+6eiAmAKRqt3iKOkToSlISPtLUbiGC5goVg="

Current Behavior

Header version in NULL in JSON for complex object:

   "header":{
      "version":null,
      "containerID":{
         "value":"Xuq0xFQFBR36ufOfzJcQozTd1gKI7FutuvFVRz2/ajk="
      },

Steps to Reproduce (for bugs)

  1. Create container
COMMAND: frostfs-cli --config /jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/wallet_config.yml container create --rpc-endpoint '172.26.160.248:8080' --wallet '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/30fd0118-7280-459f-845b-ee3e29927a96.json' --await --policy 'REP 2 IN X CBF 1 SELECT 4 FROM * AS X'
RETCODE: 0

STDOUT:
container ID: 7PWu8opa7yVNvDJpeT85y3WGP5iXNewLTsPJPbXMAiRW
awaiting...
container has been persisted on sidechain

STDERR:

Start / End / Elapsed	 07:28:42.873167 / 07:28:51.302474 / 0:00:08.429307
  1. Put object
COMMAND: frostfs-cli --config /jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/wallet_config.yml object put --rpc-endpoint '172.26.160.7:8080' --wallet '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/30fd0118-7280-459f-845b-ee3e29927a96.json' --cid '7PWu8opa7yVNvDJpeT85y3WGP5iXNewLTsPJPbXMAiRW' --file 'TemporaryDir/da180d0d-34d8-4c4f-9c00-d25469e37364' --no-progress
RETCODE: 0

STDOUT:
[TemporaryDir/da180d0d-34d8-4c4f-9c00-d25469e37364] Object successfully stored
  OID: CxoMmGgzT9HaXBbA5quDF24ADnjA1EKgqiBZv4sE3G9f
  CID: 7PWu8opa7yVNvDJpeT85y3WGP5iXNewLTsPJPbXMAiRW

STDERR:

Start / End / Elapsed	 07:31:36.803636 / 07:31:42.738669 / 0:00:05.935033
  1. Generate session token
  2. Sign session token
COMMAND: frostfs-cli --config /jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/wallet_config.yml util sign session-token --wallet '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/30fd0118-7280-459f-845b-ee3e29927a96.json' --from '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/9474fe92-ae5c-462c-a3fe-783534d1bc2b' --to '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/d7b06321-9175-40c1-ac16-4eb9f713ac36'
RETCODE: 0

STDOUT:
signed session token saved in /jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/d7b06321-9175-40c1-ac16-4eb9f713ac36

STDERR:

Start / End / Elapsed	 07:33:02.318392 / 07:33:02.694636 / 0:00:00.376244
  1. Run HEAD command
COMMAND: frostfs-cli --config /jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/wallet_config.yml object head --rpc-endpoint '172.26.160.248:8080' --wallet '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/a744d53f-600e-4139-b851-5880d51b8097.json' --cid '7PWu8opa7yVNvDJpeT85y3WGP5iXNewLTsPJPbXMAiRW' --oid 'CxoMmGgzT9HaXBbA5quDF24ADnjA1EKgqiBZv4sE3G9f' --json --session '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/d7b06321-9175-40c1-ac16-4eb9f713ac36'
RETCODE: 0

STDOUT:
{"objectID":{"value":"sbvq9xaQ6/Q2lw59CWBCmvq97vbWSFurUPltvoMCVbI="},"signature":{"key":"Amf0FDbaB10NWwh7ErtLlVXSaVjEwylqgWc2xcLkDZww","signature":"BG7cvRTnAUG93o0XPlU36ihdfIx2Zzkzd45XjnkJIlg0GrKhbAtuct9n3Qrj7KG6n0E5NVRjQeQ3zHJ0hRcsfCk=","scheme":"ECDSA_SHA512"},"header":{"version":null,"containerID":{"value":"Xuq0xFQFBR36ufOfzJcQozTd1gKI7FutuvFVRz2/ajk="},"ownerID":{"value":"NW3RxKhKv3zIjTjXaqyE6evOxxtsxn1B3g=="},"creationEpoch":"294","payloadLength":"201327592","payloadHash":{"type":"SHA256","sum":"Len4t2KGZW5WeZuyD1A0vfE2bcZMB+N2Pgg32NqSXg4="},"objectType":"REGULAR","homomorphicHash":null,"sessionToken":{"body":{"id":"icxHNvoUSMqIu3C8EjlBJQ==","ownerID":{"value":"NW3RxKhKv3zIjTjXaqyE6evOxxtsxn1B3g=="},"lifetime":{"exp":"304","nbf":"294","iat":"294"},"sessionKey":"Amf0FDbaB10NWwh7ErtLlVXSaVjEwylqgWc2xcLkDZww","object":{"verb":"PUT","target":{"container":{"value":"Xuq0xFQFBR36ufOfzJcQozTd1gKI7FutuvFVRz2/ajk="},"objects":[]}}},"signature":{"key":"Aj7HmjEAGaKoM17mmgfkf1QZIIKgMVydoS9qZJeXncDq","signature":"BLwOJreUVCQZ42j/eYPi0cs2amvVUEpAxfX8xcHtvnWfE0hr3e+NcBZzdlxSA0FllhgZ8GZLsTx7euXVw6SyyvY=","scheme":"ECDSA_SHA512"}},"attributes":[{"key":"FileName","value":"da180d0d-34d8-4c4f-9c00-d25469e37364"},{"key":"Timestamp","value":"1686295897"}],"split":null},"payload":""}

STDERR:

Start / End / Elapsed	 07:33:02.696106 / 07:33:03.080429 / 0:00:00.384323
  1. Test failed because failed to decode JSON output.

Version

0.22.1-2360-g5b75432c

Regression

yes

Your Environment

virtual
4 nodes

autotest testsuites.session_token.test_static_object_session_token.TestObjectStaticSession#test_static_session_expiration_at_next ## Expected Behavior Header version should be available in JSON. For example in output for simple object: ``` "header":{ "version":{ "major":2, "minor":13 }, "containerID":{ "value":"MZ3gcbH8+6eiAmAKRqt3iKOkToSlISPtLUbiGC5goVg=" ``` ## Current Behavior Header version in NULL in JSON for complex object: ``` "header":{ "version":null, "containerID":{ "value":"Xuq0xFQFBR36ufOfzJcQozTd1gKI7FutuvFVRz2/ajk=" }, ``` ## Steps to Reproduce (for bugs) 1. Create container ``` COMMAND: frostfs-cli --config /jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/wallet_config.yml container create --rpc-endpoint '172.26.160.248:8080' --wallet '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/30fd0118-7280-459f-845b-ee3e29927a96.json' --await --policy 'REP 2 IN X CBF 1 SELECT 4 FROM * AS X' RETCODE: 0 STDOUT: container ID: 7PWu8opa7yVNvDJpeT85y3WGP5iXNewLTsPJPbXMAiRW awaiting... container has been persisted on sidechain STDERR: Start / End / Elapsed 07:28:42.873167 / 07:28:51.302474 / 0:00:08.429307 ``` 2. Put object ``` COMMAND: frostfs-cli --config /jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/wallet_config.yml object put --rpc-endpoint '172.26.160.7:8080' --wallet '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/30fd0118-7280-459f-845b-ee3e29927a96.json' --cid '7PWu8opa7yVNvDJpeT85y3WGP5iXNewLTsPJPbXMAiRW' --file 'TemporaryDir/da180d0d-34d8-4c4f-9c00-d25469e37364' --no-progress RETCODE: 0 STDOUT: [TemporaryDir/da180d0d-34d8-4c4f-9c00-d25469e37364] Object successfully stored OID: CxoMmGgzT9HaXBbA5quDF24ADnjA1EKgqiBZv4sE3G9f CID: 7PWu8opa7yVNvDJpeT85y3WGP5iXNewLTsPJPbXMAiRW STDERR: Start / End / Elapsed 07:31:36.803636 / 07:31:42.738669 / 0:00:05.935033 ``` 3. Generate session token 4. Sign session token ``` COMMAND: frostfs-cli --config /jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/wallet_config.yml util sign session-token --wallet '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/30fd0118-7280-459f-845b-ee3e29927a96.json' --from '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/9474fe92-ae5c-462c-a3fe-783534d1bc2b' --to '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/d7b06321-9175-40c1-ac16-4eb9f713ac36' RETCODE: 0 STDOUT: signed session token saved in /jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/d7b06321-9175-40c1-ac16-4eb9f713ac36 STDERR: Start / End / Elapsed 07:33:02.318392 / 07:33:02.694636 / 0:00:00.376244 ``` 5. Run HEAD command ``` COMMAND: frostfs-cli --config /jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/wallet_config.yml object head --rpc-endpoint '172.26.160.248:8080' --wallet '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/a744d53f-600e-4139-b851-5880d51b8097.json' --cid '7PWu8opa7yVNvDJpeT85y3WGP5iXNewLTsPJPbXMAiRW' --oid 'CxoMmGgzT9HaXBbA5quDF24ADnjA1EKgqiBZv4sE3G9f' --json --session '/jenkins/workspace/test_dev_ykovshova_sbercloud_test/tmp.HHbABuaj1V/frostfs-testcases/TemporaryDir/d7b06321-9175-40c1-ac16-4eb9f713ac36' RETCODE: 0 STDOUT: {"objectID":{"value":"sbvq9xaQ6/Q2lw59CWBCmvq97vbWSFurUPltvoMCVbI="},"signature":{"key":"Amf0FDbaB10NWwh7ErtLlVXSaVjEwylqgWc2xcLkDZww","signature":"BG7cvRTnAUG93o0XPlU36ihdfIx2Zzkzd45XjnkJIlg0GrKhbAtuct9n3Qrj7KG6n0E5NVRjQeQ3zHJ0hRcsfCk=","scheme":"ECDSA_SHA512"},"header":{"version":null,"containerID":{"value":"Xuq0xFQFBR36ufOfzJcQozTd1gKI7FutuvFVRz2/ajk="},"ownerID":{"value":"NW3RxKhKv3zIjTjXaqyE6evOxxtsxn1B3g=="},"creationEpoch":"294","payloadLength":"201327592","payloadHash":{"type":"SHA256","sum":"Len4t2KGZW5WeZuyD1A0vfE2bcZMB+N2Pgg32NqSXg4="},"objectType":"REGULAR","homomorphicHash":null,"sessionToken":{"body":{"id":"icxHNvoUSMqIu3C8EjlBJQ==","ownerID":{"value":"NW3RxKhKv3zIjTjXaqyE6evOxxtsxn1B3g=="},"lifetime":{"exp":"304","nbf":"294","iat":"294"},"sessionKey":"Amf0FDbaB10NWwh7ErtLlVXSaVjEwylqgWc2xcLkDZww","object":{"verb":"PUT","target":{"container":{"value":"Xuq0xFQFBR36ufOfzJcQozTd1gKI7FutuvFVRz2/ajk="},"objects":[]}}},"signature":{"key":"Aj7HmjEAGaKoM17mmgfkf1QZIIKgMVydoS9qZJeXncDq","signature":"BLwOJreUVCQZ42j/eYPi0cs2amvVUEpAxfX8xcHtvnWfE0hr3e+NcBZzdlxSA0FllhgZ8GZLsTx7euXVw6SyyvY=","scheme":"ECDSA_SHA512"}},"attributes":[{"key":"FileName","value":"da180d0d-34d8-4c4f-9c00-d25469e37364"},{"key":"Timestamp","value":"1686295897"}],"split":null},"payload":""} STDERR: Start / End / Elapsed 07:33:02.696106 / 07:33:03.080429 / 0:00:00.384323 ``` 6. Test failed because failed to decode JSON output. ## Version ``` 0.22.1-2360-g5b75432c ``` ## Regression yes ## Your Environment virtual 4 nodes
anikeev-yadro added the
bug
triage
labels 2023-06-09 13:51:03 +00:00
anikeev-yadro changed title from "header:version" is NULL in JSON output for HEAD command in frosfs-cli (session token + complex object) to "header:version" is NULL in JSON output for OBJECT HEAD command in frosfs-cli (session token + complex object) 2023-06-09 13:52:35 +00:00
fyrchik added the
frostfs-node
label 2023-06-13 10:22:27 +00:00
fyrchik added this to the v0.37.0 milestone 2023-06-14 13:19:38 +00:00
dstepanov-yadro self-assigned this 2023-06-22 12:13:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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/frostfs-node#439
No description provided.