diff --git a/pkg/proxy/replica.go b/pkg/proxy/replica.go index 13afd3291..b468f6005 100644 --- a/pkg/proxy/replica.go +++ b/pkg/proxy/replica.go @@ -135,23 +135,3 @@ func (p *Proxy) ReplicaRemove(ctx context.Context, req *rpc.EngineReplicaRemoveR return &empty.Empty{}, nil } -<<<<<<< HEAD -======= - -func (p *Proxy) ReplicaModeUpdate(ctx context.Context, req *rpc.EngineReplicaModeUpdateRequest) (resp *empty.Empty, err error) { - log := logrus.WithFields(logrus.Fields{"serviceURL": req.ProxyEngineRequest.Address}) - log.Infof("Updating replica mode to %v", req.Mode) - - c, err := eclient.NewControllerClient(req.ProxyEngineRequest.Address) - if err != nil { - return nil, err - } - defer c.Close() - - if _, err = c.ReplicaUpdate(req.ReplicaAddress, eptypes.GRPCReplicaModeToReplicaMode(req.Mode)); err != nil { - return nil, err - } - - return &empty.Empty{}, nil -} ->>>>>>> 2b6f99d (Change some debug level message to info level) diff --git a/pkg/proxy/snapshot.go b/pkg/proxy/snapshot.go index 1380d8fb6..1ced2e5a3 100644 --- a/pkg/proxy/snapshot.go +++ b/pkg/proxy/snapshot.go @@ -210,51 +210,3 @@ func (p *Proxy) SnapshotRemove(ctx context.Context, req *rpc.EngineSnapshotRemov return &empty.Empty{}, lastErr } -<<<<<<< HEAD -======= - -func (p *Proxy) SnapshotHash(ctx context.Context, req *rpc.EngineSnapshotHashRequest) (resp *empty.Empty, err error) { - log := logrus.WithFields(logrus.Fields{"serviceURL": req.ProxyEngineRequest.Address}) - log.Infof("Hashing snapshot %v with rehash %v", req.SnapshotName, req.Rehash) - - task, err := esync.NewTask(ctx, req.ProxyEngineRequest.Address) - if err != nil { - return nil, err - } - - if err := task.HashSnapshot(req.SnapshotName, req.Rehash); err != nil { - return nil, err - } - - return &empty.Empty{}, nil -} - -func (p *Proxy) SnapshotHashStatus(ctx context.Context, req *rpc.EngineSnapshotHashStatusRequest) (resp *rpc.EngineSnapshotHashStatusProxyResponse, err error) { - log := logrus.WithFields(logrus.Fields{"serviceURL": req.ProxyEngineRequest.Address}) - log.Trace("Getting snapshot hash status") - - task, err := esync.NewTask(ctx, req.ProxyEngineRequest.Address) - if err != nil { - return nil, err - } - - recv, err := task.HashSnapshotStatus(req.SnapshotName) - if err != nil { - return nil, err - } - - resp = &rpc.EngineSnapshotHashStatusProxyResponse{ - Status: map[string]*eptypes.SnapshotHashStatusResponse{}, - } - for k, v := range recv { - resp.Status[k] = &eptypes.SnapshotHashStatusResponse{ - State: v.State, - Checksum: v.Checksum, - Error: v.Error, - SilentlyCorrupted: v.SilentlyCorrupted, - } - } - - return resp, nil -} ->>>>>>> 2b6f99d (Change some debug level message to info level) diff --git a/pkg/proxy/volume.go b/pkg/proxy/volume.go index 8c26369fd..23d2879da 100644 --- a/pkg/proxy/volume.go +++ b/pkg/proxy/volume.go @@ -94,24 +94,3 @@ func (p *Proxy) VolumeFrontendShutdown(ctx context.Context, req *rpc.ProxyEngine return &empty.Empty{}, nil } -<<<<<<< HEAD -======= - -func (p *Proxy) VolumeUnmapMarkSnapChainRemovedSet(ctx context.Context, req *rpc.EngineVolumeUnmapMarkSnapChainRemovedSetRequest) (resp *empty.Empty, err error) { - log := logrus.WithFields(logrus.Fields{"serviceURL": req.ProxyEngineRequest.Address}) - log.Infof("Setting volume flag UnmapMarkSnapChainRemoved to %v", req.UnmapMarkSnap.Enabled) - - c, err := eclient.NewControllerClient(req.ProxyEngineRequest.Address) - if err != nil { - return nil, err - } - defer c.Close() - - err = c.VolumeUnmapMarkSnapChainRemovedSet(req.UnmapMarkSnap.Enabled) - if err != nil { - return nil, err - } - - return &empty.Empty{}, nil -} ->>>>>>> 2b6f99d (Change some debug level message to info level) diff --git a/pkg/util/util.go b/pkg/util/util.go index 2e8fae8dd..36f2975be 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -80,11 +80,7 @@ func RemoveFile(file string) error { } if _, err := Execute("rm", file); err != nil { -<<<<<<< HEAD - return fmt.Errorf("fail to remove file %v: %v", file, err) -======= return errors.Wrapf(err, "failed to remove file %v", file) ->>>>>>> c1b8d3e (Unify the format of log messages) } return nil