Filehealth cli (#1649)

* print CSV formatted data for checking object and segment health
This commit is contained in:
Alexander Leitner 2019-04-04 13:11:19 -04:00 committed by GitHub
parent 255b92b4b8
commit 06e2e7a1e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 277 additions and 189 deletions

View File

@ -21,6 +21,7 @@ import (
"github.com/spf13/cobra"
"github.com/zeebo/errs"
"storj.io/storj/pkg/eestream"
"storj.io/storj/pkg/identity"
"storj.io/storj/pkg/pb"
"storj.io/storj/pkg/process"
@ -35,6 +36,9 @@ var (
// IdentityPath is the path to the identity the inspector should use for network communication
IdentityPath = flag.String("identity-path", "", "path to the identity certificate for use on the network")
// CSVPath is the csv path where command output is written
CSVPath string
// ErrInspectorDial throws when there are errors dialing the inspector server
ErrInspectorDial = errs.Class("error dialing inspector server:")
@ -472,20 +476,73 @@ func ObjectHealth(cmd *cobra.Command, args []string) (err error) {
return ErrArgs.Wrap(err)
}
startAfterSegment := int64(0) // start from first segment
endBeforeSegment := int64(0) // No end, so we stop when we've hit limit or arrived at the last segment
limit := int64(0) // No limit, so we stop when we've arrived at the last segment
switch len(args) {
case 6:
limit, err = strconv.ParseInt(args[5], 10, 64)
if err != nil {
return ErrRequest.Wrap(err)
}
fallthrough
case 5:
endBeforeSegment, err = strconv.ParseInt(args[4], 10, 64)
if err != nil {
return ErrRequest.Wrap(err)
}
fallthrough
case 4:
startAfterSegment, err = strconv.ParseInt(args[3], 10, 64)
if err != nil {
return ErrRequest.Wrap(err)
}
fallthrough
default:
}
req := &pb.ObjectHealthRequest{
ProjectId: []byte(args[0]),
Bucket: []byte(args[1]),
EncryptedPath: []byte(args[2]),
StartAfterSegment: 0, // start from first segment
EndBeforeSegment: 0, // No end, so we stop when we've hit limit or arrived at the last segment
Limit: 0, // No limit, so we stop when we've arrived at the last segment
StartAfterSegment: startAfterSegment,
EndBeforeSegment: endBeforeSegment,
Limit: int32(limit),
}
_, err = i.healthclient.ObjectHealth(ctx, req)
resp, err := i.healthclient.ObjectHealth(ctx, req)
if err != nil {
return ErrRequest.Wrap(err)
}
f, err := csvOutput()
if err != nil {
return err
}
defer func() {
err := f.Close()
if err != nil {
fmt.Printf("error closing file: %+v\n", err)
}
}()
w := csv.NewWriter(f)
defer w.Flush()
redundancy, err := eestream.NewRedundancyStrategyFromProto(resp.GetRedundancy())
if err != nil {
return ErrRequest.Wrap(err)
}
if err := printRedundancyTable(w, redundancy); err != nil {
return err
}
if err := printSegmentHealthTable(w, redundancy, resp.GetSegments()); err != nil {
return err
}
return nil
}
@ -510,11 +567,98 @@ func SegmentHealth(cmd *cobra.Command, args []string) (err error) {
EncryptedPath: []byte(args[3]),
}
_, err = i.healthclient.SegmentHealth(ctx, req)
resp, err := i.healthclient.SegmentHealth(ctx, req)
if err != nil {
return ErrRequest.Wrap(err)
}
f, err := csvOutput()
if err != nil {
return err
}
defer func() {
err := f.Close()
if err != nil {
fmt.Printf("error closing file: %+v\n", err)
}
}()
w := csv.NewWriter(f)
defer w.Flush()
redundancy, err := eestream.NewRedundancyStrategyFromProto(resp.GetRedundancy())
if err != nil {
return ErrRequest.Wrap(err)
}
if err := printRedundancyTable(w, redundancy); err != nil {
return err
}
if err := printSegmentHealthTable(w, redundancy, []*pb.SegmentHealth{resp.GetHealth()}); err != nil {
return err
}
return nil
}
func csvOutput() (*os.File, error) {
if CSVPath == "stdout" {
return os.Stdout, nil
}
return os.Create(CSVPath)
}
func printSegmentHealthTable(w *csv.Writer, redundancy eestream.RedundancyStrategy, segments []*pb.SegmentHealth) error {
segmentTableHeader := []string{
"Segment Index", "Online Nodes", "Offline Nodes",
}
if err := w.Write(segmentTableHeader); err != nil {
return fmt.Errorf("error writing record to csv: %s", err)
}
total := redundancy.TotalCount() // total amount of pieces we generated (n)
// Add each segment to the segmentTable
for _, segment := range segments {
onlineNodes := segment.GetOnlineNodes() // amount of nodes with pieces currently online
segmentIndexPath := string(segment.GetSegment()) // path formatted Segment Index
offlineNodes := int32(total) - onlineNodes
row := []string{
segmentIndexPath,
strconv.FormatInt(int64(onlineNodes), 10),
strconv.FormatInt(int64(offlineNodes), 10),
}
if err := w.Write(row); err != nil {
return fmt.Errorf("error writing record to csv: %s", err)
}
}
return nil
}
func printRedundancyTable(w *csv.Writer, redundancy eestream.RedundancyStrategy) error {
total := redundancy.TotalCount() // total amount of pieces we generated (n)
required := redundancy.RequiredCount() // minimum required stripes for reconstruction (k)
optimalThreshold := redundancy.OptimalThreshold() // amount of pieces we need to store to call it a success (o)
repairThreshold := redundancy.RepairThreshold() // amount of pieces we need to drop to before triggering repair (m)
redundancyTable := [][]string{
{"Total Pieces (n)", "Minimum Required (k)", "Optimal Threshold (o)", "Repair Threshold (m)"},
{strconv.Itoa(total), strconv.Itoa(required), strconv.Itoa(optimalThreshold), strconv.Itoa(repairThreshold)},
{},
}
for _, row := range redundancyTable {
if err := w.Write(row); err != nil {
return fmt.Errorf("error writing record to csv: %s", err)
}
}
return nil
}
@ -597,6 +741,8 @@ func init() {
healthCmd.AddCommand(objectHealthCmd)
healthCmd.AddCommand(segmentHealthCmd)
objectHealthCmd.Flags().StringVar(&CSVPath, "csv-path", "stdout", "csv path where command output is written")
irreparableCmd.Flags().Int32Var(&irreparableLimit, "limit", 50, "max number of results per page")
flag.Parse()

View File

@ -1359,12 +1359,8 @@ func (m *SegmentHealthRequest) GetProjectId() []byte {
}
type SegmentHealth struct {
MinimumRequired int32 `protobuf:"varint,1,opt,name=minimum_required,json=minimumRequired,proto3" json:"minimum_required,omitempty"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
RepairThreshold int32 `protobuf:"varint,3,opt,name=repair_threshold,json=repairThreshold,proto3" json:"repair_threshold,omitempty"`
SuccessThreshold int32 `protobuf:"varint,4,opt,name=success_threshold,json=successThreshold,proto3" json:"success_threshold,omitempty"`
OnlineNodes int32 `protobuf:"varint,5,opt,name=online_nodes,json=onlineNodes,proto3" json:"online_nodes,omitempty"`
Segment []byte `protobuf:"bytes,6,opt,name=segment,proto3" json:"segment,omitempty"`
OnlineNodes int32 `protobuf:"varint,1,opt,name=online_nodes,json=onlineNodes,proto3" json:"online_nodes,omitempty"`
Segment []byte `protobuf:"bytes,2,opt,name=segment,proto3" json:"segment,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1394,34 +1390,6 @@ func (m *SegmentHealth) XXX_DiscardUnknown() {
var xxx_messageInfo_SegmentHealth proto.InternalMessageInfo
func (m *SegmentHealth) GetMinimumRequired() int32 {
if m != nil {
return m.MinimumRequired
}
return 0
}
func (m *SegmentHealth) GetTotal() int32 {
if m != nil {
return m.Total
}
return 0
}
func (m *SegmentHealth) GetRepairThreshold() int32 {
if m != nil {
return m.RepairThreshold
}
return 0
}
func (m *SegmentHealth) GetSuccessThreshold() int32 {
if m != nil {
return m.SuccessThreshold
}
return 0
}
func (m *SegmentHealth) GetOnlineNodes() int32 {
if m != nil {
return m.OnlineNodes
@ -1646,116 +1614,112 @@ func init() {
func init() { proto.RegisterFile("inspector.proto", fileDescriptor_a07d9034b2dd9d26) }
var fileDescriptor_a07d9034b2dd9d26 = []byte{
// 1735 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4d, 0x73, 0x1b, 0x4d,
0x11, 0xce, 0xea, 0x2b, 0x56, 0x4b, 0xd6, 0xc7, 0xc8, 0xef, 0xfb, 0x0a, 0x25, 0xb1, 0x9c, 0xe5,
0x23, 0x4e, 0x42, 0x29, 0x41, 0x84, 0x43, 0x48, 0xe5, 0x10, 0xdb, 0x24, 0x51, 0x25, 0x24, 0xce,
0xda, 0x5c, 0xa8, 0x14, 0xaa, 0x91, 0x76, 0x2c, 0x2d, 0x96, 0x76, 0x36, 0xbb, 0xb3, 0x21, 0xfe,
0x03, 0x14, 0xfc, 0x01, 0xaa, 0xe0, 0xca, 0x9f, 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d4, 0xdb, 0x13, 0x00, 0x00,
// 1671 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x72, 0x1b, 0xc7,
0x11, 0xd6, 0xe2, 0x4f, 0x44, 0x03, 0xc4, 0xcf, 0x80, 0x92, 0x10, 0x48, 0x22, 0x98, 0xcd, 0x8f,
0x28, 0x29, 0x05, 0x29, 0x88, 0x72, 0x50, 0x54, 0x3a, 0x88, 0x64, 0x24, 0xa1, 0xc4, 0x48, 0xd4,
0x52, 0xb9, 0xa4, 0x54, 0x41, 0x0d, 0xb0, 0x43, 0x70, 0x43, 0x60, 0x67, 0xb5, 0x3b, 0x50, 0xc4,
0x17, 0x70, 0xd9, 0x2f, 0xe0, 0x2a, 0xfb, 0xea, 0x97, 0x70, 0xd9, 0x2f, 0xe0, 0x9b, 0xef, 0x3e,
0xe8, 0xe2, 0x2a, 0xfb, 0x19, 0x7c, 0x73, 0x4d, 0xcf, 0xec, 0x2f, 0x00, 0x93, 0xe5, 0x9f, 0x1b,
0xf6, 0xeb, 0x6f, 0x7a, 0xba, 0x7b, 0x66, 0x7a, 0xbe, 0x01, 0xd4, 0x1d, 0x37, 0xf0, 0xd8, 0x58,
0x70, 0xbf, 0xe7, 0xf9, 0x5c, 0x70, 0x52, 0x8e, 0x80, 0x0e, 0x4c, 0xf8, 0x84, 0x2b, 0xb8, 0x03,
0x2e, 0xb7, 0x99, 0xfe, 0x5d, 0xf7, 0xb8, 0xe3, 0x0a, 0xe6, 0xdb, 0x23, 0x0d, 0x6c, 0x4e, 0x38,
0x9f, 0x4c, 0xd9, 0x1d, 0xfc, 0x1a, 0xcd, 0x8f, 0xee, 0xd8, 0x73, 0x9f, 0x0a, 0x87, 0xbb, 0xda,
0xde, 0xcd, 0xda, 0x85, 0x33, 0x63, 0x81, 0xa0, 0x33, 0x4f, 0x11, 0xcc, 0xe7, 0xb0, 0xb9, 0x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x37, 0x1a, 0x95, 0xf0, 0xda, 0xff, 0xdb, 0x8f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9c,
0x24, 0x48, 0x7d, 0x41, 0x13, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -2349,9 +2313,9 @@ var _IrreparableInspector_serviceDesc = grpc.ServiceDesc{
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type HealthInspectorClient interface {
// ObjectHealth will returns stats about the health of an object
// ObjectHealth will return stats about the health of an object
ObjectHealth(ctx context.Context, in *ObjectHealthRequest, opts ...grpc.CallOption) (*ObjectHealthResponse, error)
// SegmentHealth will returns stats about the health of a segment
// SegmentHealth will return stats about the health of a segment
SegmentHealth(ctx context.Context, in *SegmentHealthRequest, opts ...grpc.CallOption) (*SegmentHealthResponse, error)
}
@ -2383,9 +2347,9 @@ func (c *healthInspectorClient) SegmentHealth(ctx context.Context, in *SegmentHe
// HealthInspectorServer is the server API for HealthInspector service.
type HealthInspectorServer interface {
// ObjectHealth will returns stats about the health of an object
// ObjectHealth will return stats about the health of an object
ObjectHealth(context.Context, *ObjectHealthRequest) (*ObjectHealthResponse, error)
// SegmentHealth will returns stats about the health of a segment
// SegmentHealth will return stats about the health of a segment
SegmentHealth(context.Context, *SegmentHealthRequest) (*SegmentHealthResponse, error)
}

View File

@ -215,12 +215,8 @@ message SegmentHealthRequest {
}
message SegmentHealth {
int32 minimum_required = 1; // minimum required stripes for reconstruction (k)
int32 total = 2; // total amount of pieces we generated (n)
int32 repair_threshold = 3; // amount of pieces we need to drop to before triggering repair (m)
int32 success_threshold = 4; // amount of pieces we need to store to call it a success (o)
int32 online_nodes = 5; // amount of pieces with nodes that are online
bytes segment = 6; // path formatted segment index
int32 online_nodes = 1; // amount of pieces with nodes that are online
bytes segment = 2; // path formatted segment index
}
message SegmentHealthResponse {

View File

@ -12,7 +12,6 @@ import (
"go.uber.org/zap"
monkit "gopkg.in/spacemonkeygo/monkit.v2"
"storj.io/storj/pkg/eestream"
"storj.io/storj/pkg/overlay"
"storj.io/storj/pkg/pb"
"storj.io/storj/pkg/pointerdb"
@ -134,11 +133,6 @@ func (endpoint *Endpoint) SegmentHealth(ctx context.Context, in *pb.SegmentHealt
return nil, Error.New("cannot check health of inline segment")
}
redundancy, err := eestream.NewRedundancyStrategyFromProto(pointer.GetRemote().GetRedundancy())
if err != nil {
return nil, Error.Wrap(err)
}
var nodeIDs storj.NodeIDList
for _, piece := range pointer.GetRemote().GetRemotePieces() {
nodeIDs = append(nodeIDs, piece.NodeId)
@ -149,20 +143,6 @@ func (endpoint *Endpoint) SegmentHealth(ctx context.Context, in *pb.SegmentHealt
return nil, Error.Wrap(err)
}
neededForRepair := health.GetOnlineNodes() - int32(redundancy.RepairThreshold())
if neededForRepair < 0 {
neededForRepair = int32(0)
}
neededForSuccess := health.GetOnlineNodes() - int32(redundancy.OptimalThreshold())
if neededForSuccess < 0 {
neededForSuccess = int32(0)
}
health.MinimumRequired = int32(redundancy.RequiredCount())
health.Total = int32(redundancy.TotalCount())
health.RepairThreshold = neededForRepair
health.SuccessThreshold = neededForSuccess
health.OnlineNodes = int32(len(nodes))
if in.GetSegmentIndex() > -1 {

View File

@ -15,6 +15,7 @@ import (
"storj.io/storj/internal/memory"
"storj.io/storj/internal/testcontext"
"storj.io/storj/internal/testplanet"
"storj.io/storj/pkg/eestream"
"storj.io/storj/pkg/pb"
"storj.io/storj/pkg/storj"
"storj.io/storj/storage"
@ -70,10 +71,11 @@ func TestInspectorStats(t *testing.T) {
resp, err := healthEndpoint.SegmentHealth(ctx, req)
require.NoError(t, err)
require.Equal(t, int32(0), resp.GetHealth().GetSuccessThreshold())
require.Equal(t, int32(1), resp.GetHealth().GetMinimumRequired())
require.Equal(t, int32(4), resp.GetHealth().GetTotal())
require.Equal(t, int32(0), resp.GetHealth().GetRepairThreshold())
redundancy, err := eestream.NewRedundancyStrategyFromProto(resp.GetRedundancy())
require.NoError(t, err)
require.Equal(t, 4, redundancy.TotalCount())
require.True(t, bytes.Equal([]byte("l"), resp.GetHealth().GetSegment()))
}
{ // Test Object Health Request
@ -86,16 +88,16 @@ func TestInspectorStats(t *testing.T) {
Limit: 0,
}
resp, err := healthEndpoint.ObjectHealth(ctx, objectHealthReq)
require.Len(t, resp.GetSegments(), 1)
require.NoError(t, err)
segments := resp.GetSegments()
require.Equal(t, int32(0), segments[0].GetSuccessThreshold())
require.Equal(t, int32(1), segments[0].GetMinimumRequired())
require.Equal(t, int32(4), segments[0].GetTotal())
require.Equal(t, int32(0), segments[0].GetRepairThreshold())
require.Len(t, segments, 1)
redundancy, err := eestream.NewRedundancyStrategyFromProto(resp.GetRedundancy())
require.NoError(t, err)
require.Equal(t, 4, redundancy.TotalCount())
require.True(t, bytes.Equal([]byte("l"), segments[0].GetSegment()))
}
return nil