agent: make log uploading optional

This commit is contained in:
Gyu-Ho Lee 2017-02-03 13:55:52 -08:00
parent 1689945cd9
commit c3db7bad97
No known key found for this signature in database
GPG Key ID: 1DDD39C7EB70C24C
3 changed files with 298 additions and 245 deletions

View File

@ -103,30 +103,33 @@ type Request struct {
ServerIndex uint32 `protobuf:"varint,4,opt,name=serverIndex,proto3" json:"serverIndex,omitempty"`
// TestName prefixes all logs to be generated in agent.
TestName string `protobuf:"bytes,5,opt,name=testName,proto3" json:"testName,omitempty"`
// GoogleCloudProjectName is the project name to use
// to upload logs.
GoogleCloudProjectName string `protobuf:"bytes,6,opt,name=googleCloudProjectName,proto3" json:"googleCloudProjectName,omitempty"`
// GoogleCloudStorageKey is the key to be used to upload
// data and logs to Google Cloud Storage and others.
GoogleCloudStorageKey string `protobuf:"bytes,7,opt,name=googleCloudStorageKey,proto3" json:"googleCloudStorageKey,omitempty"`
// GoogleCloudStorageBucketName is the bucket name to store all data and logs.
GoogleCloudStorageBucketName string `protobuf:"bytes,8,opt,name=googleCloudStorageBucketName,proto3" json:"googleCloudStorageBucketName,omitempty"`
// GoogleCloudStorageSubDirectory is the sub-directory name to store data.
GoogleCloudStorageSubDirectory string `protobuf:"bytes,9,opt,name=googleCloudStorageSubDirectory,proto3" json:"googleCloudStorageSubDirectory,omitempty"`
// ZookeeperMyID is myid that needs to be stored as a file in the remote machine.
ZookeeperMyID uint32 `protobuf:"varint,10,opt,name=zookeeperMyID,proto3" json:"zookeeperMyID,omitempty"`
ZookeeperMyID uint32 `protobuf:"varint,6,opt,name=zookeeperMyID,proto3" json:"zookeeperMyID,omitempty"`
// EtcdSnapCount is 100,000 by default.
EtcdSnapCount int64 `protobuf:"varint,11,opt,name=etcdSnapCount,proto3" json:"etcdSnapCount,omitempty"`
EtcdSnapCount int64 `protobuf:"varint,7,opt,name=etcdSnapCount,proto3" json:"etcdSnapCount,omitempty"`
// EtcdQuotaSizeBytes is the backend size limit in bytes.
// 0 defaults to low space quota (2 GB).
EtcdQuotaSizeBytes int64 `protobuf:"varint,12,opt,name=etcdQuotaSizeBytes,proto3" json:"etcdQuotaSizeBytes,omitempty"`
EtcdQuotaSizeBytes int64 `protobuf:"varint,8,opt,name=etcdQuotaSizeBytes,proto3" json:"etcdQuotaSizeBytes,omitempty"`
// ZookeeperSnapCount is 100,000 by default.
ZookeeperSnapCount int64 `protobuf:"varint,13,opt,name=zookeeperSnapCount,proto3" json:"zookeeperSnapCount,omitempty"`
ZookeeperSnapCount int64 `protobuf:"varint,9,opt,name=zookeeperSnapCount,proto3" json:"zookeeperSnapCount,omitempty"`
// ZookeeperMaxClientCnxns limits the number of concurrent connections
// (at the socket level) that a single client, identified by IP address.
ZookeeperMaxClientCnxns int64 `protobuf:"varint,14,opt,name=zookeeperMaxClientCnxns,proto3" json:"zookeeperMaxClientCnxns,omitempty"`
ZookeeperMaxClientCnxns int64 `protobuf:"varint,10,opt,name=zookeeperMaxClientCnxns,proto3" json:"zookeeperMaxClientCnxns,omitempty"`
// ClientNum is current number of clients.
ClientNum int64 `protobuf:"varint,15,opt,name=clientNum,proto3" json:"clientNum,omitempty"`
ClientNum int64 `protobuf:"varint,11,opt,name=clientNum,proto3" json:"clientNum,omitempty"`
// UploadLogs is true if automatic log-uploading is needed.
// Currently only support Google Cloud Storage.
UploadLogs bool `protobuf:"varint,100,opt,name=uploadLogs,proto3" json:"uploadLogs,omitempty"`
// GoogleCloudProjectName is the project name to use
// to upload logs.
GoogleCloudProjectName string `protobuf:"bytes,101,opt,name=googleCloudProjectName,proto3" json:"googleCloudProjectName,omitempty"`
// GoogleCloudStorageKey is the key to be used to upload
// data and logs to Google Cloud Storage and others.
GoogleCloudStorageKey string `protobuf:"bytes,102,opt,name=googleCloudStorageKey,proto3" json:"googleCloudStorageKey,omitempty"`
// GoogleCloudStorageBucketName is the bucket name to store all data and logs.
GoogleCloudStorageBucketName string `protobuf:"bytes,103,opt,name=googleCloudStorageBucketName,proto3" json:"googleCloudStorageBucketName,omitempty"`
// GoogleCloudStorageSubDirectory is the sub-directory name to store data.
GoogleCloudStorageSubDirectory string `protobuf:"bytes,104,opt,name=googleCloudStorageSubDirectory,proto3" json:"googleCloudStorageSubDirectory,omitempty"`
}
func (m *Request) Reset() { *m = Request{} }
@ -267,60 +270,80 @@ func (m *Request) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintMessage(dAtA, i, uint64(len(m.TestName)))
i += copy(dAtA[i:], m.TestName)
}
if m.ZookeeperMyID != 0 {
dAtA[i] = 0x30
i++
i = encodeVarintMessage(dAtA, i, uint64(m.ZookeeperMyID))
}
if m.EtcdSnapCount != 0 {
dAtA[i] = 0x38
i++
i = encodeVarintMessage(dAtA, i, uint64(m.EtcdSnapCount))
}
if m.EtcdQuotaSizeBytes != 0 {
dAtA[i] = 0x40
i++
i = encodeVarintMessage(dAtA, i, uint64(m.EtcdQuotaSizeBytes))
}
if m.ZookeeperSnapCount != 0 {
dAtA[i] = 0x48
i++
i = encodeVarintMessage(dAtA, i, uint64(m.ZookeeperSnapCount))
}
if m.ZookeeperMaxClientCnxns != 0 {
dAtA[i] = 0x50
i++
i = encodeVarintMessage(dAtA, i, uint64(m.ZookeeperMaxClientCnxns))
}
if m.ClientNum != 0 {
dAtA[i] = 0x58
i++
i = encodeVarintMessage(dAtA, i, uint64(m.ClientNum))
}
if m.UploadLogs {
dAtA[i] = 0xa0
i++
dAtA[i] = 0x6
i++
if m.UploadLogs {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if len(m.GoogleCloudProjectName) > 0 {
dAtA[i] = 0x32
dAtA[i] = 0xaa
i++
dAtA[i] = 0x6
i++
i = encodeVarintMessage(dAtA, i, uint64(len(m.GoogleCloudProjectName)))
i += copy(dAtA[i:], m.GoogleCloudProjectName)
}
if len(m.GoogleCloudStorageKey) > 0 {
dAtA[i] = 0x3a
dAtA[i] = 0xb2
i++
dAtA[i] = 0x6
i++
i = encodeVarintMessage(dAtA, i, uint64(len(m.GoogleCloudStorageKey)))
i += copy(dAtA[i:], m.GoogleCloudStorageKey)
}
if len(m.GoogleCloudStorageBucketName) > 0 {
dAtA[i] = 0x42
dAtA[i] = 0xba
i++
dAtA[i] = 0x6
i++
i = encodeVarintMessage(dAtA, i, uint64(len(m.GoogleCloudStorageBucketName)))
i += copy(dAtA[i:], m.GoogleCloudStorageBucketName)
}
if len(m.GoogleCloudStorageSubDirectory) > 0 {
dAtA[i] = 0x4a
dAtA[i] = 0xc2
i++
dAtA[i] = 0x6
i++
i = encodeVarintMessage(dAtA, i, uint64(len(m.GoogleCloudStorageSubDirectory)))
i += copy(dAtA[i:], m.GoogleCloudStorageSubDirectory)
}
if m.ZookeeperMyID != 0 {
dAtA[i] = 0x50
i++
i = encodeVarintMessage(dAtA, i, uint64(m.ZookeeperMyID))
}
if m.EtcdSnapCount != 0 {
dAtA[i] = 0x58
i++
i = encodeVarintMessage(dAtA, i, uint64(m.EtcdSnapCount))
}
if m.EtcdQuotaSizeBytes != 0 {
dAtA[i] = 0x60
i++
i = encodeVarintMessage(dAtA, i, uint64(m.EtcdQuotaSizeBytes))
}
if m.ZookeeperSnapCount != 0 {
dAtA[i] = 0x68
i++
i = encodeVarintMessage(dAtA, i, uint64(m.ZookeeperSnapCount))
}
if m.ZookeeperMaxClientCnxns != 0 {
dAtA[i] = 0x70
i++
i = encodeVarintMessage(dAtA, i, uint64(m.ZookeeperMaxClientCnxns))
}
if m.ClientNum != 0 {
dAtA[i] = 0x78
i++
i = encodeVarintMessage(dAtA, i, uint64(m.ClientNum))
}
return i, nil
}
@ -404,22 +427,6 @@ func (m *Request) Size() (n int) {
if l > 0 {
n += 1 + l + sovMessage(uint64(l))
}
l = len(m.GoogleCloudProjectName)
if l > 0 {
n += 1 + l + sovMessage(uint64(l))
}
l = len(m.GoogleCloudStorageKey)
if l > 0 {
n += 1 + l + sovMessage(uint64(l))
}
l = len(m.GoogleCloudStorageBucketName)
if l > 0 {
n += 1 + l + sovMessage(uint64(l))
}
l = len(m.GoogleCloudStorageSubDirectory)
if l > 0 {
n += 1 + l + sovMessage(uint64(l))
}
if m.ZookeeperMyID != 0 {
n += 1 + sovMessage(uint64(m.ZookeeperMyID))
}
@ -438,6 +445,25 @@ func (m *Request) Size() (n int) {
if m.ClientNum != 0 {
n += 1 + sovMessage(uint64(m.ClientNum))
}
if m.UploadLogs {
n += 3
}
l = len(m.GoogleCloudProjectName)
if l > 0 {
n += 2 + l + sovMessage(uint64(l))
}
l = len(m.GoogleCloudStorageKey)
if l > 0 {
n += 2 + l + sovMessage(uint64(l))
}
l = len(m.GoogleCloudStorageBucketName)
if l > 0 {
n += 2 + l + sovMessage(uint64(l))
}
l = len(m.GoogleCloudStorageSubDirectory)
if l > 0 {
n += 2 + l + sovMessage(uint64(l))
}
return n
}
@ -611,6 +637,140 @@ func (m *Request) Unmarshal(dAtA []byte) error {
m.TestName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ZookeeperMyID", wireType)
}
m.ZookeeperMyID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ZookeeperMyID |= (uint32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field EtcdSnapCount", wireType)
}
m.EtcdSnapCount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.EtcdSnapCount |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 8:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field EtcdQuotaSizeBytes", wireType)
}
m.EtcdQuotaSizeBytes = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.EtcdQuotaSizeBytes |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 9:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ZookeeperSnapCount", wireType)
}
m.ZookeeperSnapCount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ZookeeperSnapCount |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 10:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ZookeeperMaxClientCnxns", wireType)
}
m.ZookeeperMaxClientCnxns = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ZookeeperMaxClientCnxns |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 11:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ClientNum", wireType)
}
m.ClientNum = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ClientNum |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 100:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field UploadLogs", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.UploadLogs = bool(v != 0)
case 101:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GoogleCloudProjectName", wireType)
}
@ -639,7 +799,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
}
m.GoogleCloudProjectName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
case 102:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GoogleCloudStorageKey", wireType)
}
@ -668,7 +828,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
}
m.GoogleCloudStorageKey = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 8:
case 103:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GoogleCloudStorageBucketName", wireType)
}
@ -697,7 +857,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
}
m.GoogleCloudStorageBucketName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 9:
case 104:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GoogleCloudStorageSubDirectory", wireType)
}
@ -726,120 +886,6 @@ func (m *Request) Unmarshal(dAtA []byte) error {
}
m.GoogleCloudStorageSubDirectory = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 10:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ZookeeperMyID", wireType)
}
m.ZookeeperMyID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ZookeeperMyID |= (uint32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 11:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field EtcdSnapCount", wireType)
}
m.EtcdSnapCount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.EtcdSnapCount |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 12:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field EtcdQuotaSizeBytes", wireType)
}
m.EtcdQuotaSizeBytes = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.EtcdQuotaSizeBytes |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 13:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ZookeeperSnapCount", wireType)
}
m.ZookeeperSnapCount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ZookeeperSnapCount |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 14:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ZookeeperMaxClientCnxns", wireType)
}
m.ZookeeperMaxClientCnxns = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ZookeeperMaxClientCnxns |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 15:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ClientNum", wireType)
}
m.ClientNum = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ClientNum |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipMessage(dAtA[iNdEx:])
@ -1058,42 +1104,43 @@ var (
func init() { proto.RegisterFile("agent/agentpb/message.proto", fileDescriptorMessage) }
var fileDescriptorMessage = []byte{
// 579 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0xcf, 0x6e, 0xd3, 0x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xff, 0xff, 0x31, 0x68, 0xb7, 0xb3, 0x5a,
0x04, 0x00, 0x00,
// 596 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xcd, 0x6e, 0xd3, 0x4e,
0x10, 0x8f, 0x9b, 0xb6, 0xb1, 0xa7, 0xff, 0xfe, 0x65, 0x56, 0x7c, 0x2c, 0xa1, 0xb2, 0xa2, 0x88,
0x43, 0x2e, 0x24, 0xa2, 0x05, 0xd4, 0x63, 0x95, 0x54, 0x88, 0xaa, 0x50, 0x8a, 0xcd, 0x89, 0xdb,
0xda, 0x99, 0xba, 0xa6, 0x89, 0xc7, 0xec, 0xae, 0xab, 0x26, 0x27, 0x1e, 0x83, 0x47, 0xea, 0x91,
0x47, 0x80, 0xf2, 0x22, 0xc8, 0xeb, 0xd4, 0x49, 0x49, 0x0b, 0x97, 0x68, 0x7e, 0x5f, 0x33, 0xd1,
0xee, 0x8e, 0xe1, 0x89, 0x88, 0x31, 0xd5, 0x3d, 0xf3, 0x9b, 0x85, 0xbd, 0x31, 0x2a, 0x25, 0x62,
0xec, 0x66, 0x92, 0x34, 0xb1, 0xc6, 0x8c, 0x6e, 0x3e, 0x8b, 0x13, 0x7d, 0x9a, 0x87, 0xdd, 0x88,
0xc6, 0xbd, 0x98, 0x62, 0xea, 0x19, 0x3d, 0xcc, 0x4f, 0x0c, 0x32, 0xc0, 0x54, 0x65, 0xae, 0xfd,
0xb5, 0x01, 0x0d, 0x1f, 0xbf, 0xe4, 0xa8, 0x34, 0xdb, 0x05, 0x87, 0x32, 0x94, 0x42, 0x27, 0x94,
0x72, 0xab, 0x65, 0x75, 0xfe, 0xdf, 0x6e, 0x76, 0x67, 0x7d, 0xbb, 0x33, 0x53, 0xf7, 0xfd, 0xb5,
0xc3, 0x9f, 0x9b, 0xd9, 0x4b, 0xb0, 0x87, 0x42, 0x8b, 0x50, 0x28, 0xe4, 0x2b, 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a0, 0x64, 0xee, 0x9f, 0x7b, 0xd8, 0xbc, 0xb7, 0xc0, 0x94, 0x53, 0xdb, 0xb5, 0xfe, 0xfd, 0xcb,
0x9f, 0x5e, 0xed, 0xf2, 0xca, 0xb3, 0xbe, 0x5f, 0x79, 0xd6, 0x8f, 0x2b, 0xcf, 0xfa, 0xf6, 0xcb,
0xab, 0x85, 0xeb, 0xe6, 0x1b, 0xb1, 0xf3, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x25, 0x00, 0x4e,
0x7a, 0x04, 0x00, 0x00,
}

View File

@ -38,43 +38,47 @@ message Request {
// TestName prefixes all logs to be generated in agent.
string testName = 5;
// GoogleCloudProjectName is the project name to use
// to upload logs.
string googleCloudProjectName = 6;
// GoogleCloudStorageKey is the key to be used to upload
// data and logs to Google Cloud Storage and others.
string googleCloudStorageKey = 7;
// GoogleCloudStorageBucketName is the bucket name to store all data and logs.
string googleCloudStorageBucketName = 8;
// GoogleCloudStorageSubDirectory is the sub-directory name to store data.
string googleCloudStorageSubDirectory = 9;
// ZookeeperMyID is myid that needs to be stored as a file in the remote machine.
uint32 zookeeperMyID = 10;
uint32 zookeeperMyID = 6;
// EtcdSnapCount is 100,000 by default.
int64 etcdSnapCount = 11;
int64 etcdSnapCount = 7;
// EtcdQuotaSizeBytes is the backend size limit in bytes.
// 0 defaults to low space quota (2 GB).
int64 etcdQuotaSizeBytes = 12;
int64 etcdQuotaSizeBytes = 8;
// ZookeeperSnapCount is 100,000 by default.
int64 zookeeperSnapCount = 13;
int64 zookeeperSnapCount = 9;
// ZookeeperMaxClientCnxns limits the number of concurrent connections
// (at the socket level) that a single client, identified by IP address.
int64 zookeeperMaxClientCnxns = 14;
int64 zookeeperMaxClientCnxns = 10;
// ClientNum is current number of clients.
int64 clientNum = 15;
int64 clientNum = 11;
// UploadLogs is true if automatic log-uploading is needed.
// Currently only support Google Cloud Storage.
bool uploadLogs = 100;
// GoogleCloudProjectName is the project name to use
// to upload logs.
string googleCloudProjectName = 101;
// GoogleCloudStorageKey is the key to be used to upload
// data and logs to Google Cloud Storage and others.
string googleCloudStorageKey = 102;
// GoogleCloudStorageBucketName is the bucket name to store all data and logs.
string googleCloudStorageBucketName = 103;
// GoogleCloudStorageSubDirectory is the sub-directory name to store data.
string googleCloudStorageSubDirectory = 104;
}
message Response {
bool success = 1;
bool success = 1;
// Datasize is the data size of the database on disk.
// It measures after database is requested to stop.

View File

@ -239,9 +239,11 @@ func (t *transporterServer) Transfer(ctx context.Context, r *agentpb.Request) (*
t.uploadSig <- struct{}{}
<-t.csvReady
if err := uploadLog(&globalFlags, t); err != nil {
plog.Warningf("uploadLog error %v", err)
return nil, err
if t.req.UploadLogs {
if err := uploadLog(&globalFlags, t); err != nil {
plog.Warningf("uploadLog error %v", err)
return nil, err
}
}
dbs, err := measureDatabasSize(globalFlags, r.Database)