etcdserver: add downgrade rpc proto api.

This commit is contained in:
yoyinzyc 2020-03-20 17:37:26 -07:00
parent 0eee733220
commit d8b9b54348
13 changed files with 1229 additions and 410 deletions

View File

@ -75,6 +75,7 @@ This is a generated documentation. Please read the proto files for more.
| HashKV | HashKVRequest | HashKVResponse | HashKV computes the hash of all MVCC keys up to a given revision. It only iterates "key" bucket in backend storage. |
| Snapshot | SnapshotRequest | SnapshotResponse | Snapshot sends a snapshot of the entire backend from a member over a stream to a client. |
| MoveLeader | MoveLeaderRequest | MoveLeaderResponse | MoveLeader requests current leader node to transfer its leadership to transferee. |
| Downgrade | DowngradeRequest | DowngradeResponse | Downgrade requests downgrade, cancel downgrade on the cluster version. |
@ -462,6 +463,24 @@ Empty field.
##### message `DowngradeRequest` (etcdserver/etcdserverpb/rpc.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| action | action is the kind of downgrade request to issue. The action may VALIDATE the target version, DOWNGRADE the cluster version, or CANCEL the current downgrading job. | DowngradeAction |
| version | version is the target version to downgrade. | string |
##### message `DowngradeResponse` (etcdserver/etcdserverpb/rpc.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| header | | ResponseHeader |
| version | version is the current cluster version. | string |
##### message `HashKVRequest` (etcdserver/etcdserverpb/rpc.proto)
| Field | Description | Type |

View File

