ydb icon indicating copy to clipboard operation
ydb copied to clipboard

Return explicit error on not completed PDisk restart

Open artemmufazalov opened this issue 1 year ago • 2 comments

When request to restart PDisk is sent, it returns HTML of Developer UI PDisk page, even if PDisk cannot be restarted

JSON with restart status message is expected here (probably some message, explaining, why BSC didn't restart PDisk)

Request data: URL: http://host:31002/node/1/actors/pdisks/pdisk000001002 Method: POST Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Data: restartPDisk=

Do not return HTML on POST request method

artemmufazalov avatar Mar 19 '24 13:03 artemmufazalov

@artemmufazalov you could also use format as before. It returns json and doesn't contain consts in the url

curl 'https://proxy.ydb.nemax.nebiuscloud.net/man0-0024.ydb-dev.nemax.nebiuscloud.net:8765/node/1/actors/pdisks/pdisk000001001' \
    -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \
    --data-raw 'restartPDisk=' \
    --insecure

responses example;

  • all good {"result":true}
  • bad {"result":false, "error": "GroupId# 2181038081 ExpectedStatus# DISINTEGRATED"}

StekPerepolnen avatar May 14 '24 09:05 StekPerepolnen