forked from TrueCloudLab/frostfs-node
[#1213] cli: Do not allow to lock EC chunks
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
6a91df9138
commit
287a2431b7
1 changed files with 4 additions and 1 deletions
|
@ -354,7 +354,7 @@ func collectObjectRelatives(cmd *cobra.Command, cli *client.Client, cnr cid.ID,
|
|||
|
||||
Prepare(cmd, &prmHead)
|
||||
|
||||
_, err := internal.HeadObject(cmd.Context(), prmHead)
|
||||
o, err := internal.HeadObject(cmd.Context(), prmHead)
|
||||
|
||||
var errSplit *objectSDK.SplitInfoError
|
||||
var errEC *objectSDK.ECInfoError
|
||||
|
@ -364,6 +364,9 @@ func collectObjectRelatives(cmd *cobra.Command, cli *client.Client, cnr cid.ID,
|
|||
commonCmd.ExitOnErr(cmd, "failed to get raw object header: %w", err)
|
||||
case err == nil:
|
||||
common.PrintVerbose(cmd, "Raw header received - object is singular.")
|
||||
if ech := o.Header().ECHeader(); ech != nil {
|
||||
commonCmd.ExitOnErr(cmd, "Lock EC chunk failed: %w", errors.ErrUnsupported)
|
||||
}
|
||||
return nil
|
||||
case errors.As(err, &errSplit):
|
||||
common.PrintVerbose(cmd, "Split information received - object is virtual.")
|
||||
|
|
Loading…
Reference in a new issue