@ -1242,6 +1242,39 @@
}
}
},
"/v3/maintenance/downgrade": {
"post": {
"tags": [
"Maintenance"
],
"summary": "Downgrade requests downgrade, cancel downgrade on the cluster version.",
"operationId": "Downgrade",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/etcdserverpbDowngradeRequest"
}
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/etcdserverpbDowngradeResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
}
}
},
"/v3/maintenance/hash": {
"post": {
"tags": [
@ -1458,6 +1491,15 @@
"LEASE"
]
},
"DowngradeRequestDowngradeAction": {
"type": "string",
"default": "VALIDATE",
"enum": [
"VALIDATE",
"ENABLE",
"CANCEL"
]
},
"EventEventType": {
"type": "string",
"default": "PUT",
@ -2030,6 +2072,31 @@
}
}
},
"etcdserverpbDowngradeRequest": {
"type": "object",
"properties": {
"action": {
"description": "action is the kind of downgrade request to issue. The action may\nVALIDATE the target version, DOWNGRADE the cluster version,\nor CANCEL the current downgrading job.",
"$ref": "#/definitions/DowngradeRequestDowngradeAction"
},
"version": {
"description": "version is the target version to downgrade.",
"type": "string"
}
}
},
"etcdserverpbDowngradeResponse": {
"type": "object",
"properties": {
"header": {
"$ref": "#/definitions/etcdserverpbResponseHeader"
},
"version": {
"description": "version is the current cluster version.",
"type": "string"
}
}
},
"etcdserverpbHashKVRequest": {
"type": "object",
"properties": {

View File

@ -222,6 +222,10 @@ func (rmc *retryMaintenanceClient) Defragment(ctx context.Context, in *pb.Defrag
return rmc.mc.Defragment(ctx, in, opts...)
}
func (rmc *retryMaintenanceClient) Downgrade(ctx context.Context, in *pb.DowngradeRequest, opts ...grpc.CallOption) (resp *pb.DowngradeResponse, err error) {
return rmc.mc.Downgrade(ctx, in, opts...)
}
type retryAuthClient struct {
ac pb.AuthClient
}

View File

@ -13,6 +13,7 @@
Member
ClusterVersionSetRequest
ClusterMemberAttrSetRequest
DowngradeInfoSetRequest
*/
package membershippb
@ -97,12 +98,25 @@ func (*ClusterMemberAttrSetRequest) Descriptor() ([]byte, []int) {
return fileDescriptorMembership, []int{4}
}
type DowngradeInfoSetRequest struct {
Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
Ver string `protobuf:"bytes,2,opt,name=ver,proto3" json:"ver,omitempty"`
}
func (m *DowngradeInfoSetRequest) Reset() { *m = DowngradeInfoSetRequest{} }
func (m *DowngradeInfoSetRequest) String() string { return proto.CompactTextString(m) }
func (*DowngradeInfoSetRequest) ProtoMessage() {}
func (*DowngradeInfoSetRequest) Descriptor() ([]byte, []int) {
return fileDescriptorMembership, []int{5}
}
func init() {
proto.RegisterType((*RaftAttributes)(nil), "membershippb.RaftAttributes")
proto.RegisterType((*Attributes)(nil), "membershippb.Attributes")
proto.RegisterType((*Member)(nil), "membershippb.Member")
proto.RegisterType((*ClusterVersionSetRequest)(nil), "membershippb.ClusterVersionSetRequest")
proto.RegisterType((*ClusterMemberAttrSetRequest)(nil), "membershippb.ClusterMemberAttrSetRequest")
proto.RegisterType((*DowngradeInfoSetRequest)(nil), "membershippb.DowngradeInfoSetRequest")
}
func (m *RaftAttributes) Marshal() (dAtA []byte, err error) {
size := m.Size()
@ -286,6 +300,40 @@ func (m *ClusterMemberAttrSetRequest) MarshalTo(dAtA []byte) (int, error) {
return i, nil
}
func (m *DowngradeInfoSetRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *DowngradeInfoSetRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Enabled {
dAtA[i] = 0x8
i++
if m.Enabled {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if len(m.Ver) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintMembership(dAtA, i, uint64(len(m.Ver)))
i += copy(dAtA[i:], m.Ver)
}
return i, nil
}
func encodeVarintMembership(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
@ -366,6 +414,19 @@ func (m *ClusterMemberAttrSetRequest) Size() (n int) {
return n
}
func (m *DowngradeInfoSetRequest) Size() (n int) {
var l int
_ = l
if m.Enabled {
n += 2
}
l = len(m.Ver)
if l > 0 {
n += 1 + l + sovMembership(uint64(l))
}
return n
}
func sovMembership(x uint64) (n int) {
for {
n++
@ -902,6 +963,105 @@ func (m *ClusterMemberAttrSetRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *DowngradeInfoSetRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMembership
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: DowngradeInfoSetRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DowngradeInfoSetRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMembership
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Enabled = bool(v != 0)
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Ver", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMembership
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthMembership
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Ver = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMembership(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthMembership
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipMembership(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
@ -1010,26 +1170,28 @@ var (
func init() { proto.RegisterFile("membership.proto", fileDescriptorMembership) }
var fileDescriptorMembership = []byte{
// 333 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x41, 0x4e, 0xc2, 0x40,
0x14, 0x86, 0x99, 0x42, 0x08, 0x7d, 0x18, 0xc4, 0x09, 0x8b, 0x46, 0xb4, 0x92, 0xae, 0x58, 0x18,
0x4c, 0xf4, 0x04, 0x28, 0x2c, 0x48, 0x60, 0x33, 0x46, 0xb7, 0xa4, 0x35, 0x0f, 0x6c, 0x52, 0xda,
0xfa, 0x66, 0xea, 0xde, 0x5b, 0x78, 0x02, 0xcf, 0xc2, 0xd2, 0x23, 0x28, 0x5e, 0xc4, 0x74, 0xa6,
0x81, 0x36, 0x71, 0xe3, 0xee, 0xe5, 0xef, 0xff, 0xbe, 0xf7, 0xff, 0xcd, 0x40, 0x77, 0x83, 0x9b,
0x00, 0x49, 0x3e, 0x87, 0xe9, 0x28, 0xa5, 0x44, 0x25, 0xfc, 0xe8, 0xa0, 0xa4, 0xc1, 0x69, 0x6f,
0x9d, 0xac, 0x13, 0xfd, 0xe1, 0x2a, 0x9f, 0x8c, 0xc7, 0x9b, 0x43, 0x47, 0xf8, 0x2b, 0x35, 0x56,
0x8a, 0xc2, 0x20, 0x53, 0x28, 0x79, 0x1f, 0xec, 0x14, 0x91, 0x96, 0x19, 0x45, 0xd2, 0x61, 0x83,
0xfa, 0xd0, 0x16, 0xad, 0x5c, 0x78, 0xa0, 0x48, 0xf2, 0x73, 0x80, 0x50, 0x2e, 0x23, 0xf4, 0x29,
0x46, 0x72, 0xac, 0x01, 0x1b, 0xb6, 0x84, 0x1d, 0xca, 0xb9, 0x11, 0xbc, 0x31, 0x40, 0x89, 0xc4,
0xa1, 0x11, 0xfb, 0x1b, 0x74, 0xd8, 0x80, 0x0d, 0x6d, 0xa1, 0x67, 0x7e, 0x01, 0xed, 0xa7, 0x28,
0xc4, 0x58, 0x19, 0xbe, 0xa5, 0xf9, 0x60, 0xa4, 0xfc, 0x82, 0xf7, 0xc1, 0xa0, 0xb9, 0xd0, 0xb9,
0x79, 0x07, 0xac, 0xd9, 0x44, 0x6f, 0x37, 0x84, 0x35, 0x9b, 0xf0, 0x29, 0x1c, 0x93, 0xbf, 0x52,
0x4b, 0x7f, 0x7f, 0x42, 0x27, 0x68, 0x5f, 0x9f, 0x8d, 0xca, 0x4d, 0x47, 0xd5, 0x42, 0xa2, 0x43,
0xd5, 0x82, 0x53, 0x38, 0x31, 0xf6, 0x32, 0xa8, 0xae, 0x41, 0x4e, 0x15, 0x54, 0x82, 0x14, 0x7f,
0xf7, 0xa0, 0x78, 0x97, 0xe0, 0xdc, 0x45, 0x99, 0x54, 0x48, 0x8f, 0x48, 0x32, 0x4c, 0xe2, 0x7b,
0x54, 0x02, 0x5f, 0x32, 0x94, 0x8a, 0x77, 0xa1, 0xfe, 0x8a, 0x54, 0x14, 0xcf, 0x47, 0xef, 0x8d,
0x41, 0xbf, 0xb0, 0x2f, 0xf6, 0xa4, 0xd2, 0x46, 0x1f, 0xec, 0x22, 0xd4, 0xbe, 0x72, 0xcb, 0x08,
0xba, 0xf8, 0x1f, 0x89, 0xad, 0xff, 0x26, 0xbe, 0xed, 0x6d, 0xbf, 0xdd, 0xda, 0x76, 0xe7, 0xb2,
0xcf, 0x9d, 0xcb, 0xbe, 0x76, 0x2e, 0x7b, 0xff, 0x71, 0x6b, 0x41, 0x53, 0x3f, 0x84, 0x9b, 0xdf,
0x00, 0x00, 0x00, 0xff, 0xff, 0x24, 0x78, 0x39, 0x52, 0x40, 0x02, 0x00, 0x00,
// 367 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0x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 0xfa, 0xba, 0xc6, 0x8c, 0xf1, 0x90, 0x8e, 0xe0, 0x40,
0x78, 0x0b, 0x35, 0xf3, 0x8a, 0x08, 0xdd, 0xa0, 0x71, 0x79, 0xd2, 0x2f, 0x93, 0xf6, 0xf7, 0x81,
0x58, 0x53, 0xec, 0x03, 0x8e, 0xe0, 0x30, 0x5b, 0x2f, 0x1b, 0x55, 0xb5, 0x91, 0xbd, 0x6f, 0x54,
0x32, 0xc9, 0xbf, 0xee, 0x4e, 0x71, 0xcf, 0xc1, 0xbe, 0x09, 0x13, 0xa9, 0x50, 0xdc, 0xa3, 0x90,
0x01, 0x8f, 0x6e, 0x51, 0x31, 0x7c, 0x4a, 0x50, 0x2a, 0xda, 0x82, 0xea, 0x33, 0x8a, 0x1c, 0x3c,
0x1d, 0xdd, 0x57, 0x02, 0x9d, 0x7c, 0x7d, 0x5a, 0x38, 0x95, 0x2e, 0x3a, 0x60, 0xe5, 0xa5, 0x0a,
0x64, 0x33, 0x13, 0x34, 0xf8, 0x2f, 0x8d, 0x8d, 0x3f, 0x37, 0x1e, 0xc1, 0xd1, 0x90, 0xbf, 0x44,
0x4b, 0xe1, 0xcd, 0x71, 0x1c, 0x2d, 0x78, 0x29, 0xde, 0x86, 0x7f, 0x18, 0x79, 0x7e, 0x88, 0x73,
0x1d, 0x6e, 0xb2, 0xed, 0xe3, 0x16, 0xc5, 0x28, 0x50, 0xae, 0xdb, 0xeb, 0x2f, 0xa7, 0xb2, 0xde,
0x38, 0xe4, 0x63, 0xe3, 0x90, 0xcf, 0x8d, 0x43, 0xde, 0xbe, 0x9d, 0x8a, 0x5f, 0xd7, 0xff, 0xd3,
0xd5, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x93, 0x7d, 0x0b, 0x87, 0x02, 0x00, 0x00,
}

View File

@ -36,3 +36,8 @@ message ClusterMemberAttrSetRequest {
uint64 member_ID = 1;
Attributes member_attributes = 2;
}
message DowngradeInfoSetRequest {
bool enabled = 1;
string ver = 2;
}

View File

@ -73,6 +73,8 @@
AlarmRequest
AlarmMember
AlarmResponse
DowngradeRequest
DowngradeResponse
StatusRequest
StatusResponse
AuthEnableRequest

View File

@ -453,6 +453,19 @@ func request_Maintenance_MoveLeader_0(ctx context.Context, marshaler runtime.Mar
}
func request_Maintenance_Downgrade_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.MaintenanceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq etcdserverpb.DowngradeRequest
var metadata runtime.ServerMetadata
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.Downgrade(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func request_Auth_AuthEnable_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq etcdserverpb.AuthEnableRequest
var metadata runtime.ServerMetadata
@ -1722,6 +1735,35 @@ func RegisterMaintenanceHandlerClient(ctx context.Context, mux *runtime.ServeMux
})
mux.Handle("POST", pattern_Maintenance_Downgrade_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
if cn, ok := w.(http.CloseNotifier); ok {
go func(done <-chan struct{}, closed <-chan bool) {
select {
case <-done:
case <-closed:
cancel()
}
}(ctx.Done(), cn.CloseNotify())
}
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Maintenance_Downgrade_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Maintenance_Downgrade_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@ -1739,6 +1781,8 @@ var (
pattern_Maintenance_Snapshot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "maintenance", "snapshot"}, ""))
pattern_Maintenance_MoveLeader_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "maintenance", "transfer-leadership"}, ""))
pattern_Maintenance_Downgrade_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "maintenance", "downgrade"}, ""))
)
var (
@ -1755,6 +1799,8 @@ var (
forward_Maintenance_Snapshot_0 = runtime.ForwardResponseStream
forward_Maintenance_MoveLeader_0 = runtime.ForwardResponseMessage
forward_Maintenance_Downgrade_0 = runtime.ForwardResponseMessage
)
// RegisterAuthHandlerFromEndpoint is same as RegisterAuthHandler but

View File

@ -69,6 +69,7 @@ type InternalRaftRequest struct {
AuthRoleRevokePermission *AuthRoleRevokePermissionRequest `protobuf:"bytes,1204,opt,name=auth_role_revoke_permission,json=authRoleRevokePermission" json:"auth_role_revoke_permission,omitempty"`
ClusterVersionSet *membershippb.ClusterVersionSetRequest `protobuf:"bytes,1300,opt,name=cluster_version_set,json=clusterVersionSet" json:"cluster_version_set,omitempty"`
ClusterMemberAttrSet *membershippb.ClusterMemberAttrSetRequest `protobuf:"bytes,1301,opt,name=cluster_member_attr_set,json=clusterMemberAttrSet" json:"cluster_member_attr_set,omitempty"`
DowngradeInfoSet *membershippb.DowngradeInfoSetRequest `protobuf:"bytes,1302,opt,name=downgrade_info_set,json=downgradeInfoSet" json:"downgrade_info_set,omitempty"`
}
func (m *InternalRaftRequest) Reset() { *m = InternalRaftRequest{} }
@ -501,6 +502,18 @@ func (m *InternalRaftRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n30
}
if m.DowngradeInfoSet != nil {
dAtA[i] = 0xb2
i++
dAtA[i] = 0x51
i++
i = encodeVarintRaftInternal(dAtA, i, uint64(m.DowngradeInfoSet.Size()))
n31, err := m.DowngradeInfoSet.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n31
}
return i, nil
}
@ -709,6 +722,10 @@ func (m *InternalRaftRequest) Size() (n int) {
l = m.ClusterMemberAttrSet.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
if m.DowngradeInfoSet != nil {
l = m.DowngradeInfoSet.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
return n
}
@ -1904,6 +1921,39 @@ func (m *InternalRaftRequest) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 1302:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DowngradeInfoSet", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.DowngradeInfoSet == nil {
m.DowngradeInfoSet = &membershippb.DowngradeInfoSetRequest{}
}
if err := m.DowngradeInfoSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRaftInternal(dAtA[iNdEx:])
@ -2220,67 +2270,69 @@ var (
func init() { proto.RegisterFile("raft_internal.proto", fileDescriptorRaftInternal) }
var fileDescriptorRaftInternal = []byte{
// 978 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x96, 0x49, 0x73, 0x1b, 0x45,
0x14, 0xc7, 0x23, 0xc7, 0x71, 0xac, 0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e, 0x9f,
0x77, 0x1a, 0x4f, 0xce, 0x3b, 0x8d, 0x3f, 0xcf, 0x3b, 0x8d, 0xaf, 0xff, 0xee, 0x5c, 0x1a, 0x2c,
0xa9, 0x2b, 0xdc, 0x9d, 0xa7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x82, 0x70, 0x91, 0x6b, 0x58, 0x0a,
// 1010 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x96, 0x5b, 0x73, 0xdb, 0x44,
0x14, 0xc7, 0x6b, 0x37, 0x4d, 0xe3, 0x75, 0x92, 0xa6, 0x9b, 0x94, 0x2e, 0xce, 0x8c, 0x49, 0x53,
0x0a, 0xe5, 0x96, 0x30, 0xe9, 0x2b, 0x33, 0x60, 0xec, 0x4c, 0x9a, 0x99, 0x52, 0x32, 0x6a, 0xb8,
0xcc, 0xf0, 0x20, 0xd6, 0xd2, 0x89, 0x2d, 0x22, 0x4b, 0x62, 0x77, 0xed, 0x86, 0xef, 0x51, 0x18,
0x3e, 0x06, 0xb7, 0x0f, 0xd1, 0x07, 0x2e, 0x05, 0xbe, 0x00, 0x84, 0x17, 0xde, 0x81, 0x77, 0x66,
0x2f, 0x5a, 0x49, 0xf6, 0x3a, 0x6f, 0xf2, 0xff, 0xfc, 0xcf, 0xef, 0xec, 0x6a, 0xcf, 0x91, 0x17,
0xad, 0x33, 0x7a, 0x22, 0xfc, 0x28, 0x11, 0xc0, 0x12, 0x1a, 0xef, 0x64, 0x2c, 0x15, 0x29, 0x5e,
0x06, 0x11, 0x84, 0x1c, 0xd8, 0x04, 0x58, 0xd6, 0x6f, 0x6d, 0x0c, 0xd2, 0x41, 0xaa, 0x02, 0xbb,
0xf2, 0x49, 0x7b, 0x5a, 0x6b, 0x85, 0xc7, 0x28, 0x0d, 0x96, 0x05, 0xe6, 0xf1, 0x2d, 0x19, 0xdc,
0x2d, 0x1c, 0xbb, 0x34, 0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x68, 0x08, 0x7e, 0x94, 0x9c, 0xa4, 0x8a, 0xfe, 0x95, 0xa6, 0xdf, 0xa9, 0xd2,
0x7b, 0xb9, 0xf1, 0x30, 0x39, 0x49, 0x4b, 0xe4, 0xb5, 0x70, 0x2a, 0xb0, 0x7d, 0x0d, 0xad, 0xec,
0x8f, 0x32, 0xf1, 0x85, 0x07, 0x3c, 0x4b, 0x13, 0x0e, 0xdb, 0x19, 0xda, 0xbc, 0xe0, 0xeb, 0x8e,
0x31, 0x5a, 0x50, 0x77, 0xb0, 0x9a, 0xba, 0x83, 0xa9, 0x67, 0x79, 0x37, 0xb3, 0x5f, 0x2c, 0x73,
0x37, 0xcb, 0x7f, 0xe3, 0x5b, 0x68, 0x99, 0x47, 0xa3, 0x2c, 0x06, 0x5f, 0xa4, 0xa7, 0xa0, 0xaf,
0x66, 0x0d, 0xaf, 0xa9, 0xb5, 0x63, 0x29, 0xbd, 0xbb, 0xf1, 0xf4, 0xcf, 0xf6, 0xa5, 0xa7, 0xe7,
0xed, 0xda, 0xb3, 0xf3, 0x76, 0xed, 0x8f, 0xf3, 0x76, 0xed, 0xeb, 0xbf, 0xda, 0x97, 0xfa, 0x8b,
0xea, 0x62, 0x78, 0xef, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x24, 0x2a, 0xcc, 0xae, 0x0a,
0x00, 0x00,
}

View File

@ -63,6 +63,7 @@ message InternalRaftRequest {
membershippb.ClusterVersionSetRequest cluster_version_set = 1300;
membershippb.ClusterMemberAttrSetRequest cluster_member_attr_set = 1301;
membershippb.DowngradeInfoSetRequest downgrade_info_set = 1302;
}
message EmptyResponse {

File diff suppressed because it is too large Load Diff

View File

@ -237,6 +237,14 @@ service Maintenance {
body: "*"
};
}
// Downgrade requests downgrade, cancel downgrade on the cluster version.
rpc Downgrade(DowngradeRequest) returns (DowngradeResponse) {
option (google.api.http) = {
post: "/v3/maintenance/downgrade"
body: "*"
};
}
}
service Auth {
@ -977,6 +985,27 @@ message AlarmResponse {
repeated AlarmMember alarms = 2;
}
message DowngradeRequest {
enum DowngradeAction {
VALIDATE = 0;
ENABLE = 1;
CANCEL = 2;
}
// action is the kind of downgrade request to issue. The action may
// VALIDATE the target version, DOWNGRADE the cluster version,
// or CANCEL the current downgrading job.
DowngradeAction action = 1;
// version is the target version to downgrade.
string version = 2;
}
message DowngradeResponse {
ResponseHeader header = 1;
// version is the current cluster version.
string version = 2;
}
message StatusRequest {
}

View File

@ -52,6 +52,10 @@ func (s *mts2mtc) MoveLeader(ctx context.Context, r *pb.MoveLeaderRequest, opts
return s.mts.MoveLeader(ctx, r)
}
func (s *mts2mtc) Downgrade(ctx context.Context, r *pb.DowngradeRequest, opts ...grpc.CallOption) (*pb.DowngradeResponse, error) {
return s.mts.Downgrade(ctx, r)
}
func (s *mts2mtc) Snapshot(ctx context.Context, in *pb.SnapshotRequest, opts ...grpc.CallOption) (pb.Maintenance_SnapshotClient, error) {
cs := newPipeStream(ctx, func(ss chanServerStream) error {
return s.mts.Snapshot(in, &ss2scServerStream{ss})

View File

@ -88,3 +88,8 @@ func (mp *maintenanceProxy) MoveLeader(ctx context.Context, r *pb.MoveLeaderRequ
conn := mp.client.ActiveConnection()
return pb.NewMaintenanceClient(conn).MoveLeader(ctx, r)
}
func (mp *maintenanceProxy) Downgrade(ctx context.Context, r *pb.DowngradeRequest) (*pb.DowngradeResponse, error) {
conn := mp.client.ActiveConnection()
return pb.NewMaintenanceClient(conn).Downgrade(ctx, r)
}