From 764b20d09cc970635abd2a9d5350a47e86e03fc9 Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Thu, 22 Aug 2024 14:10:24 +0530 Subject: [PATCH 01/12] fix critical services issue on pg follower restart. Directly send data to pg leader from pg-gateway Signed-off-by: Vivek Shankar --- components/automate-pg-gateway/habitat/config/haproxy.conf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/automate-pg-gateway/habitat/config/haproxy.conf b/components/automate-pg-gateway/habitat/config/haproxy.conf index 7958b20cf8f..cb71bb6ad9e 100644 --- a/components/automate-pg-gateway/habitat/config/haproxy.conf +++ b/components/automate-pg-gateway/habitat/config/haproxy.conf @@ -47,17 +47,18 @@ frontend postgresql backend automate_postgresql {{~#if cfg.service.external_postgresql.enable }} balance roundrobin - option tcp-check + option httpchk GET / + option redispatch default-server inter 3s fall 3 rise 2 on-marked-down shutdown-sessions {{~#each cfg.service.parsed_nodes as |node|}} {{~#if node.is_domain}} {{~#if ../cfg.resolvers.nameservers }} server-template {{node.address}} 8 {{node.address}}:{{node.port}} check resolvers pgdns init-addr none resolve-prefer ipv4 {{else}} - server {{node.address}} {{node.address}}:{{node.port}} check + server {{node.address}} {{node.address}}:5432 check maxconn 350 check port 6432 {{~/if}} {{else}} - server {{node.address}} {{node.address}}:{{node.port}} check + server {{node.address}} {{node.address}}:5432 check maxconn 350 check port 6432 {{~/if}} {{~/each}} {{else~}} From 5f9a159df421f29f6a20156d0af2b77a6d150c9c Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Fri, 6 Sep 2024 18:36:01 +0530 Subject: [PATCH 02/12] added health check retry Signed-off-by: Vivek Shankar --- .../habitat/hooks/health-check | 20 +++++++++++------ .../habitat/hooks/health-check | 22 +++++++++++++------ .../habitat/config/haproxy.conf | 4 ++-- 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/components/automate-cs-nginx/habitat/hooks/health-check b/components/automate-cs-nginx/habitat/hooks/health-check index fab87dbc21a..756e74adbb9 100644 --- a/components/automate-cs-nginx/habitat/hooks/health-check +++ b/components/automate-cs-nginx/habitat/hooks/health-check @@ -9,10 +9,16 @@ curlOpts="$curlOpts --key {{pkg.svc_config_path}}/service.key" # This gets routed to erchef which does a "deep" health check # shellcheck disable=SC2086 -output=$({{pkgPathFor "core/curl"}}/bin/curl $curlOpts "https://automate-cs-nginx:{{cfg.service.port}}/_status") -res=$? -if [ "0" != "$res" ]; then - echo "health check curl command returned exit code ${res}:" - echo "$output" - exit 2 -fi + +for i in $(seq 1 5); +do + output=$({{pkgPathFor "core/curl"}}/bin/curl $curlOpts "https://automate-cs-nginx:{{cfg.service.port}}/_status") + res=$? + if [ "0" = "$res" ]; then + exit 0 + fi +done + +echo "health check curl command returned exit code ${res}:" +echo "$output" +exit $res diff --git a/components/automate-cs-oc-erchef/habitat/hooks/health-check b/components/automate-cs-oc-erchef/habitat/hooks/health-check index 5fd6e28fcff..3440578d0e3 100644 --- a/components/automate-cs-oc-erchef/habitat/hooks/health-check +++ b/components/automate-cs-oc-erchef/habitat/hooks/health-check @@ -7,10 +7,18 @@ curlOpts="$curlOpts --cacert {{pkg.svc_config_path}}/root_ca.crt" curlOpts="$curlOpts --resolve automate-cs-oc-erchef:{{cfg.network.port}}:127.0.0.1" curlOpts="$curlOpts --noproxy automate-cs-oc-erchef" # shellcheck disable=SC2086 -output=$({{pkgPathFor "core/curl"}}/bin/curl $curlOpts "https://automate-cs-oc-erchef:{{cfg.network.port}}/_status") -res=$? -if [ "0" != "$res" ]; then - echo "health check curl command returned exit code ${res}:" - echo "$output" - exit 2 -fi + +for i in $(seq 1 5); +do + output=$({{pkgPathFor "core/curl"}}/bin/curl $curlOpts "https://automate-cs-oc-erchef:{{cfg.network.port}}/_status") + res=$? + if [ "0" = "$res" ]; then + exit 0 + fi +done + +echo "health check curl command returned exit code ${res}:" +echo "$output" +exit $res + +# chef automate config show should hae port 5432 \ No newline at end of file diff --git a/components/automate-pg-gateway/habitat/config/haproxy.conf b/components/automate-pg-gateway/habitat/config/haproxy.conf index cb71bb6ad9e..dfc2110d89f 100644 --- a/components/automate-pg-gateway/habitat/config/haproxy.conf +++ b/components/automate-pg-gateway/habitat/config/haproxy.conf @@ -55,10 +55,10 @@ backend automate_postgresql {{~#if ../cfg.resolvers.nameservers }} server-template {{node.address}} 8 {{node.address}}:{{node.port}} check resolvers pgdns init-addr none resolve-prefer ipv4 {{else}} - server {{node.address}} {{node.address}}:5432 check maxconn 350 check port 6432 + server {{node.address}} {{node.address}}:5432 maxconn 350 check port 6432 {{~/if}} {{else}} - server {{node.address}} {{node.address}}:5432 check maxconn 350 check port 6432 + server {{node.address}} {{node.address}}:5432 maxconn 350 check port 6432 {{~/if}} {{~/each}} {{else~}} From 4e1a1d928d350600fde5b5aa9ed9741a12088702 Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Tue, 10 Sep 2024 19:33:50 +0530 Subject: [PATCH 03/12] updated working patch health check config for provided services Signed-off-by: Vivek Shankar --- api/config/deployment/config_request.go | 3 + api/config/deployment/config_request.pb.go | 282 ++++++++++++------ api/config/deployment/config_request.proto | 7 + components/automate-cs-nginx/habitat/plan.sh | 5 + .../pkg/deployment/deployment.go | 12 + .../pkg/globalConfig/config.go | 6 + .../automate-deployment/pkg/server/server.go | 1 + .../automate-deployment/pkg/target/hab_cmd.go | 6 + dev/config.toml | 3 + 9 files changed, 229 insertions(+), 96 deletions(-) create mode 100644 components/automate-deployment/pkg/globalConfig/config.go diff --git a/api/config/deployment/config_request.go b/api/config/deployment/config_request.go index 18c7c9597d4..729372678ae 100644 --- a/api/config/deployment/config_request.go +++ b/api/config/deployment/config_request.go @@ -27,6 +27,7 @@ func NewConfigRequest() *ConfigRequest { }, Svc: &ConfigRequest_V1_Service{ AdminUser: &ConfigRequest_V1_AdminUser{}, + Health: &ConfigRequest_V1_Health{}, }, }, } @@ -48,6 +49,8 @@ func DefaultConfigRequest() *ConfigRequest { c.V1.Svc.ManifestCacheExpiry = w.String("60m") c.V1.Svc.PackageCleanupMode = w.String("conservative") + c.V1.Svc.Health.HealthCheckInterval = w.Int32(30) + return c } diff --git a/api/config/deployment/config_request.pb.go b/api/config/deployment/config_request.pb.go index 6185790905a..55772f55c8b 100644 --- a/api/config/deployment/config_request.pb.go +++ b/api/config/deployment/config_request.pb.go @@ -235,6 +235,7 @@ type ConfigRequest_V1_Service struct { PackageCleanupMode *wrapperspb.StringValue `protobuf:"bytes,14,opt,name=package_cleanup_mode,json=packageCleanupMode,proto3" json:"package_cleanup_mode,omitempty" toml:"package_cleanup_mode,omitempty" mapstructure:"package_cleanup_mode,omitempty"` EnableDevMonitoring *wrapperspb.BoolValue `protobuf:"bytes,15,opt,name=enable_dev_monitoring,json=enableDevMonitoring,proto3" json:"enable_dev_monitoring,omitempty" toml:"enable_dev_monitoring,omitempty" mapstructure:"enable_dev_monitoring,omitempty"` Products []string `protobuf:"bytes,16,rep,name=products,proto3" json:"products,omitempty" toml:"products,omitempty" mapstructure:"products,omitempty"` + Health *ConfigRequest_V1_Health `protobuf:"bytes,17,opt,name=health,proto3" json:"health,omitempty" toml:"health,omitempty" mapstructure:"health,omitempty"` } func (x *ConfigRequest_V1_Service) Reset() { @@ -381,6 +382,68 @@ func (x *ConfigRequest_V1_Service) GetProducts() []string { return nil } +func (x *ConfigRequest_V1_Service) GetHealth() *ConfigRequest_V1_Health { + if x != nil { + return x.Health + } + return nil +} + +type ConfigRequest_V1_Health struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HealthCheckInterval *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=health_check_interval,json=healthCheckInterval,proto3" json:"health_check_interval,omitempty" toml:"health_check_interval,omitempty" mapstructure:"health_check_interval,omitempty"` + Services []string `protobuf:"bytes,2,rep,name=services,proto3" json:"services,omitempty" toml:"services,omitempty" mapstructure:"services,omitempty"` +} + +func (x *ConfigRequest_V1_Health) Reset() { + *x = ConfigRequest_V1_Health{} + if protoimpl.UnsafeEnabled { + mi := &file_config_deployment_config_request_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConfigRequest_V1_Health) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfigRequest_V1_Health) ProtoMessage() {} + +func (x *ConfigRequest_V1_Health) ProtoReflect() protoreflect.Message { + mi := &file_config_deployment_config_request_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfigRequest_V1_Health.ProtoReflect.Descriptor instead. +func (*ConfigRequest_V1_Health) Descriptor() ([]byte, []int) { + return file_config_deployment_config_request_proto_rawDescGZIP(), []int{0, 0, 2} +} + +func (x *ConfigRequest_V1_Health) GetHealthCheckInterval() *wrapperspb.Int32Value { + if x != nil { + return x.HealthCheckInterval + } + return nil +} + +func (x *ConfigRequest_V1_Health) GetServices() []string { + if x != nil { + return x.Services + } + return nil +} + type ConfigRequest_V1_AdminUser struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -399,7 +462,7 @@ type ConfigRequest_V1_AdminUser struct { func (x *ConfigRequest_V1_AdminUser) Reset() { *x = ConfigRequest_V1_AdminUser{} if protoimpl.UnsafeEnabled { - mi := &file_config_deployment_config_request_proto_msgTypes[4] + mi := &file_config_deployment_config_request_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -412,7 +475,7 @@ func (x *ConfigRequest_V1_AdminUser) String() string { func (*ConfigRequest_V1_AdminUser) ProtoMessage() {} func (x *ConfigRequest_V1_AdminUser) ProtoReflect() protoreflect.Message { - mi := &file_config_deployment_config_request_proto_msgTypes[4] + mi := &file_config_deployment_config_request_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -425,7 +488,7 @@ func (x *ConfigRequest_V1_AdminUser) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigRequest_V1_AdminUser.ProtoReflect.Descriptor instead. func (*ConfigRequest_V1_AdminUser) Descriptor() ([]byte, []int) { - return file_config_deployment_config_request_proto_rawDescGZIP(), []int{0, 0, 2} + return file_config_deployment_config_request_proto_rawDescGZIP(), []int{0, 0, 3} } // Deprecated: Do not use. @@ -470,7 +533,7 @@ type ConfigRequest_V1_System_Service struct { func (x *ConfigRequest_V1_System_Service) Reset() { *x = ConfigRequest_V1_System_Service{} if protoimpl.UnsafeEnabled { - mi := &file_config_deployment_config_request_proto_msgTypes[5] + mi := &file_config_deployment_config_request_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -483,7 +546,7 @@ func (x *ConfigRequest_V1_System_Service) String() string { func (*ConfigRequest_V1_System_Service) ProtoMessage() {} func (x *ConfigRequest_V1_System_Service) ProtoReflect() protoreflect.Message { - mi := &file_config_deployment_config_request_proto_msgTypes[5] + mi := &file_config_deployment_config_request_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -525,7 +588,7 @@ type ConfigRequest_V1_System_Log struct { func (x *ConfigRequest_V1_System_Log) Reset() { *x = ConfigRequest_V1_System_Log{} if protoimpl.UnsafeEnabled { - mi := &file_config_deployment_config_request_proto_msgTypes[6] + mi := &file_config_deployment_config_request_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -538,7 +601,7 @@ func (x *ConfigRequest_V1_System_Log) String() string { func (*ConfigRequest_V1_System_Log) ProtoMessage() {} func (x *ConfigRequest_V1_System_Log) ProtoReflect() protoreflect.Message { - mi := &file_config_deployment_config_request_proto_msgTypes[6] + mi := &file_config_deployment_config_request_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -572,7 +635,7 @@ type ConfigRequest_V1_System_GatherLogs struct { func (x *ConfigRequest_V1_System_GatherLogs) Reset() { *x = ConfigRequest_V1_System_GatherLogs{} if protoimpl.UnsafeEnabled { - mi := &file_config_deployment_config_request_proto_msgTypes[7] + mi := &file_config_deployment_config_request_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -585,7 +648,7 @@ func (x *ConfigRequest_V1_System_GatherLogs) String() string { func (*ConfigRequest_V1_System_GatherLogs) ProtoMessage() {} func (x *ConfigRequest_V1_System_GatherLogs) ProtoReflect() protoreflect.Message { - mi := &file_config_deployment_config_request_proto_msgTypes[7] + mi := &file_config_deployment_config_request_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -620,7 +683,7 @@ type ConfigRequest_V1_System_Proxy struct { func (x *ConfigRequest_V1_System_Proxy) Reset() { *x = ConfigRequest_V1_System_Proxy{} if protoimpl.UnsafeEnabled { - mi := &file_config_deployment_config_request_proto_msgTypes[8] + mi := &file_config_deployment_config_request_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -633,7 +696,7 @@ func (x *ConfigRequest_V1_System_Proxy) String() string { func (*ConfigRequest_V1_System_Proxy) ProtoMessage() {} func (x *ConfigRequest_V1_System_Proxy) ProtoReflect() protoreflect.Message { - mi := &file_config_deployment_config_request_proto_msgTypes[8] + mi := &file_config_deployment_config_request_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -674,7 +737,7 @@ type ConfigRequest_V1_System_Backup struct { func (x *ConfigRequest_V1_System_Backup) Reset() { *x = ConfigRequest_V1_System_Backup{} if protoimpl.UnsafeEnabled { - mi := &file_config_deployment_config_request_proto_msgTypes[9] + mi := &file_config_deployment_config_request_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -687,7 +750,7 @@ func (x *ConfigRequest_V1_System_Backup) String() string { func (*ConfigRequest_V1_System_Backup) ProtoMessage() {} func (x *ConfigRequest_V1_System_Backup) ProtoReflect() protoreflect.Message { - mi := &file_config_deployment_config_request_proto_msgTypes[9] + mi := &file_config_deployment_config_request_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -721,7 +784,7 @@ type ConfigRequest_V1_System_Backup_Filesystem struct { func (x *ConfigRequest_V1_System_Backup_Filesystem) Reset() { *x = ConfigRequest_V1_System_Backup_Filesystem{} if protoimpl.UnsafeEnabled { - mi := &file_config_deployment_config_request_proto_msgTypes[10] + mi := &file_config_deployment_config_request_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -734,7 +797,7 @@ func (x *ConfigRequest_V1_System_Backup_Filesystem) String() string { func (*ConfigRequest_V1_System_Backup_Filesystem) ProtoMessage() {} func (x *ConfigRequest_V1_System_Backup_Filesystem) ProtoReflect() protoreflect.Message { - mi := &file_config_deployment_config_request_proto_msgTypes[10] + mi := &file_config_deployment_config_request_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -772,12 +835,12 @@ var file_config_deployment_config_request_proto_rawDesc = []byte{ 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x61, 0x32, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x32, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x16, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xca, 0x17, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0x52, 0x02, 0x76, 0x31, 0x1a, 0x8c, 0x15, 0x0a, 0x02, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0x52, 0x02, 0x76, 0x31, 0x1a, 0xd5, 0x16, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x4a, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, @@ -859,7 +922,7 @@ var file_config_deployment_config_request_proto_rawDesc = []byte{ 0x74, 0x65, 0x6d, 0x12, 0x30, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x1a, 0x86, 0x09, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x1a, 0xd8, 0x09, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6e, @@ -931,28 +994,40 @@ var file_config_deployment_config_request_proto_rawDesc = []byte{ 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x76, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x18, 0x10, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x1a, 0xe9, - 0x01, 0x0a, 0x09, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x05, - 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x12, 0x50, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, + 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, + 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x1a, 0x75, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x4f, 0x0a, 0x15, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0xe9, 0x01, 0x0a, 0x09, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x38, 0x0a, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x38, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x38, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x3a, 0x18, 0xc2, 0xf3, 0x18, 0x14, - 0x0a, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2d, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x03, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x61, 0x75, - 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x3a, 0x18, 0xc2, 0xf3, 0x18, 0x14, 0x0a, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4a, 0x04, 0x08, + 0x01, 0x10, 0x03, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -967,66 +1042,69 @@ func file_config_deployment_config_request_proto_rawDescGZIP() []byte { return file_config_deployment_config_request_proto_rawDescData } -var file_config_deployment_config_request_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_config_deployment_config_request_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_config_deployment_config_request_proto_goTypes = []interface{}{ (*ConfigRequest)(nil), // 0: chef.automate.domain.deployment.ConfigRequest (*ConfigRequest_V1)(nil), // 1: chef.automate.domain.deployment.ConfigRequest.V1 (*ConfigRequest_V1_System)(nil), // 2: chef.automate.domain.deployment.ConfigRequest.V1.System (*ConfigRequest_V1_Service)(nil), // 3: chef.automate.domain.deployment.ConfigRequest.V1.Service - (*ConfigRequest_V1_AdminUser)(nil), // 4: chef.automate.domain.deployment.ConfigRequest.V1.AdminUser - (*ConfigRequest_V1_System_Service)(nil), // 5: chef.automate.domain.deployment.ConfigRequest.V1.System.Service - (*ConfigRequest_V1_System_Log)(nil), // 6: chef.automate.domain.deployment.ConfigRequest.V1.System.Log - (*ConfigRequest_V1_System_GatherLogs)(nil), // 7: chef.automate.domain.deployment.ConfigRequest.V1.System.GatherLogs - (*ConfigRequest_V1_System_Proxy)(nil), // 8: chef.automate.domain.deployment.ConfigRequest.V1.System.Proxy - (*ConfigRequest_V1_System_Backup)(nil), // 9: chef.automate.domain.deployment.ConfigRequest.V1.System.Backup - (*ConfigRequest_V1_System_Backup_Filesystem)(nil), // 10: chef.automate.domain.deployment.ConfigRequest.V1.System.Backup.Filesystem - (*shared.Mlsa)(nil), // 11: chef.automate.infra.config.Mlsa - (*wrapperspb.StringValue)(nil), // 12: google.protobuf.StringValue - (*wrapperspb.BoolValue)(nil), // 13: google.protobuf.BoolValue - (*wrapperspb.Int32Value)(nil), // 14: google.protobuf.Int32Value + (*ConfigRequest_V1_Health)(nil), // 4: chef.automate.domain.deployment.ConfigRequest.V1.Health + (*ConfigRequest_V1_AdminUser)(nil), // 5: chef.automate.domain.deployment.ConfigRequest.V1.AdminUser + (*ConfigRequest_V1_System_Service)(nil), // 6: chef.automate.domain.deployment.ConfigRequest.V1.System.Service + (*ConfigRequest_V1_System_Log)(nil), // 7: chef.automate.domain.deployment.ConfigRequest.V1.System.Log + (*ConfigRequest_V1_System_GatherLogs)(nil), // 8: chef.automate.domain.deployment.ConfigRequest.V1.System.GatherLogs + (*ConfigRequest_V1_System_Proxy)(nil), // 9: chef.automate.domain.deployment.ConfigRequest.V1.System.Proxy + (*ConfigRequest_V1_System_Backup)(nil), // 10: chef.automate.domain.deployment.ConfigRequest.V1.System.Backup + (*ConfigRequest_V1_System_Backup_Filesystem)(nil), // 11: chef.automate.domain.deployment.ConfigRequest.V1.System.Backup.Filesystem + (*shared.Mlsa)(nil), // 12: chef.automate.infra.config.Mlsa + (*wrapperspb.StringValue)(nil), // 13: google.protobuf.StringValue + (*wrapperspb.BoolValue)(nil), // 14: google.protobuf.BoolValue + (*wrapperspb.Int32Value)(nil), // 15: google.protobuf.Int32Value } var file_config_deployment_config_request_proto_depIdxs = []int32{ 1, // 0: chef.automate.domain.deployment.ConfigRequest.v1:type_name -> chef.automate.domain.deployment.ConfigRequest.V1 2, // 1: chef.automate.domain.deployment.ConfigRequest.V1.sys:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System 3, // 2: chef.automate.domain.deployment.ConfigRequest.V1.svc:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.Service - 11, // 3: chef.automate.domain.deployment.ConfigRequest.V1.System.mlsa:type_name -> chef.automate.infra.config.Mlsa - 5, // 4: chef.automate.domain.deployment.ConfigRequest.V1.System.service:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System.Service - 6, // 5: chef.automate.domain.deployment.ConfigRequest.V1.System.log:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System.Log - 7, // 6: chef.automate.domain.deployment.ConfigRequest.V1.System.gather_logs:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System.GatherLogs - 8, // 7: chef.automate.domain.deployment.ConfigRequest.V1.System.proxy:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System.Proxy - 9, // 8: chef.automate.domain.deployment.ConfigRequest.V1.System.backup:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System.Backup - 12, // 9: chef.automate.domain.deployment.ConfigRequest.V1.Service.name:type_name -> google.protobuf.StringValue - 12, // 10: chef.automate.domain.deployment.ConfigRequest.V1.Service.origin:type_name -> google.protobuf.StringValue - 12, // 11: chef.automate.domain.deployment.ConfigRequest.V1.Service.channel:type_name -> google.protobuf.StringValue - 12, // 12: chef.automate.domain.deployment.ConfigRequest.V1.Service.upgrade_strategy:type_name -> google.protobuf.StringValue - 12, // 13: chef.automate.domain.deployment.ConfigRequest.V1.Service.deployment_type:type_name -> google.protobuf.StringValue - 12, // 14: chef.automate.domain.deployment.ConfigRequest.V1.Service.override_origin:type_name -> google.protobuf.StringValue - 12, // 15: chef.automate.domain.deployment.ConfigRequest.V1.Service.hartifacts_path:type_name -> google.protobuf.StringValue - 4, // 16: chef.automate.domain.deployment.ConfigRequest.V1.Service.admin_user:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.AdminUser - 12, // 17: chef.automate.domain.deployment.ConfigRequest.V1.Service.manifest_cache_expiry:type_name -> google.protobuf.StringValue - 12, // 18: chef.automate.domain.deployment.ConfigRequest.V1.Service.manifest_directory:type_name -> google.protobuf.StringValue - 13, // 19: chef.automate.domain.deployment.ConfigRequest.V1.Service.enable_chef_server:type_name -> google.protobuf.BoolValue - 13, // 20: chef.automate.domain.deployment.ConfigRequest.V1.Service.enable_deployment_order_stress_mode:type_name -> google.protobuf.BoolValue - 13, // 21: chef.automate.domain.deployment.ConfigRequest.V1.Service.feature_flag_s3_backups:type_name -> google.protobuf.BoolValue - 12, // 22: chef.automate.domain.deployment.ConfigRequest.V1.Service.package_cleanup_mode:type_name -> google.protobuf.StringValue - 13, // 23: chef.automate.domain.deployment.ConfigRequest.V1.Service.enable_dev_monitoring:type_name -> google.protobuf.BoolValue - 12, // 24: chef.automate.domain.deployment.ConfigRequest.V1.AdminUser.email:type_name -> google.protobuf.StringValue - 12, // 25: chef.automate.domain.deployment.ConfigRequest.V1.AdminUser.username:type_name -> google.protobuf.StringValue - 12, // 26: chef.automate.domain.deployment.ConfigRequest.V1.AdminUser.name:type_name -> google.protobuf.StringValue - 12, // 27: chef.automate.domain.deployment.ConfigRequest.V1.AdminUser.password:type_name -> google.protobuf.StringValue - 12, // 28: chef.automate.domain.deployment.ConfigRequest.V1.System.Service.listen_address:type_name -> google.protobuf.StringValue - 14, // 29: chef.automate.domain.deployment.ConfigRequest.V1.System.Service.port:type_name -> google.protobuf.Int32Value - 12, // 30: chef.automate.domain.deployment.ConfigRequest.V1.System.Log.level:type_name -> google.protobuf.StringValue - 12, // 31: chef.automate.domain.deployment.ConfigRequest.V1.System.GatherLogs.staging_dir:type_name -> google.protobuf.StringValue - 12, // 32: chef.automate.domain.deployment.ConfigRequest.V1.System.Proxy.connection_string:type_name -> google.protobuf.StringValue - 12, // 33: chef.automate.domain.deployment.ConfigRequest.V1.System.Proxy.no_proxy_string:type_name -> google.protobuf.StringValue - 10, // 34: chef.automate.domain.deployment.ConfigRequest.V1.System.Backup.filesystem:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System.Backup.Filesystem - 12, // 35: chef.automate.domain.deployment.ConfigRequest.V1.System.Backup.Filesystem.path:type_name -> google.protobuf.StringValue - 36, // [36:36] is the sub-list for method output_type - 36, // [36:36] is the sub-list for method input_type - 36, // [36:36] is the sub-list for extension type_name - 36, // [36:36] is the sub-list for extension extendee - 0, // [0:36] is the sub-list for field type_name + 12, // 3: chef.automate.domain.deployment.ConfigRequest.V1.System.mlsa:type_name -> chef.automate.infra.config.Mlsa + 6, // 4: chef.automate.domain.deployment.ConfigRequest.V1.System.service:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System.Service + 7, // 5: chef.automate.domain.deployment.ConfigRequest.V1.System.log:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System.Log + 8, // 6: chef.automate.domain.deployment.ConfigRequest.V1.System.gather_logs:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System.GatherLogs + 9, // 7: chef.automate.domain.deployment.ConfigRequest.V1.System.proxy:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System.Proxy + 10, // 8: chef.automate.domain.deployment.ConfigRequest.V1.System.backup:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System.Backup + 13, // 9: chef.automate.domain.deployment.ConfigRequest.V1.Service.name:type_name -> google.protobuf.StringValue + 13, // 10: chef.automate.domain.deployment.ConfigRequest.V1.Service.origin:type_name -> google.protobuf.StringValue + 13, // 11: chef.automate.domain.deployment.ConfigRequest.V1.Service.channel:type_name -> google.protobuf.StringValue + 13, // 12: chef.automate.domain.deployment.ConfigRequest.V1.Service.upgrade_strategy:type_name -> google.protobuf.StringValue + 13, // 13: chef.automate.domain.deployment.ConfigRequest.V1.Service.deployment_type:type_name -> google.protobuf.StringValue + 13, // 14: chef.automate.domain.deployment.ConfigRequest.V1.Service.override_origin:type_name -> google.protobuf.StringValue + 13, // 15: chef.automate.domain.deployment.ConfigRequest.V1.Service.hartifacts_path:type_name -> google.protobuf.StringValue + 5, // 16: chef.automate.domain.deployment.ConfigRequest.V1.Service.admin_user:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.AdminUser + 13, // 17: chef.automate.domain.deployment.ConfigRequest.V1.Service.manifest_cache_expiry:type_name -> google.protobuf.StringValue + 13, // 18: chef.automate.domain.deployment.ConfigRequest.V1.Service.manifest_directory:type_name -> google.protobuf.StringValue + 14, // 19: chef.automate.domain.deployment.ConfigRequest.V1.Service.enable_chef_server:type_name -> google.protobuf.BoolValue + 14, // 20: chef.automate.domain.deployment.ConfigRequest.V1.Service.enable_deployment_order_stress_mode:type_name -> google.protobuf.BoolValue + 14, // 21: chef.automate.domain.deployment.ConfigRequest.V1.Service.feature_flag_s3_backups:type_name -> google.protobuf.BoolValue + 13, // 22: chef.automate.domain.deployment.ConfigRequest.V1.Service.package_cleanup_mode:type_name -> google.protobuf.StringValue + 14, // 23: chef.automate.domain.deployment.ConfigRequest.V1.Service.enable_dev_monitoring:type_name -> google.protobuf.BoolValue + 4, // 24: chef.automate.domain.deployment.ConfigRequest.V1.Service.health:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.Health + 15, // 25: chef.automate.domain.deployment.ConfigRequest.V1.Health.health_check_interval:type_name -> google.protobuf.Int32Value + 13, // 26: chef.automate.domain.deployment.ConfigRequest.V1.AdminUser.email:type_name -> google.protobuf.StringValue + 13, // 27: chef.automate.domain.deployment.ConfigRequest.V1.AdminUser.username:type_name -> google.protobuf.StringValue + 13, // 28: chef.automate.domain.deployment.ConfigRequest.V1.AdminUser.name:type_name -> google.protobuf.StringValue + 13, // 29: chef.automate.domain.deployment.ConfigRequest.V1.AdminUser.password:type_name -> google.protobuf.StringValue + 13, // 30: chef.automate.domain.deployment.ConfigRequest.V1.System.Service.listen_address:type_name -> google.protobuf.StringValue + 15, // 31: chef.automate.domain.deployment.ConfigRequest.V1.System.Service.port:type_name -> google.protobuf.Int32Value + 13, // 32: chef.automate.domain.deployment.ConfigRequest.V1.System.Log.level:type_name -> google.protobuf.StringValue + 13, // 33: chef.automate.domain.deployment.ConfigRequest.V1.System.GatherLogs.staging_dir:type_name -> google.protobuf.StringValue + 13, // 34: chef.automate.domain.deployment.ConfigRequest.V1.System.Proxy.connection_string:type_name -> google.protobuf.StringValue + 13, // 35: chef.automate.domain.deployment.ConfigRequest.V1.System.Proxy.no_proxy_string:type_name -> google.protobuf.StringValue + 11, // 36: chef.automate.domain.deployment.ConfigRequest.V1.System.Backup.filesystem:type_name -> chef.automate.domain.deployment.ConfigRequest.V1.System.Backup.Filesystem + 13, // 37: chef.automate.domain.deployment.ConfigRequest.V1.System.Backup.Filesystem.path:type_name -> google.protobuf.StringValue + 38, // [38:38] is the sub-list for method output_type + 38, // [38:38] is the sub-list for method input_type + 38, // [38:38] is the sub-list for extension type_name + 38, // [38:38] is the sub-list for extension extendee + 0, // [0:38] is the sub-list for field type_name } func init() { file_config_deployment_config_request_proto_init() } @@ -1084,7 +1162,7 @@ func file_config_deployment_config_request_proto_init() { } } file_config_deployment_config_request_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigRequest_V1_AdminUser); i { + switch v := v.(*ConfigRequest_V1_Health); i { case 0: return &v.state case 1: @@ -1096,7 +1174,7 @@ func file_config_deployment_config_request_proto_init() { } } file_config_deployment_config_request_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigRequest_V1_System_Service); i { + switch v := v.(*ConfigRequest_V1_AdminUser); i { case 0: return &v.state case 1: @@ -1108,7 +1186,7 @@ func file_config_deployment_config_request_proto_init() { } } file_config_deployment_config_request_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigRequest_V1_System_Log); i { + switch v := v.(*ConfigRequest_V1_System_Service); i { case 0: return &v.state case 1: @@ -1120,7 +1198,7 @@ func file_config_deployment_config_request_proto_init() { } } file_config_deployment_config_request_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigRequest_V1_System_GatherLogs); i { + switch v := v.(*ConfigRequest_V1_System_Log); i { case 0: return &v.state case 1: @@ -1132,7 +1210,7 @@ func file_config_deployment_config_request_proto_init() { } } file_config_deployment_config_request_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigRequest_V1_System_Proxy); i { + switch v := v.(*ConfigRequest_V1_System_GatherLogs); i { case 0: return &v.state case 1: @@ -1144,7 +1222,7 @@ func file_config_deployment_config_request_proto_init() { } } file_config_deployment_config_request_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigRequest_V1_System_Backup); i { + switch v := v.(*ConfigRequest_V1_System_Proxy); i { case 0: return &v.state case 1: @@ -1156,6 +1234,18 @@ func file_config_deployment_config_request_proto_init() { } } file_config_deployment_config_request_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConfigRequest_V1_System_Backup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_config_deployment_config_request_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConfigRequest_V1_System_Backup_Filesystem); i { case 0: return &v.state @@ -1174,7 +1264,7 @@ func file_config_deployment_config_request_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_config_deployment_config_request_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/api/config/deployment/config_request.proto b/api/config/deployment/config_request.proto index af3c2425798..6a87220d067 100644 --- a/api/config/deployment/config_request.proto +++ b/api/config/deployment/config_request.proto @@ -71,6 +71,13 @@ message ConfigRequest { google.protobuf.BoolValue enable_dev_monitoring = 15; repeated string products = 16; + + Health health = 17; + } + + message Health { + google.protobuf.Int32Value health_check_interval = 1; + repeated string services = 2; } message AdminUser { diff --git a/components/automate-cs-nginx/habitat/plan.sh b/components/automate-cs-nginx/habitat/plan.sh index 06002433950..9aacd49d008 100644 --- a/components/automate-cs-nginx/habitat/plan.sh +++ b/components/automate-cs-nginx/habitat/plan.sh @@ -19,8 +19,13 @@ pkg_deps=( # chef-server-* packages are pinned to the versions required by the # chef-server-* packages. # +<<<<<<< HEAD core/curl core/ruby30 +======= + core/curl/7.79.1/20240105235730 + core/ruby27 +>>>>>>> 0366bc6c0 (updated working patch health check config for provided services) # WARNING: Version pin managed by .expeditor/update_chef_server.sh "${vendor_origin}/chef-server-nginx/15.10.12/20240910074923" "${vendor_origin}/chef-server-ctl/15.10.12/20240910074330" diff --git a/components/automate-deployment/pkg/deployment/deployment.go b/components/automate-deployment/pkg/deployment/deployment.go index adfe9ab79a3..c52b3e02057 100644 --- a/components/automate-deployment/pkg/deployment/deployment.go +++ b/components/automate-deployment/pkg/deployment/deployment.go @@ -15,6 +15,7 @@ import ( dc "github.com/chef/automate/api/config/deployment" api "github.com/chef/automate/api/interservice/deployment" "github.com/chef/automate/components/automate-deployment/pkg/certauthority" + globalconfig "github.com/chef/automate/components/automate-deployment/pkg/globalConfig" "github.com/chef/automate/components/automate-deployment/pkg/habpkg" "github.com/chef/automate/components/automate-deployment/pkg/manifest" "github.com/chef/automate/components/automate-deployment/pkg/services" @@ -134,6 +135,8 @@ func (d *Deployment) UpdateWithUserOverrideConfig(config *dc.AutomateConfig, sec } d.ExpectedServices = expectedServices + SethealthCheckConfig(d.Config) + return d.MoveSecretsToSecretStore(secretStore) } @@ -158,6 +161,7 @@ func (d *Deployment) MergeIntoUserOverrideConfig(config *dc.AutomateConfig, secr } mergedConfig.SetGlobalConfig() d.Config = mergedConfig + SethealthCheckConfig(d.Config) return d.MoveSecretsToSecretStore(secretStore) } @@ -173,10 +177,18 @@ func (d *Deployment) ReplaceUserOverrideConfig(config *dc.AutomateConfig, secret } mergedConfig.SetGlobalConfig() d.Config = mergedConfig + SethealthCheckConfig(d.Config) return d.MoveSecretsToSecretStore(secretStore) } +func SethealthCheckConfig(config *dc.AutomateConfig) { + if config != nil { + globalconfig.HealthCheckInterval = config.Deployment.GetV1().GetSvc().GetHealth().GetHealthCheckInterval().GetValue() + globalconfig.Services = config.Deployment.GetV1().GetSvc().GetHealth().GetServices() + } +} + func ContainsAutomateCollection(c *dc.ConfigRequest) bool { return ContainsCollection(c, services.AutomateCollectionName) } diff --git a/components/automate-deployment/pkg/globalConfig/config.go b/components/automate-deployment/pkg/globalConfig/config.go new file mode 100644 index 00000000000..17356d73f79 --- /dev/null +++ b/components/automate-deployment/pkg/globalConfig/config.go @@ -0,0 +1,6 @@ +package globalconfig + +var ( + HealthCheckInterval int32 + Services []string +) diff --git a/components/automate-deployment/pkg/server/server.go b/components/automate-deployment/pkg/server/server.go index 12380302642..ce203d07a87 100644 --- a/components/automate-deployment/pkg/server/server.go +++ b/components/automate-deployment/pkg/server/server.go @@ -1159,6 +1159,7 @@ func StartServer(config *Config) error { }() server.convergeLoop.Start() + deployment.SethealthCheckConfig(server.deployment.Config) return grpcServer.Serve(listener) } diff --git a/components/automate-deployment/pkg/target/hab_cmd.go b/components/automate-deployment/pkg/target/hab_cmd.go index a293e86b5cd..8f9509faf19 100644 --- a/components/automate-deployment/pkg/target/hab_cmd.go +++ b/components/automate-deployment/pkg/target/hab_cmd.go @@ -2,14 +2,17 @@ package target import ( "context" + "fmt" "os" "strings" "time" "github.com/sirupsen/logrus" + globalconfig "github.com/chef/automate/components/automate-deployment/pkg/globalConfig" "github.com/chef/automate/components/automate-deployment/pkg/habpkg" "github.com/chef/automate/lib/platform/command" + "github.com/chef/automate/lib/stringutils" ) var stdHabOptions = []command.Opt{ @@ -210,6 +213,9 @@ func (c *habCmd) BinlinkPackage(ctx context.Context, pkg habpkg.VersionedPackage func (c *habCmd) LoadService(ctx context.Context, svc habpkg.VersionedPackage, opts ...LoadOption) (string, error) { args := []string{"svc", "load", "--force", habpkg.Ident(svc), "--strategy", "none"} + if stringutils.SliceContains(globalconfig.Services, svc.Name()) { + args = append(args, "--health-check-interval", fmt.Sprintf("%d", globalconfig.HealthCheckInterval)) + } for _, o := range opts { args = o(args) } diff --git a/dev/config.toml b/dev/config.toml index 50f479d3afb..5ebe2bf22f0 100644 --- a/dev/config.toml +++ b/dev/config.toml @@ -89,6 +89,9 @@ shared_buffers = "1GB" username = "admin" name = "Local Administrator" password = "chefautomate" + [deployment.v1.svc.health] + health_check_interval=31 + services = ["authz-service", "secrets-service"] # Gateway service configuration. [gateway.v1] From 1714c1ea69bf18ac9ee6402bcb9db0671a83108f Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Wed, 11 Sep 2024 12:55:53 +0530 Subject: [PATCH 04/12] renamed folder Signed-off-by: Vivek Shankar --- .../pkg/{globalConfig => globalconfig}/config.go | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename components/automate-deployment/pkg/{globalConfig => globalconfig}/config.go (100%) diff --git a/components/automate-deployment/pkg/globalConfig/config.go b/components/automate-deployment/pkg/globalconfig/config.go similarity index 100% rename from components/automate-deployment/pkg/globalConfig/config.go rename to components/automate-deployment/pkg/globalconfig/config.go From cf462f1ee75546bd4c293e85b4a197aea9ab40e4 Mon Sep 17 00:00:00 2001 From: punitmundra Date: Wed, 11 Sep 2024 18:30:47 +0530 Subject: [PATCH 05/12] review comments Signed-off-by: punitmundra --- components/automate-cs-nginx/habitat/hooks/health-check | 1 + components/automate-cs-nginx/habitat/plan.sh | 4 ++++ components/automate-cs-oc-erchef/habitat/hooks/health-check | 1 + 3 files changed, 6 insertions(+) diff --git a/components/automate-cs-nginx/habitat/hooks/health-check b/components/automate-cs-nginx/habitat/hooks/health-check index 756e74adbb9..4ac0fdc5e17 100644 --- a/components/automate-cs-nginx/habitat/hooks/health-check +++ b/components/automate-cs-nginx/habitat/hooks/health-check @@ -17,6 +17,7 @@ do if [ "0" = "$res" ]; then exit 0 fi +sleep 1 done echo "health check curl command returned exit code ${res}:" diff --git a/components/automate-cs-nginx/habitat/plan.sh b/components/automate-cs-nginx/habitat/plan.sh index 9aacd49d008..39d4d7431c8 100644 --- a/components/automate-cs-nginx/habitat/plan.sh +++ b/components/automate-cs-nginx/habitat/plan.sh @@ -19,11 +19,15 @@ pkg_deps=( # chef-server-* packages are pinned to the versions required by the # chef-server-* packages. # +<<<<<<< HEAD <<<<<<< HEAD core/curl core/ruby30 ======= core/curl/7.79.1/20240105235730 +======= + core/curl +>>>>>>> f8317eed6 (review comments) core/ruby27 >>>>>>> 0366bc6c0 (updated working patch health check config for provided services) # WARNING: Version pin managed by .expeditor/update_chef_server.sh diff --git a/components/automate-cs-oc-erchef/habitat/hooks/health-check b/components/automate-cs-oc-erchef/habitat/hooks/health-check index 3440578d0e3..5830783429a 100644 --- a/components/automate-cs-oc-erchef/habitat/hooks/health-check +++ b/components/automate-cs-oc-erchef/habitat/hooks/health-check @@ -15,6 +15,7 @@ do if [ "0" = "$res" ]; then exit 0 fi +sleep 1 done echo "health check curl command returned exit code ${res}:" From 26af6c14fe6d8620117e54fa13e19eca49452e01 Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Wed, 11 Sep 2024 19:17:25 +0530 Subject: [PATCH 06/12] fail timout added in es, changes port from 7432 to 5432 Signed-off-by: Vivek Shankar --- api/config/esgateway/config_request.go | 1 + api/config/esgateway/config_request.pb.go | 85 +++++++++++-------- api/config/esgateway/config_request.proto | 1 + .../automate-backend-deployment/README.md | 2 +- .../habitat/config/nginx.conf | 4 +- .../automate-es-gateway/habitat/default.toml | 1 + .../habitat/config/haproxy.conf | 4 +- .../a2ha-terraform/modules/automate/inputs.tf | 3 + .../a2ha-terraform/modules/automate/main.tf | 1 + .../automate/templates/connector.toml.tpl | 2 +- .../deployment/main.tf | 3 + .../existing_nodes/main.tf | 3 + 12 files changed, 68 insertions(+), 42 deletions(-) diff --git a/api/config/esgateway/config_request.go b/api/config/esgateway/config_request.go index 69ee41c7e4f..fd776bc9945 100644 --- a/api/config/esgateway/config_request.go +++ b/api/config/esgateway/config_request.go @@ -51,6 +51,7 @@ func DefaultConfigRequest() *ConfigRequest { c.V1.Sys.Ngx.Main.WorkerProcesses = w.Int32(4) c.V1.Sys.Ngx.Main.MaxFails = w.Int32(10) + c.V1.Sys.Ngx.Main.FailTimeout = w.Int32(10) // TODO(ssd) 2020-12-08: Enable automatic discovery of system // resolvers once we are a bit more confident in the nginx // module we are using to do dynamic resolution. diff --git a/api/config/esgateway/config_request.pb.go b/api/config/esgateway/config_request.pb.go index 54647a9b578..9c935847d98 100644 --- a/api/config/esgateway/config_request.pb.go +++ b/api/config/esgateway/config_request.pb.go @@ -592,6 +592,7 @@ type ConfigRequest_V1_System_Nginx_Main struct { WorkerProcesses *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=worker_processes,json=workerProcesses,proto3" json:"worker_processes,omitempty" toml:"worker_processes,omitempty" mapstructure:"worker_processes,omitempty"` MaxFails *wrapperspb.Int32Value `protobuf:"bytes,2,opt,name=max_fails,json=maxFails,proto3" json:"max_fails,omitempty" toml:"max_fails,omitempty" mapstructure:"max_fails,omitempty"` Resolvers *ConfigRequest_V1_System_Nginx_Main_Resolvers `protobuf:"bytes,4,opt,name=resolvers,proto3" json:"resolvers,omitempty" toml:"resolvers,omitempty" mapstructure:"resolvers,omitempty"` + FailTimeout *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=fail_timeout,json=failTimeout,proto3" json:"fail_timeout,omitempty" toml:"fail_timeout,omitempty" mapstructure:"fail_timeout,omitempty"` } func (x *ConfigRequest_V1_System_Nginx_Main) Reset() { @@ -647,6 +648,13 @@ func (x *ConfigRequest_V1_System_Nginx_Main) GetResolvers() *ConfigRequest_V1_Sy return nil } +func (x *ConfigRequest_V1_System_Nginx_Main) GetFailTimeout() *wrapperspb.Int32Value { + if x != nil { + return x.FailTimeout + } + return nil +} + type ConfigRequest_V1_System_Nginx_Events struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -981,13 +989,13 @@ var file_config_esgateway_config_request_proto_rawDesc = []byte{ 0x61, 0x70, 0x69, 0x2f, 0x61, 0x32, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, - 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x1f, 0x0a, + 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x20, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x65, 0x73, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0x52, 0x02, 0x76, 0x31, 0x1a, - 0xe8, 0x1e, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x48, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, + 0xa8, 0x1f, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x48, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x65, 0x73, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, @@ -996,7 +1004,7 @@ var file_config_esgateway_config_request_proto_rawDesc = []byte{ 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x65, 0x73, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x03, 0x73, 0x76, 0x63, 0x1a, 0xc1, 0x1d, 0x0a, 0x06, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x03, 0x73, 0x76, 0x63, 0x1a, 0x81, 0x1e, 0x0a, 0x06, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x34, 0x0a, 0x04, 0x6d, 0x6c, 0x73, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, @@ -1038,7 +1046,7 @@ var file_config_esgateway_config_request_proto_rawDesc = []byte{ 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x1a, 0xc1, 0x12, 0x0a, 0x05, 0x4e, 0x67, 0x69, 0x6e, 0x78, 0x12, 0x55, 0x0a, 0x04, 0x6d, + 0x6c, 0x1a, 0x81, 0x13, 0x0a, 0x05, 0x4e, 0x67, 0x69, 0x6e, 0x78, 0x12, 0x55, 0x0a, 0x04, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x65, 0x73, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, @@ -1055,7 +1063,7 @@ var file_config_esgateway_config_request_proto_rawDesc = []byte{ 0x66, 0x72, 0x61, 0x2e, 0x65, 0x73, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x4e, 0x67, 0x69, 0x6e, 0x78, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x1a, 0xec, 0x03, 0x0a, 0x04, 0x4d, 0x61, 0x69, 0x6e, 0x12, + 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x1a, 0xac, 0x04, 0x0a, 0x04, 0x4d, 0x61, 0x69, 0x6e, 0x12, 0x46, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, @@ -1070,7 +1078,11 @@ var file_config_esgateway_config_request_proto_rawDesc = []byte{ 0x65, 0x77, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x4e, 0x67, 0x69, 0x6e, 0x78, 0x2e, 0x4d, 0x61, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, - 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x1a, 0xf0, 0x01, 0x0a, + 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x0c, + 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0b, 0x66, 0x61, 0x69, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0xf0, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x19, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, @@ -1304,36 +1316,37 @@ var file_config_esgateway_config_request_proto_depIdxs = []int32{ 16, // 26: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Main.worker_processes:type_name -> google.protobuf.Int32Value 16, // 27: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Main.max_fails:type_name -> google.protobuf.Int32Value 12, // 28: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Main.resolvers:type_name -> chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Main.Resolvers - 16, // 29: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Events.worker_connections:type_name -> google.protobuf.Int32Value - 15, // 30: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.client_max_body_size:type_name -> google.protobuf.StringValue - 16, // 31: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.proxy_connect_timeout:type_name -> google.protobuf.Int32Value - 16, // 32: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.keepalive_timeout:type_name -> google.protobuf.Int32Value - 15, // 33: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.gzip:type_name -> google.protobuf.StringValue - 15, // 34: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.gzip_http_version:type_name -> google.protobuf.StringValue - 15, // 35: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.gzip_comp_level:type_name -> google.protobuf.StringValue - 15, // 36: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.gzip_proxied:type_name -> google.protobuf.StringValue - 15, // 37: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.gzip_types:type_name -> google.protobuf.StringValue - 15, // 38: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.sendfile:type_name -> google.protobuf.StringValue - 15, // 39: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.tcp_nodelay:type_name -> google.protobuf.StringValue - 15, // 40: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.tcp_nopush:type_name -> google.protobuf.StringValue - 15, // 41: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.ssl_ciphers:type_name -> google.protobuf.StringValue - 15, // 42: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.ssl_protocols:type_name -> google.protobuf.StringValue - 16, // 43: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.ssl_verify_depth:type_name -> google.protobuf.Int32Value - 16, // 44: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.server_names_hash_bucket_size:type_name -> google.protobuf.Int32Value - 15, // 45: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.client_body_buffer_size:type_name -> google.protobuf.StringValue - 16, // 46: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.proxy_read_timeout:type_name -> google.protobuf.Int32Value - 16, // 47: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.proxy_send_timeout:type_name -> google.protobuf.Int32Value - 15, // 48: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.proxy_set_header_host:type_name -> google.protobuf.StringValue - 15, // 49: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.proxy_ssl_verify:type_name -> google.protobuf.StringValue - 17, // 50: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.proxy_ssl_server_name:type_name -> google.protobuf.BoolValue - 17, // 51: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Main.Resolvers.enable_system_nameservers:type_name -> google.protobuf.BoolValue - 15, // 52: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Main.Resolvers.nameservers:type_name -> google.protobuf.StringValue - 15, // 53: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Main.Resolvers.nameservers_string:type_name -> google.protobuf.StringValue - 54, // [54:54] is the sub-list for method output_type - 54, // [54:54] is the sub-list for method input_type - 54, // [54:54] is the sub-list for extension type_name - 54, // [54:54] is the sub-list for extension extendee - 0, // [0:54] is the sub-list for field type_name + 16, // 29: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Main.fail_timeout:type_name -> google.protobuf.Int32Value + 16, // 30: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Events.worker_connections:type_name -> google.protobuf.Int32Value + 15, // 31: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.client_max_body_size:type_name -> google.protobuf.StringValue + 16, // 32: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.proxy_connect_timeout:type_name -> google.protobuf.Int32Value + 16, // 33: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.keepalive_timeout:type_name -> google.protobuf.Int32Value + 15, // 34: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.gzip:type_name -> google.protobuf.StringValue + 15, // 35: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.gzip_http_version:type_name -> google.protobuf.StringValue + 15, // 36: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.gzip_comp_level:type_name -> google.protobuf.StringValue + 15, // 37: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.gzip_proxied:type_name -> google.protobuf.StringValue + 15, // 38: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.gzip_types:type_name -> google.protobuf.StringValue + 15, // 39: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.sendfile:type_name -> google.protobuf.StringValue + 15, // 40: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.tcp_nodelay:type_name -> google.protobuf.StringValue + 15, // 41: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.tcp_nopush:type_name -> google.protobuf.StringValue + 15, // 42: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.ssl_ciphers:type_name -> google.protobuf.StringValue + 15, // 43: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.ssl_protocols:type_name -> google.protobuf.StringValue + 16, // 44: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.ssl_verify_depth:type_name -> google.protobuf.Int32Value + 16, // 45: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.server_names_hash_bucket_size:type_name -> google.protobuf.Int32Value + 15, // 46: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.client_body_buffer_size:type_name -> google.protobuf.StringValue + 16, // 47: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.proxy_read_timeout:type_name -> google.protobuf.Int32Value + 16, // 48: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.proxy_send_timeout:type_name -> google.protobuf.Int32Value + 15, // 49: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.proxy_set_header_host:type_name -> google.protobuf.StringValue + 15, // 50: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.proxy_ssl_verify:type_name -> google.protobuf.StringValue + 17, // 51: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Http.proxy_ssl_server_name:type_name -> google.protobuf.BoolValue + 17, // 52: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Main.Resolvers.enable_system_nameservers:type_name -> google.protobuf.BoolValue + 15, // 53: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Main.Resolvers.nameservers:type_name -> google.protobuf.StringValue + 15, // 54: chef.automate.infra.esgateway.ConfigRequest.V1.System.Nginx.Main.Resolvers.nameservers_string:type_name -> google.protobuf.StringValue + 55, // [55:55] is the sub-list for method output_type + 55, // [55:55] is the sub-list for method input_type + 55, // [55:55] is the sub-list for extension type_name + 55, // [55:55] is the sub-list for extension extendee + 0, // [0:55] is the sub-list for field type_name } func init() { file_config_esgateway_config_request_proto_init() } diff --git a/api/config/esgateway/config_request.proto b/api/config/esgateway/config_request.proto index 0b89fcfe758..f394505618f 100644 --- a/api/config/esgateway/config_request.proto +++ b/api/config/esgateway/config_request.proto @@ -45,6 +45,7 @@ message ConfigRequest { google.protobuf.Int32Value max_fails = 2; reserved 3; Resolvers resolvers = 4; + google.protobuf.Int32Value fail_timeout = 5; message Resolvers { google.protobuf.BoolValue enable_system_nameservers = 1; diff --git a/components/automate-backend-deployment/README.md b/components/automate-backend-deployment/README.md index 9f52eb920e7..53f2f8fca03 100644 --- a/components/automate-backend-deployment/README.md +++ b/components/automate-backend-deployment/README.md @@ -3,6 +3,6 @@ This provides the `automate-backend-deployment` package. -This package will build a package using terraform/a2ha-terraform, inspecs, test, certs and Makefile. +This package will build a package using terraform/a2ha-terraform, inspecs, test, certs and Makefile. This is the heart of the a2ha because this component will set up a workspace for a2ha and all the a2ha command will get available after installing this package. diff --git a/components/automate-es-gateway/habitat/config/nginx.conf b/components/automate-es-gateway/habitat/config/nginx.conf index e13be499150..37dc570e91a 100644 --- a/components/automate-es-gateway/habitat/config/nginx.conf +++ b/components/automate-es-gateway/habitat/config/nginx.conf @@ -39,10 +39,10 @@ http { # External ES has been specified by a domain name, but no DNS # resolvers have been configured. DNS resolution will happen at # startup only. - server {{endpoint.address}}:{{endpoint.port}} max_fails={{../cfg.ngx.main.max_fails}}; + server {{endpoint.address}}:{{endpoint.port}} max_fails={{../cfg.ngx.main.max_fails}} fail_timeout={{../cfg.ngx.main.fail_timeout}}; {{/if ~}} {{~else}} - server {{endpoint.address}}:{{endpoint.port}} max_fails={{../cfg.ngx.main.max_fails}}; + server {{endpoint.address}}:{{endpoint.port}} max_fails={{../cfg.ngx.main.max_fails}} fail_timeout={{../cfg.ngx.main.fail_timeout}}; {{/if ~}} {{ ~else }} server 127.0.0.1:65535; # force 502 diff --git a/components/automate-es-gateway/habitat/default.toml b/components/automate-es-gateway/habitat/default.toml index f807285150f..f1e0db42542 100644 --- a/components/automate-es-gateway/habitat/default.toml +++ b/components/automate-es-gateway/habitat/default.toml @@ -17,6 +17,7 @@ worker_processes = 4 error_log = "stderr" max_fails = 10 +fail_timeout = 10 [ngx.events] worker_connections = 1024 diff --git a/components/automate-pg-gateway/habitat/config/haproxy.conf b/components/automate-pg-gateway/habitat/config/haproxy.conf index dfc2110d89f..6ca604ae837 100644 --- a/components/automate-pg-gateway/habitat/config/haproxy.conf +++ b/components/automate-pg-gateway/habitat/config/haproxy.conf @@ -55,10 +55,10 @@ backend automate_postgresql {{~#if ../cfg.resolvers.nameservers }} server-template {{node.address}} 8 {{node.address}}:{{node.port}} check resolvers pgdns init-addr none resolve-prefer ipv4 {{else}} - server {{node.address}} {{node.address}}:5432 maxconn 350 check port 6432 + server {{node.address}} {{node.address}}:{{node.port}} maxconn 350 check port 6432 {{~/if}} {{else}} - server {{node.address}} {{node.address}}:5432 maxconn 350 check port 6432 + server {{node.address}} {{node.address}}:{{node.port}} maxconn 350 check port 6432 {{~/if}} {{~/each}} {{else~}} diff --git a/terraform/a2ha-terraform/modules/automate/inputs.tf b/terraform/a2ha-terraform/modules/automate/inputs.tf index d90103856d5..4bf2090485b 100644 --- a/terraform/a2ha-terraform/modules/automate/inputs.tf +++ b/terraform/a2ha-terraform/modules/automate/inputs.tf @@ -224,6 +224,9 @@ variable "private_ips" { variable "proxy_listen_port" { } +variable "postgresql_listen_port" { +} + variable "public_ips" { default = [] } diff --git a/terraform/a2ha-terraform/modules/automate/main.tf b/terraform/a2ha-terraform/modules/automate/main.tf index ff38a52364c..62a73730b4d 100644 --- a/terraform/a2ha-terraform/modules/automate/main.tf +++ b/terraform/a2ha-terraform/modules/automate/main.tf @@ -30,6 +30,7 @@ locals { postgresql_ips = jsonencode(formatlist("%s", var.postgresql_private_ips)), postgresql_ssl_enable = var.postgresql_ssl_enable ? "true" : "false", proxy_listen_port = var.proxy_listen_port, + postgresql_listen_port = var.postgresql_listen_port, setup_managed_services = var.setup_managed_services, setup_self_managed_services = var.setup_self_managed_services, opensearch_root_cert = var.opensearch_root_cert, diff --git a/terraform/a2ha-terraform/modules/automate/templates/connector.toml.tpl b/terraform/a2ha-terraform/modules/automate/templates/connector.toml.tpl index 44f449af3ba..3aa04089896 100644 --- a/terraform/a2ha-terraform/modules/automate/templates/connector.toml.tpl +++ b/terraform/a2ha-terraform/modules/automate/templates/connector.toml.tpl @@ -63,6 +63,6 @@ sup_port = 9631 svc_group = "default" svc_name = "automate-ha-postgresql" - svc_port = ${proxy_listen_port} + svc_port = ${postgresql_listen_port} ssl = ${postgresql_ssl_enable} setup_managed_services = ${setup_managed_services} diff --git a/terraform/a2ha-terraform/reference_architectures/deployment/main.tf b/terraform/a2ha-terraform/reference_architectures/deployment/main.tf index 2ba7fbdbbb9..65d3a8ba144 100644 --- a/terraform/a2ha-terraform/reference_architectures/deployment/main.tf +++ b/terraform/a2ha-terraform/reference_architectures/deployment/main.tf @@ -412,6 +412,7 @@ module "bootstrap_automate" { postgresql_ssl_enable = var.postgresql_ssl_enable private_ips = slice(var.automate_private_ips, 0, 1) proxy_listen_port = var.proxy_listen_port + postgresql_listen_port = var.postgresql_listen_port setup_managed_services = var.setup_managed_services ssh_key_file = var.ssh_key_file ssh_user = var.ssh_user @@ -487,6 +488,7 @@ module "automate" { length(var.automate_private_ips), ) proxy_listen_port = var.proxy_listen_port + postgresql_listen_port = var.postgresql_listen_port setup_managed_services = var.setup_managed_services ssh_key_file = var.ssh_key_file ssh_user = var.ssh_user @@ -558,6 +560,7 @@ module "chef_server" { postgresql_ssl_enable = var.postgresql_ssl_enable private_ips = var.chef_server_private_ips proxy_listen_port = var.proxy_listen_port + postgresql_listen_port = var.postgresql_listen_port setup_managed_services = var.setup_managed_services ssh_key_file = var.ssh_key_file ssh_user = var.ssh_user diff --git a/terraform/a2ha-terraform/reference_architectures/existing_nodes/main.tf b/terraform/a2ha-terraform/reference_architectures/existing_nodes/main.tf index 1da92db8a50..90525c40345 100644 --- a/terraform/a2ha-terraform/reference_architectures/existing_nodes/main.tf +++ b/terraform/a2ha-terraform/reference_architectures/existing_nodes/main.tf @@ -287,6 +287,7 @@ module "bootstrap_automate" { opensearch_listen_port = var.opensearch_listen_port opensearch_private_ips = var.existing_opensearch_private_ips proxy_listen_port = var.proxy_listen_port + postgresql_listen_port = var.postgresql_listen_port postgresql_private_ips = var.existing_postgresql_private_ips postgresql_ssl_enable = var.postgresql_ssl_enable private_ips = slice(var.existing_automate_private_ips, 0, 1) @@ -361,6 +362,7 @@ module "automate" { opensearch_listen_port = var.opensearch_listen_port opensearch_private_ips = var.existing_opensearch_private_ips proxy_listen_port = var.proxy_listen_port + postgresql_listen_port = var.postgresql_listen_port postgresql_private_ips = var.existing_postgresql_private_ips postgresql_ssl_enable = var.postgresql_ssl_enable private_ips = slice( @@ -439,6 +441,7 @@ module "chef_server" { opensearch_listen_port = var.opensearch_listen_port opensearch_private_ips = var.existing_opensearch_private_ips proxy_listen_port = var.proxy_listen_port + postgresql_listen_port = var.postgresql_listen_port postgresql_private_ips = var.existing_postgresql_private_ips postgresql_ssl_enable = var.postgresql_ssl_enable private_ips = var.existing_chef_server_private_ips From b943eaf00afdde50f78b551dd1960486b9a3a618 Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Wed, 11 Sep 2024 19:43:57 +0530 Subject: [PATCH 07/12] added log in cs health hook Signed-off-by: Vivek Shankar --- components/automate-cs-nginx/habitat/hooks/health-check | 1 + components/automate-cs-oc-erchef/habitat/hooks/health-check | 1 + 2 files changed, 2 insertions(+) diff --git a/components/automate-cs-nginx/habitat/hooks/health-check b/components/automate-cs-nginx/habitat/hooks/health-check index 4ac0fdc5e17..e6fb15f9cd2 100644 --- a/components/automate-cs-nginx/habitat/hooks/health-check +++ b/components/automate-cs-nginx/habitat/hooks/health-check @@ -15,6 +15,7 @@ do output=$({{pkgPathFor "core/curl"}}/bin/curl $curlOpts "https://automate-cs-nginx:{{cfg.service.port}}/_status") res=$? if [ "0" = "$res" ]; then + echo "health check passed" exit 0 fi sleep 1 diff --git a/components/automate-cs-oc-erchef/habitat/hooks/health-check b/components/automate-cs-oc-erchef/habitat/hooks/health-check index 5830783429a..ee6431fbe77 100644 --- a/components/automate-cs-oc-erchef/habitat/hooks/health-check +++ b/components/automate-cs-oc-erchef/habitat/hooks/health-check @@ -13,6 +13,7 @@ do output=$({{pkgPathFor "core/curl"}}/bin/curl $curlOpts "https://automate-cs-oc-erchef:{{cfg.network.port}}/_status") res=$? if [ "0" = "$res" ]; then + echo "health check passed" exit 0 fi sleep 1 From 822cde6e166cc30d7fd49b2790d0f4ae6df0d3df Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Fri, 13 Sep 2024 11:48:12 +0530 Subject: [PATCH 08/12] path after upgrade Signed-off-by: Vivek Shankar --- api/config/deployment/config_request.go | 1 + .../modules/automate/templates/provision.sh.tpl | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/config/deployment/config_request.go b/api/config/deployment/config_request.go index 729372678ae..cd79bf99c73 100644 --- a/api/config/deployment/config_request.go +++ b/api/config/deployment/config_request.go @@ -50,6 +50,7 @@ func DefaultConfigRequest() *ConfigRequest { c.V1.Svc.PackageCleanupMode = w.String("conservative") c.V1.Svc.Health.HealthCheckInterval = w.Int32(30) + c.V1.Svc.Health.Services = []string{} return c } diff --git a/terraform/a2ha-terraform/modules/automate/templates/provision.sh.tpl b/terraform/a2ha-terraform/modules/automate/templates/provision.sh.tpl index 1b911d3a24e..68d41aa803a 100644 --- a/terraform/a2ha-terraform/modules/automate/templates/provision.sh.tpl +++ b/terraform/a2ha-terraform/modules/automate/templates/provision.sh.tpl @@ -365,8 +365,8 @@ if [ -e "/hab/user/deployment-service/config/user.toml" ]; then # Below command is commented as patch is not required during upgrade and add/remove node # Also when it is being applied, it was reverting patched configs (automate) to the older ones - # echo "Applying /etc/chef-automate/config.toml" - # chef-automate config patch /etc/chef-automate/config.toml + echo "Applying /etc/chef-automate/config.toml" + chef-automate config patch /etc/chef-automate/config.toml echo "MAINTENANCE MODE OFF" chef-automate maintenance off From ab5d89b8821daacc3ec60a3ea0f07bbab58b4b84 Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Fri, 13 Sep 2024 15:56:05 +0530 Subject: [PATCH 09/12] added max conn configurable Signed-off-by: Vivek Shankar --- api/config/pg_gateway/config_request.go | 1 + api/config/pg_gateway/config_request.pb.go | 179 ++++++++++-------- api/config/pg_gateway/config_request.proto | 1 + .../habitat/default.toml | 9 +- .../pkg/deployment/deployment.go | 2 +- .../habitat/config/haproxy.conf | 4 +- 6 files changed, 108 insertions(+), 88 deletions(-) diff --git a/api/config/pg_gateway/config_request.go b/api/config/pg_gateway/config_request.go index 53d325a7bc3..0af6f0c8328 100644 --- a/api/config/pg_gateway/config_request.go +++ b/api/config/pg_gateway/config_request.go @@ -40,6 +40,7 @@ func DefaultConfigRequest() *ConfigRequest { c.V1.Sys.Timeouts.Connect = w.Int32(5) c.V1.Sys.Timeouts.Idle = w.Int32(43200) c.V1.Sys.Resolvers.EnableSystemNameservers = w.Bool(false) + c.V1.Sys.MaxConnections = w.Int32(350) return c } diff --git a/api/config/pg_gateway/config_request.pb.go b/api/config/pg_gateway/config_request.pb.go index e313bdf9c3b..136b956c737 100644 --- a/api/config/pg_gateway/config_request.pb.go +++ b/api/config/pg_gateway/config_request.pb.go @@ -124,12 +124,13 @@ type ConfigRequest_V1_System struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Mlsa *shared.Mlsa `protobuf:"bytes,1,opt,name=mlsa,proto3" json:"mlsa,omitempty" toml:"mlsa,omitempty" mapstructure:"mlsa,omitempty"` - Service *ConfigRequest_V1_System_Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty" toml:"service,omitempty" mapstructure:"service,omitempty"` - Tls *shared.TLSCredentials `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty" toml:"tls,omitempty" mapstructure:"tls,omitempty"` - Log *shared.Log `protobuf:"bytes,4,opt,name=log,proto3" json:"log,omitempty" toml:"log,omitempty" mapstructure:"log,omitempty"` - Timeouts *ConfigRequest_V1_System_Timeouts `protobuf:"bytes,5,opt,name=timeouts,proto3" json:"timeouts,omitempty" toml:"timeouts,omitempty" mapstructure:"timeouts,omitempty"` - Resolvers *ConfigRequest_V1_System_Resolvers `protobuf:"bytes,6,opt,name=resolvers,proto3" json:"resolvers,omitempty" toml:"resolvers,omitempty" mapstructure:"resolvers,omitempty"` + Mlsa *shared.Mlsa `protobuf:"bytes,1,opt,name=mlsa,proto3" json:"mlsa,omitempty" toml:"mlsa,omitempty" mapstructure:"mlsa,omitempty"` + Service *ConfigRequest_V1_System_Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty" toml:"service,omitempty" mapstructure:"service,omitempty"` + Tls *shared.TLSCredentials `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty" toml:"tls,omitempty" mapstructure:"tls,omitempty"` + Log *shared.Log `protobuf:"bytes,4,opt,name=log,proto3" json:"log,omitempty" toml:"log,omitempty" mapstructure:"log,omitempty"` + Timeouts *ConfigRequest_V1_System_Timeouts `protobuf:"bytes,5,opt,name=timeouts,proto3" json:"timeouts,omitempty" toml:"timeouts,omitempty" mapstructure:"timeouts,omitempty"` + Resolvers *ConfigRequest_V1_System_Resolvers `protobuf:"bytes,6,opt,name=resolvers,proto3" json:"resolvers,omitempty" toml:"resolvers,omitempty" mapstructure:"resolvers,omitempty"` + MaxConnections *wrapperspb.Int32Value `protobuf:"bytes,7,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty" toml:"max_connections,omitempty" mapstructure:"max_connections,omitempty"` } func (x *ConfigRequest_V1_System) Reset() { @@ -206,6 +207,13 @@ func (x *ConfigRequest_V1_System) GetResolvers() *ConfigRequest_V1_System_Resolv return nil } +func (x *ConfigRequest_V1_System) GetMaxConnections() *wrapperspb.Int32Value { + if x != nil { + return x.MaxConnections + } + return nil +} + type ConfigRequest_V1_System_Resolvers struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -468,18 +476,18 @@ var file_config_pg_gateway_config_request_proto_rawDesc = []byte{ 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x32, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, + 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf1, 0x0b, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x70, 0x67, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0x52, 0x02, - 0x76, 0x31, 0x1a, 0xbc, 0x0a, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x49, 0x0a, 0x03, 0x73, 0x79, 0x73, + 0x76, 0x31, 0x1a, 0x82, 0x0b, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x49, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x70, 0x67, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, - 0x03, 0x73, 0x79, 0x73, 0x1a, 0xea, 0x09, 0x0a, 0x06, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, + 0x03, 0x73, 0x79, 0x73, 0x1a, 0xb0, 0x0a, 0x0a, 0x06, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x34, 0x0a, 0x04, 0x6d, 0x6c, 0x73, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4d, 0x6c, 0x73, 0x61, 0x52, @@ -508,62 +516,66 @@ var file_config_pg_gateway_config_request_proto_rawDesc = []byte{ 0x77, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, - 0x1a, 0xa3, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, 0x3e, - 0x0a, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x12, 0x44, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xa3, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x19, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x1a, 0xad, 0x01, 0x0a, + 0x08, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x69, 0x73, 0x5f, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, + 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x69, 0x73, 0x44, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x12, 0x36, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x56, - 0x0a, 0x19, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x17, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x1a, 0xad, 0x01, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x08, 0x69, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x36, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0xd4, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x42, 0x15, 0xc2, 0xf3, 0x18, 0x11, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x10, 0xa1, 0x4f, 0x1a, 0x03, 0x74, 0x63, 0x70, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x12, 0x60, 0x0a, 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, - 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x69, 0x6e, - 0x66, 0x72, 0x61, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x52, 0x12, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, - 0x71, 0x6c, 0x12, 0x63, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5f, 0x6e, 0x6f, 0x64, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, - 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x70, - 0x67, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x73, - 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x1a, 0x72, 0x0a, - 0x08, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x12, 0x2f, 0x0a, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x69, 0x64, 0x6c, - 0x65, 0x3a, 0x19, 0xc2, 0xf3, 0x18, 0x15, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, - 0x65, 0x2d, 0x70, 0x67, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x42, 0x30, 0x5a, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, - 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x70, 0x67, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x04, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0xd4, 0x02, 0x0a, + 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x46, + 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x15, 0xc2, 0xf3, 0x18, 0x11, 0x0a, + 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0xa1, 0x4f, 0x1a, 0x03, 0x74, 0x63, 0x70, + 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x60, 0x0a, 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x61, 0x74, 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, + 0x65, 0x73, 0x71, 0x6c, 0x52, 0x12, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x6f, + 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x12, 0x63, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x73, + 0x65, 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, + 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x69, + 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x70, 0x67, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, + 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x52, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x04, 0x08, + 0x03, 0x10, 0x04, 0x1a, 0x72, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x12, + 0x35, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x3a, 0x19, 0xc2, 0xf3, 0x18, 0x15, 0x0a, 0x13, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2d, 0x70, 0x67, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x70, 0x67, 0x5f, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -590,9 +602,9 @@ var file_config_pg_gateway_config_request_proto_goTypes = []interface{}{ (*shared.Mlsa)(nil), // 7: chef.automate.infra.config.Mlsa (*shared.TLSCredentials)(nil), // 8: chef.automate.infra.config.TLSCredentials (*shared.Log)(nil), // 9: chef.automate.infra.config.Log - (*wrapperspb.StringValue)(nil), // 10: google.protobuf.StringValue - (*wrapperspb.BoolValue)(nil), // 11: google.protobuf.BoolValue - (*wrapperspb.Int32Value)(nil), // 12: google.protobuf.Int32Value + (*wrapperspb.Int32Value)(nil), // 10: google.protobuf.Int32Value + (*wrapperspb.StringValue)(nil), // 11: google.protobuf.StringValue + (*wrapperspb.BoolValue)(nil), // 12: google.protobuf.BoolValue (*shared.External_Postgresql)(nil), // 13: chef.automate.infra.config.External.Postgresql } var file_config_pg_gateway_config_request_proto_depIdxs = []int32{ @@ -604,22 +616,23 @@ var file_config_pg_gateway_config_request_proto_depIdxs = []int32{ 9, // 5: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.log:type_name -> chef.automate.infra.config.Log 6, // 6: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.timeouts:type_name -> chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Timeouts 3, // 7: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.resolvers:type_name -> chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Resolvers - 10, // 8: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Resolvers.nameservers:type_name -> google.protobuf.StringValue - 11, // 9: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Resolvers.enable_system_nameservers:type_name -> google.protobuf.BoolValue - 11, // 10: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Endpoint.is_domain:type_name -> google.protobuf.BoolValue - 10, // 11: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Endpoint.address:type_name -> google.protobuf.StringValue - 10, // 12: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Endpoint.port:type_name -> google.protobuf.StringValue - 10, // 13: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Service.host:type_name -> google.protobuf.StringValue - 12, // 14: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Service.port:type_name -> google.protobuf.Int32Value - 13, // 15: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Service.external_postgresql:type_name -> chef.automate.infra.config.External.Postgresql - 4, // 16: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Service.parsed_nodes:type_name -> chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Endpoint - 12, // 17: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Timeouts.connect:type_name -> google.protobuf.Int32Value - 12, // 18: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Timeouts.idle:type_name -> google.protobuf.Int32Value - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 10, // 8: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.max_connections:type_name -> google.protobuf.Int32Value + 11, // 9: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Resolvers.nameservers:type_name -> google.protobuf.StringValue + 12, // 10: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Resolvers.enable_system_nameservers:type_name -> google.protobuf.BoolValue + 12, // 11: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Endpoint.is_domain:type_name -> google.protobuf.BoolValue + 11, // 12: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Endpoint.address:type_name -> google.protobuf.StringValue + 11, // 13: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Endpoint.port:type_name -> google.protobuf.StringValue + 11, // 14: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Service.host:type_name -> google.protobuf.StringValue + 10, // 15: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Service.port:type_name -> google.protobuf.Int32Value + 13, // 16: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Service.external_postgresql:type_name -> chef.automate.infra.config.External.Postgresql + 4, // 17: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Service.parsed_nodes:type_name -> chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Endpoint + 10, // 18: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Timeouts.connect:type_name -> google.protobuf.Int32Value + 10, // 19: chef.automate.infra.pg_gateway.ConfigRequest.V1.System.Timeouts.idle:type_name -> google.protobuf.Int32Value + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_config_pg_gateway_config_request_proto_init() } diff --git a/api/config/pg_gateway/config_request.proto b/api/config/pg_gateway/config_request.proto index 7559fb70c6b..921b9655435 100644 --- a/api/config/pg_gateway/config_request.proto +++ b/api/config/pg_gateway/config_request.proto @@ -23,6 +23,7 @@ message ConfigRequest { chef.automate.infra.config.Log log = 4; Timeouts timeouts = 5; Resolvers resolvers = 6; + google.protobuf.Int32Value max_connections = 7; message Resolvers { repeated google.protobuf.StringValue nameservers = 1; diff --git a/components/automate-backend-postgresql/habitat/default.toml b/components/automate-backend-postgresql/habitat/default.toml index c9f69030d66..fc8d721f1bd 100644 --- a/components/automate-backend-postgresql/habitat/default.toml +++ b/components/automate-backend-postgresql/habitat/default.toml @@ -3,7 +3,7 @@ host = '0.0.0.0' print_db_statistics = true -max_connections = 350 +max_connections = 1500 max_locks_per_transaction = 64 max_wal_size = "1GB" min_wal_size = "80MB" @@ -40,4 +40,9 @@ path = "/hab/svc/automate-ha-postgresql/data/pg_dump" [ssl] enable = true # tls 1.2 ciphersuite (to exclude tlsv1 and tlsv1.1) -tls_ciphers = "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256" \ No newline at end of file +tls_ciphers = "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256"# server public cert used for ssl listener +ssl_cert = """""" +# server private key +ssl_key = """""" +# issuer public cert that signed the above server public cert +issuer_cert = """""" diff --git a/components/automate-deployment/pkg/deployment/deployment.go b/components/automate-deployment/pkg/deployment/deployment.go index c52b3e02057..1063c130865 100644 --- a/components/automate-deployment/pkg/deployment/deployment.go +++ b/components/automate-deployment/pkg/deployment/deployment.go @@ -15,7 +15,7 @@ import ( dc "github.com/chef/automate/api/config/deployment" api "github.com/chef/automate/api/interservice/deployment" "github.com/chef/automate/components/automate-deployment/pkg/certauthority" - globalconfig "github.com/chef/automate/components/automate-deployment/pkg/globalConfig" + "github.com/chef/automate/components/automate-deployment/pkg/globalconfig" "github.com/chef/automate/components/automate-deployment/pkg/habpkg" "github.com/chef/automate/components/automate-deployment/pkg/manifest" "github.com/chef/automate/components/automate-deployment/pkg/services" diff --git a/components/automate-pg-gateway/habitat/config/haproxy.conf b/components/automate-pg-gateway/habitat/config/haproxy.conf index 6ca604ae837..2725d2b0bab 100644 --- a/components/automate-pg-gateway/habitat/config/haproxy.conf +++ b/components/automate-pg-gateway/habitat/config/haproxy.conf @@ -55,10 +55,10 @@ backend automate_postgresql {{~#if ../cfg.resolvers.nameservers }} server-template {{node.address}} 8 {{node.address}}:{{node.port}} check resolvers pgdns init-addr none resolve-prefer ipv4 {{else}} - server {{node.address}} {{node.address}}:{{node.port}} maxconn 350 check port 6432 + server {{node.address}} {{node.address}}:{{node.port}} maxconn {{cfg.max_connections}} check port 6432 {{~/if}} {{else}} - server {{node.address}} {{node.address}}:{{node.port}} maxconn 350 check port 6432 + server {{node.address}} {{node.address}}:{{node.port}} maxconn {{cfg.max_connections}} check port 6432 {{~/if}} {{~/each}} {{else~}} From 7e4ea92e76dd0a4a89aeb1c2e801a7e2b7248f3a Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Fri, 13 Sep 2024 16:07:12 +0530 Subject: [PATCH 10/12] fix policy Signed-off-by: Vivek Shankar --- components/automate-deployment/pkg/target/hab_cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/automate-deployment/pkg/target/hab_cmd.go b/components/automate-deployment/pkg/target/hab_cmd.go index 8f9509faf19..942dc3ffc7d 100644 --- a/components/automate-deployment/pkg/target/hab_cmd.go +++ b/components/automate-deployment/pkg/target/hab_cmd.go @@ -9,7 +9,7 @@ import ( "github.com/sirupsen/logrus" - globalconfig "github.com/chef/automate/components/automate-deployment/pkg/globalConfig" + "github.com/chef/automate/components/automate-deployment/pkg/globalconfig" "github.com/chef/automate/components/automate-deployment/pkg/habpkg" "github.com/chef/automate/lib/platform/command" "github.com/chef/automate/lib/stringutils" From 4680ca8df83a759829dd876098539e866b14f1e5 Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Fri, 13 Sep 2024 16:37:32 +0530 Subject: [PATCH 11/12] fix policy Signed-off-by: Vivek Shankar --- components/automate-cs-nginx/habitat/plan.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/components/automate-cs-nginx/habitat/plan.sh b/components/automate-cs-nginx/habitat/plan.sh index 39d4d7431c8..06002433950 100644 --- a/components/automate-cs-nginx/habitat/plan.sh +++ b/components/automate-cs-nginx/habitat/plan.sh @@ -19,17 +19,8 @@ pkg_deps=( # chef-server-* packages are pinned to the versions required by the # chef-server-* packages. # -<<<<<<< HEAD -<<<<<<< HEAD core/curl core/ruby30 -======= - core/curl/7.79.1/20240105235730 -======= - core/curl ->>>>>>> f8317eed6 (review comments) - core/ruby27 ->>>>>>> 0366bc6c0 (updated working patch health check config for provided services) # WARNING: Version pin managed by .expeditor/update_chef_server.sh "${vendor_origin}/chef-server-nginx/15.10.12/20240910074923" "${vendor_origin}/chef-server-ctl/15.10.12/20240910074330" From b96c4c96506d204e0b18188981cd81b3d45d3eea Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Fri, 13 Sep 2024 18:07:45 +0530 Subject: [PATCH 12/12] revert pg Signed-off-by: Vivek Shankar --- .../automate-backend-postgresql/habitat/default.toml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/components/automate-backend-postgresql/habitat/default.toml b/components/automate-backend-postgresql/habitat/default.toml index fc8d721f1bd..17d5dacf610 100644 --- a/components/automate-backend-postgresql/habitat/default.toml +++ b/components/automate-backend-postgresql/habitat/default.toml @@ -40,9 +40,4 @@ path = "/hab/svc/automate-ha-postgresql/data/pg_dump" [ssl] enable = true # tls 1.2 ciphersuite (to exclude tlsv1 and tlsv1.1) -tls_ciphers = "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256"# server public cert used for ssl listener -ssl_cert = """""" -# server private key -ssl_key = """""" -# issuer public cert that signed the above server public cert -issuer_cert = """""" +tls_ciphers = "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256"