diff --git a/.gitignore b/.gitignore index a406c27..dab8c09 100644 --- a/.gitignore +++ b/.gitignore @@ -317,9 +317,9 @@ flycheck_*.el ### VisualStudioCode template .vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json +# !.vscode/settings.json +# !.vscode/tasks.json +# !.vscode/launch.json !.vscode/extensions.json *.code-workspace diff --git a/CHANGELOG/README.md b/CHANGELOG/README.md index 3297189..f5412c3 100644 --- a/CHANGELOG/README.md +++ b/CHANGELOG/README.md @@ -1,5 +1,22 @@ # Changelog +## 2023-10-24 + +Release v1.5.0-beta + ++ Enhancement & New Features + + Support PolarDB-X Standard(XStore) dashboard + + Remove *Cluster IP* dependency on the paxos communication improving some performance + + Support cross-cluster point-in-time recovery(PITR) + + Support collecting DN logs including sql, error, slow logs + + Support uploading and downloading backupset by Simple Storage Service (S3) ++ Bug Fix + + Fix failing to delete the cluster when its gms is not available + + Fix failing to delele rebuild job when the *fromPod* does not exist + + Fix disk util alert issue. [#21](https://github.com/polardb/polardbx-operator/issues/21) + + Fix helm template issue when set tolerations. [#25](https://github.com/polardb/polardbx-operator/issues/25) + + Fix failing to create backup when *serviceName* of PolarDBXCluster differs from its *name* + ## 2023-04-12 Release v1.4.1 diff --git a/api/v1/common/version.go b/api/v1/common/version.go new file mode 100644 index 0000000..7f859bb --- /dev/null +++ b/api/v1/common/version.go @@ -0,0 +1,9 @@ +package common + +const ( + AnnotationOperatorCreateVersion = "polardbx-operator/create-version" +) + +func NeedCheckPodClusterIp(version string) bool { + return version == "" +} diff --git a/api/v1/polardbx/backup_storage.go b/api/v1/polardbx/backup_storage.go index eb34734..977cbbd 100644 --- a/api/v1/polardbx/backup_storage.go +++ b/api/v1/polardbx/backup_storage.go @@ -35,8 +35,9 @@ type BackupStorageProvider struct { type BackupStorage string const ( - OSS BackupStorage = "oss" - SFTP BackupStorage = "sftp" + OSS BackupStorage = "oss" + SFTP BackupStorage = "sftp" + MINIO BackupStorage = "s3" ) // BackupStorageFilestreamAction records filestream actions related to specified backup storage @@ -60,6 +61,12 @@ func NewBackupStorageFilestreamAction(storage BackupStorage) (*BackupStorageFile Upload: filestream.UploadSsh, List: filestream.ListSsh, }, nil + case MINIO: + return &BackupStorageFilestreamAction{ + Download: filestream.DownloadMinio, + Upload: filestream.UploadMinio, + List: filestream.ListMinio, + }, nil default: return nil, errors.New("invalid storage: " + string(storage)) } diff --git a/api/v1/polardbx/config.go b/api/v1/polardbx/config.go index b65be1b..46bfb70 100644 --- a/api/v1/polardbx/config.go +++ b/api/v1/polardbx/config.go @@ -24,7 +24,8 @@ import ( type CNStaticConfig struct { AttendHtap bool `json:"AttendHtap,omitempty"` // +kubebuilder:default=true - EnableCoroutine bool `json:"EnableCoroutine,omitempty"` + // +optional + EnableCoroutine bool `json:"EnableCoroutine"` EnableReplicaRead bool `json:"EnableReplicaRead,omitempty"` EnableJvmRemoteDebug bool `json:"EnableJvmRemoteDebug,omitempty"` ServerProperties map[string]intstr.IntOrString `json:"ServerProperties,omitempty"` diff --git a/api/v1/polardbx/parameter.go b/api/v1/polardbx/parameter.go index 6c6687b..54bb239 100644 --- a/api/v1/polardbx/parameter.go +++ b/api/v1/polardbx/parameter.go @@ -24,6 +24,8 @@ const ( type ParameterTemplate struct { // parameter template // +optional + Namespace string `json:"namespace,omitempty"` + // +optional Name string `json:"name,omitempty"` } diff --git a/api/v1/polardbx/topology.go b/api/v1/polardbx/topology.go index e59a41a..0521f9a 100644 --- a/api/v1/polardbx/topology.go +++ b/api/v1/polardbx/topology.go @@ -37,6 +37,7 @@ type NodeSelectorReference struct { type StatelessTopologyRuleItem struct { Name string `json:"name,omitempty"` + ExtraName string `json:"extraName,omitempty"` Replicas *intstr.IntOrString `json:"replicas,omitempty"` NodeSelector *NodeSelectorReference `json:"selector,omitempty"` } @@ -210,17 +211,31 @@ type TopologyNodeCN struct { type TopologyNodeCDC struct { // +kubebuilder:default=2 - // +kubebuilder:validation:Minimum=0 - Replicas int32 `json:"replicas,omitempty"` + Replicas intstr.IntOrString `json:"replicas,omitempty"` // +kubebuilder:validation:Minimum=0 - XReplicas int32 `json:"xReplicas,omitempty"` + XReplicas int `json:"xReplicas,omitempty"` // +kubebuilder:default={resources: {limits: {cpu: 4, memory: "8Gi"}}} Template CDCTemplate `json:"template,omitempty"` + + Groups []*CdcGroup `json:"groups,omitempty"` +} + +type CdcGroup struct { + Name string `json:"name,omitempty"` + + // +kubebuilder:default=2 + // +kubebuilder:validation:Minimum=0 + + Replicas int32 `json:"replicas,omitempty"` + + Template *CDCTemplate `json:"template,omitempty"` + + Config CDCConfig `json:"config,omitempty"` } type TopologyNodeColumnar struct { diff --git a/api/v1/polardbx/zz_generated.deepcopy.go b/api/v1/polardbx/zz_generated.deepcopy.go index be094e0..d546b21 100644 --- a/api/v1/polardbx/zz_generated.deepcopy.go +++ b/api/v1/polardbx/zz_generated.deepcopy.go @@ -175,6 +175,27 @@ func (in *CNTemplate) DeepCopy() *CNTemplate { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CdcGroup) DeepCopyInto(out *CdcGroup) { + *out = *in + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(CDCTemplate) + (*in).DeepCopyInto(*out) + } + in.Config.DeepCopyInto(&out.Config) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CdcGroup. +func (in *CdcGroup) DeepCopy() *CdcGroup { + if in == nil { + return nil + } + out := new(CdcGroup) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterReplicasStatus) DeepCopyInto(out *ClusterReplicasStatus) { *out = *in @@ -670,7 +691,19 @@ func (in *Topology) DeepCopy() *Topology { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TopologyNodeCDC) DeepCopyInto(out *TopologyNodeCDC) { *out = *in + out.Replicas = in.Replicas in.Template.DeepCopyInto(&out.Template) + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]*CdcGroup, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(CdcGroup) + (*in).DeepCopyInto(*out) + } + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologyNodeCDC. diff --git a/api/v1/polardbxcluster_types.go b/api/v1/polardbxcluster_types.go index 9fd14a8..c43588f 100644 --- a/api/v1/polardbxcluster_types.go +++ b/api/v1/polardbxcluster_types.go @@ -131,6 +131,9 @@ type PolarDBXClusterStatus struct { //PitrStatus represents the status of the pitr restore PitrStatus *polardbx.PitrStatus `json:"pitrStatus,omitempty"` + + //LatestSyncReadonlyTs represents the lastest time sync readonly storage info to metadb + ReadonlyStorageInfoHash string `json:"readonlyStorageInfoHash,omitempty"` } // +kubebuilder:object:root=true diff --git a/api/v1/xstore/parameter.go b/api/v1/xstore/parameter.go index 9773134..5579e1c 100644 --- a/api/v1/xstore/parameter.go +++ b/api/v1/xstore/parameter.go @@ -19,6 +19,8 @@ package xstore type ParameterTemplate struct { // Parameter template // +optional + Namespace string `json:"namespace,omitempty"` + // +optional Name string `json:"name,omitempty"` } diff --git a/api/v1/xstore/topology.go b/api/v1/xstore/topology.go index 79ae382..992745b 100644 --- a/api/v1/xstore/topology.go +++ b/api/v1/xstore/topology.go @@ -37,7 +37,7 @@ type NodeSpec struct { // +kubebuilder:default=false - // HostNetwork defines whether the node uses the host network. Default is true. + // HostNetwork defines whether the node uses the host network. Default is false. HostNetwork *bool `json:"hostNetwork,omitempty"` // Affinity defines the affinity of the node (pod). diff --git a/api/v1/xstore_follower_types.go b/api/v1/xstore_follower_types.go index 54f733c..255d8f1 100644 --- a/api/v1/xstore_follower_types.go +++ b/api/v1/xstore_follower_types.go @@ -75,9 +75,6 @@ type XStoreFollowerStatus struct { //CurrentJobTask represents the task name of the current job CurrentJobTask string `json:"currentJobTask,omitempty"` - //ElectionWeight represents the election weight of target pod - ElectionWeight int `json:"electionWeight,omitempty"` - //TargetPodName represents the target pod name TargetPodName string `json:"targetPodName,omitempty"` diff --git a/build/images/xstore-tools/Dockerfile b/build/images/xstore-tools/Dockerfile index 254ee56..3a59139 100644 --- a/build/images/xstore-tools/Dockerfile +++ b/build/images/xstore-tools/Dockerfile @@ -65,7 +65,7 @@ RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -tags polardbx -o polardbx- # Build the image with scripts -FROM polardbx/xstore-tools-base:v1.4.1 +FROM polardbx/xstore-tools-base:ts20231018152345 ARG VERSION=test diff --git a/charts/polardbx-logcollector/Chart.yaml b/charts/polardbx-logcollector/Chart.yaml index 6db8a1a..765659c 100644 --- a/charts/polardbx-logcollector/Chart.yaml +++ b/charts/polardbx-logcollector/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: polardbx-logcollector description: Helm chart of polardbx-operator logcollector plugin type: application -version: 1.4.1 -appVersion: v1.4.1 +version: 1.5.0-beta +appVersion: v1.5.0-beta keywords: - polardb-x - operator diff --git a/charts/polardbx-logcollector/templates/configmap/filebeat-configmap.yaml b/charts/polardbx-logcollector/templates/configmap/filebeat-configmap.yaml index 6de1d1e..4f2dfc5 100644 --- a/charts/polardbx-logcollector/templates/configmap/filebeat-configmap.yaml +++ b/charts/polardbx-logcollector/templates/configmap/filebeat-configmap.yaml @@ -50,6 +50,71 @@ data: pattern: '^\[[0-9]{4}-[0-9]{2}-[0-9]{2}' negate: true match: after + - condition: + and: + - equals: + kubernetes.labels.polardbx/enableAuditLog: "true" + - or: + - equals: + kubernetes.labels.polardbx/role: dn + - equals: + kubernetes.labels.polardbx/role: gms + config: + - type: filestream + id: dn-audit-log-filestream + prospector.scanner.check_interval: 1s + buffer_size: 1048576 + # close.reader.after_interval: 50s + fields: + log_type: dn_audit_log + instance_id: ${data.kubernetes.labels.polardbx/name} + dn_instance_id: ${data.kubernetes.labels.xstore/name} + pod_name: ${data.kubernetes.pod.name} + node_name: ${data.kubernetes.node.name} + paths: + #alog must in mysql/*/*.alog + - {{ .Values.filebeat.dnDataHostPathPrefix }}/${data.kubernetes.namespace}/${data.kubernetes.pod.name}/tmp/*.alog + parsers: + - multiline: + type: pattern + pattern: '.*\x01$' + negate: true + match: before + - condition: + or: + - equals: + kubernetes.labels.polardbx/role: dn + - equals: + kubernetes.labels.polardbx/role: gms + config: + - type: filestream + id: dn-slow-log-filestream + prospector.scanner.check_interval: 1s + fields: + log_type: dn_slow_log + instance_id: ${data.kubernetes.labels.polardbx/name} + dn_instance_id: ${data.kubernetes.labels.xstore/name} + pod_name: ${data.kubernetes.pod.name} + node_name: ${data.kubernetes.node.name} + paths: + - {{ .Values.filebeat.dnDataHostPathPrefix }}/${data.kubernetes.namespace}/${data.kubernetes.pod.name}/data/mysql/slow_log_*.CSV + - type: filestream + id: dn-error-log-filestream + prospector.scanner.check_interval: 1s + fields: + log_type: dn_error_log + instance_id: ${data.kubernetes.labels.polardbx/name} + dn_instance_id: ${data.kubernetes.labels.xstore/name} + pod_name: ${data.kubernetes.pod.name} + node_name: ${data.kubernetes.node.name} + paths: + - {{ .Values.filebeat.dnDataHostPathPrefix }}/${data.kubernetes.namespace}/${data.kubernetes.pod.name}/log/alert.log + parsers: + - multiline: + type: pattern + pattern: '^\d{4}-\d{2}-\d{2}|^\[\d{4}-\d{2}-\d{2}' + negate: true + match: after processors: - drop_fields: @@ -57,7 +122,10 @@ data: ignore_missing: false - + # output.file: + # path: "/tmp/filebeat" + # filename: filebeat + #output.console: # enable: false # codec.json: diff --git a/charts/polardbx-logcollector/templates/configmap/logstash-pipeline-configmap.yaml b/charts/polardbx-logcollector/templates/configmap/logstash-pipeline-configmap.yaml index 6cb6295..9395490 100644 --- a/charts/polardbx-logcollector/templates/configmap/logstash-pipeline-configmap.yaml +++ b/charts/polardbx-logcollector/templates/configmap/logstash-pipeline-configmap.yaml @@ -8,59 +8,164 @@ data: } filter { + if [fields][log_type] in ["cn_sql_log","cn_slow_log"] { + polardbx { + } + date{ + match => ["timestamp", "UNIX_MS","ISO8601"] + timezone => "{{ .Values.logstash.timezone.name }}" + } - if [fields][log_type] in ["cn_sql_log","cn_slow_log"] { + mutate{ + remove_field => ["event", "timestamp","[message][begin_time]","[message][timestamp]"] + add_field => { "[@metadata][target_index]" => "%{[fields][log_type]}-%{+YYYY.MM.dd}" } + } - polardbx { - } - date{ - match => ["timestamp", "UNIX_MS","ISO8601"] - timezone => "{{ .Values.logstash.timezone.name }}" - } + } else if [fields][log_type] == "cn_tddl_log" { + grok{ + match => { "message" => "%{TIMESTAMP_ISO8601:timestamp} \[%{DATA:thread}\] %{LOGLEVEL:loglevel} %{DATA:logger} - %{JAVALOGMESSAGE:messagetmp}" } + } + date{ + match => ["timestamp","ISO8601"] + timezone => "{{ .Values.logstash.timezone.name }}" + } + mutate{ + remove_field => ["event","timestamp"] + rename => {"messagetmp" => "message"} + add_field => { "[@metadata][target_index]" => "%{[fields][log_type]}-%{+YYYY.MM.dd}" } + } + + } else if [fields][log_type] == "dn_audit_log" { + ruby { + code => ' + fields = ["version", "thread_id", "host_or_ip", "user", "db", "start_utime", "transaction_utime", "error_code", "time_cost_us", "send_rows", "updated_rows", "examined_rows", "memory_used", "memory_used_by_query", "logical_read", "physical_sync_read", "physical_async_read", "temp_user_table_size", "temp_sort_table_size", "temp_sort_file_size", "sql_command", "is_super", "lock_wait_time_us", "log_message"] + parts = event.get("message").split("\t",24) + parts[-1] = parts[-1].chomp("\u0001") + fields.each_with_index do |field, index| + event.set(field, parts[index]) + end + event.set("timestamp_ms", event.get("start_utime").to_i / 1000 ) + ' + } + mutate { + convert => { + "thread_id" => "integer" + "start_utime" => "integer" + "transaction_utime" => "integer" + "error_code" => "integer" + "time_cost_us" => "integer" + "send_rows" => "integer" + "updated_rows" => "integer" + "examined_rows" => "integer" + "memory_used" => "integer" + "memory_used_by_query" => "integer" + "logical_read" => "integer" + "physical_sync_read" => "integer" + "physical_async_read" => "integer" + "temp_user_table_size" => "integer" + "temp_sort_table_size" => "integer" + "temp_sort_file_size" => "integer" + "sql_command" => "integer" + "is_super" => "integer" + "lock_wait_time_us" => "integer" + } + } + date { + match => ["timestamp_ms", "UNIX_MS"] + timezone => "Asia/Shanghai" + target => "@timestamp" + } + if "_mutate_error" not in [tags] and "_rubyexception" not in [tags] and "_dateparsefailure" not in [tags] { + mutate { + remove_field => ["message","timestamp_ms"] + } + } + mutate{ + remove_field => ["event"] + add_field => { "[@metadata][target_index]" => "%{[fields][log_type]}-%{+YYYY.MM.dd}" } + } - mutate{ - remove_field => ["event", "timestamp","[message][begin_time]","[message][timestamp]"] - add_field => { "[@metadata][target_index]" => "%{[fields][log_type]}-%{+YYYY.MM.dd}" } - } + } else if [fields][log_type] == "dn_slow_log" { + csv { + columns => ["start_time","user_host", "query_time_us", "lock_time_us", "rows_sent", "rows_examined", "db", "last_insert_id", "insert_id", "server_id", "sql_text", "thread_id"] + convert => { + "rows_sent" => "integer" + "rows_examined" => "integer" + "last_insert_id" => "integer" + "insert_id" => "integer" + "server_id" => "integer" + "thread_id" => "integer" + } + } + date { + match => ["start_time", "yyyy-MM-dd HH:mm:ss.SSSSSS", "ISO8601"] + timezone => "{{ .Values.logstash.timezone.name }}" + target => "@timestamp" + } + ruby{ + code => " + require 'time'; + def time_to_us(str) + h, m, s_us = str.split(':') + s, us = s_us.split('.') + us_all = (h.to_i * 3600 + m.to_i * 60 + s.to_i) * 1000000 + us.to_i + end + event.set('query_time_us', time_to_us(event.get('query_time_us'))) + event.set('lock_time_us', time_to_us(event.get('lock_time_us'))) + " + } + if "_dateparsefailure" not in [tags] and "_rubyexception" not in [tags] { + mutate { remove_field => ["message"]} + } + mutate { + remove_field => ["event"] + add_field => { + "[@metadata][target_index]" => "%{[fields][log_type]}-%{+YYYY.MM.dd}" + } + } - } else if [fields][log_type] == "cn_tddl_log" { + } else if [fields][log_type] == "dn_error_log" { + grok{ + match => { + "message" => "\[?%{TIMESTAMP_ISO8601:timestamp}\]?(?: %{NUMBER:thread:int})?(?: \[%{WORD:label}\])(?: \[%{NOTSPACE:error_code}\])?(?: \[%{WORD:subsystem}\])?%{GREEDYDATA:log_msg}" + } + } + date { + match => ["timestamp","yyyy-MM-dd HH:mm:ss.SSSSSS","ISO8601"] + timezone => "{{ .Values.logstash.timezone.name }}" + target => "@timestamp" + } + if "_dateparsefailure" not in [tags] and "_grokparsefailure" not in [tags] { + mutate { remove_field => ["message","timestamp"]} + } + mutate{ + remove_field => ["event"] + add_field => { + "[@metadata][target_index]" => "%{[fields][log_type]}-%{+YYYY.MM.dd}" + } + } - grok{ - match => { "message" => "%{TIMESTAMP_ISO8601:timestamp} \[%{DATA:thread}\] %{LOGLEVEL:loglevel} %{DATA:logger} - %{JAVALOGMESSAGE:messagetmp}" } - } - - date{ - match => ["timestamp","ISO8601"] - timezone => "{{ .Values.logstash.timezone.name }}" - } - - mutate{ - remove_field => ["event","timestamp"] - rename => {"messagetmp" => "message"} - add_field => { "[@metadata][target_index]" => "%{[fields][log_type]}-%{+YYYY.MM.dd}" } - } - - } else { - - mutate{ - add_field => { "[@metadata][target_index]" => "other_log-%{+YYYY.MM.dd}" } - } - - } + } else { + mutate{ + add_field => { "[@metadata][target_index]" => "other_log-%{+YYYY.MM.dd}" } + } + } } output { - #elasticsearch { - # hosts => ["https://quickstart-es-http:9200"] - # api_key => "I31aPIABxEEMom1PBQ7s:8sX1NA1sQP23k9rj7pHwWg" - # ssl => true - # cacert => "/usr/share/logstash/config/certs/ca.crt" - # index => "%{[@metadata][target_index]}" - # } - stdout { + # elasticsearch { + # hosts => ["https://quickstart-es-http.default:9200"] + # user => elastic + # password => "22SAj4Vt48N1vh15lPQX29rw" + # ssl => true + # cacert => "/usr/share/logstash/config/certs/ca.crt" + # index => "%{[@metadata][target_index]}" + # } + stdout { codec => rubydebug } + # sink { } } kind: ConfigMap metadata: diff --git a/charts/polardbx-logcollector/templates/log-collector-daemonset.yaml b/charts/polardbx-logcollector/templates/log-collector-daemonset.yaml index a0f2077..9900667 100644 --- a/charts/polardbx-logcollector/templates/log-collector-daemonset.yaml +++ b/charts/polardbx-logcollector/templates/log-collector-daemonset.yaml @@ -43,11 +43,17 @@ spec: - name: pod-path mountPath: /var/lib/kubelet/pods/ readOnly: true + - name: dn-data + mountPath: /data/xstore/ + readOnly: true terminationGracePeriodSeconds: 30 volumes: - name: pod-path hostPath: path: /var/lib/kubelet/pods/ + - name: dn-data + hostPath: + path: /data/xstore - name: filebeat-data-dir emptyDir: {} - name: filebeat-config-file diff --git a/charts/polardbx-logcollector/templates/log-collector-serviceaccount.yaml b/charts/polardbx-logcollector/templates/log-collector-serviceaccount.yaml index 03e725a..596378a 100644 --- a/charts/polardbx-logcollector/templates/log-collector-serviceaccount.yaml +++ b/charts/polardbx-logcollector/templates/log-collector-serviceaccount.yaml @@ -14,7 +14,12 @@ rules: - apiGroups: [""] resources: ["nodes","pods","namespaces"] verbs: ["get", "watch", "list"] - + - apiGroups: ["apps"] + resources: ["replicasets", "daemonsets"] + verbs: ["get", "watch", "list"] + - apiGroups: ["batch"] + resources: ["jobs"] + verbs: ["get", "watch", "list"] --- apiVersion: rbac.authorization.k8s.io/v1 diff --git a/charts/polardbx-logcollector/values.yaml b/charts/polardbx-logcollector/values.yaml index 9414b29..bff810b 100644 --- a/charts/polardbx-logcollector/values.yaml +++ b/charts/polardbx-logcollector/values.yaml @@ -39,6 +39,9 @@ logstash: livenessProbe: initialDelaySeconds: 30 periodSeconds: 30 + # Image pull secrets of logstash pods. + # imagePullSecrets: + # - name: xxxxx #configuration of filebeat deamonset filebeat: @@ -48,7 +51,7 @@ filebeat: #the image name of the filebeat name: filebeat #the image tag f the filebeat - version: 8.1.0 + version: 8.9.0 #the daemonset name of filebeat name: filebeat #the service account name of filebeat. the service account will be used to discover pods on the node. @@ -57,13 +60,15 @@ filebeat: #the resource of configuration of filebeat resources: limits: - memory: "512Mi" + memory: "1Gi" cpu: "1" requests: memory: "512Mi" cpu: "1" #hostpath prefix of the cn pod's empty dir volumes hostEmplyDirPathPrefix: /var/lib/kubelet/pods + #hostpath prefix of the dn pod's data volumes + dnDataHostPathPrefix: /data/xstore #the name of polardbxlogcollector instance. #command to get it : diff --git a/charts/polardbx-monitor/Chart.yaml b/charts/polardbx-monitor/Chart.yaml index 061cdb4..5484ae0 100644 --- a/charts/polardbx-monitor/Chart.yaml +++ b/charts/polardbx-monitor/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: polardbx-monitor description: Helm chart of polardbx-operator monitor plugin type: application -version: 1.4.1 -appVersion: v1.4.1 +version: 1.5.0-beta +appVersion: v1.5.0-beta keywords: - polardb-x - operator diff --git a/charts/polardbx-monitor/dashboard/xstore-overview.json b/charts/polardbx-monitor/dashboard/xstore-overview.json new file mode 100644 index 0000000..1171d26 --- /dev/null +++ b/charts/polardbx-monitor/dashboard/xstore-overview.json @@ -0,0 +1,2915 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "PolarDB-X standard dashboard", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "iteration": 1696148501338, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [], + "title": "Overview", + "type": "row" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 80 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 0, + "y": 1 + }, + "id": 8, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "8.5.27", + "targets": [ + { + "exemplar": true, + "expr": "sum(\n polardbx_container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", container=\"engine\"}\n * on(namespace,pod)\n group_left() (sum (mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\",xstore_role=\"leader\"} > 0) by (namespace, pod))\n)/\nsum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", container=\"engine\", resource=\"cpu\", unit=\"core\"}\n * on(namespace,pod)\n group_left() (sum (mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\",xstore_role=\"leader\"} > 0) by (namespace, pod))\n)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "CPU", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(\n container_memory_working_set_bytes{namespace=\"$namespace\", container=\"engine\", id=~\"^/kubepods.*\"}\n * on(namespace,pod)\n group_left() (sum (mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\", xstore_role=\"leader\"} > 0) by (namespace, pod))\n)/\nsum(\n kube_pod_container_resource_limits{namespace=\"$namespace\", container=\"engine\", resource=\"memory\", unit=\"byte\"}\n * on(namespace,pod)\n group_left() (sum (mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\", xstore_role=\"leader\"} > 0) by (namespace, pod))\n)", + "hide": false, + "interval": "", + "legendFormat": "MEM", + "refId": "D" + } + ], + "title": "Resource Overview", + "type": "bargauge" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 5, + "y": 1 + }, + "id": 17, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "8.5.27", + "targets": [ + { + "exemplar": true, + "expr": "sum(\n irate(container_network_receive_bytes_total{namespace=\"$namespace\"}[1m])\n* on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\"}\n)", + "instant": true, + "interval": "", + "legendFormat": "Recv/s", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(\n irate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[1m])\n* on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\"}\n)", + "hide": false, + "interval": "", + "legendFormat": "Sent/s", + "refId": "B" + } + ], + "title": "Network", + "type": "bargauge" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 9, + "y": 1 + }, + "id": 15, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.5.27", + "targets": [ + { + "exemplar": true, + "expr": "sum(irate(mysql_global_status_queries{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "instant": true, + "interval": "", + "legendFormat": "Logical", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "QPS", + "type": "stat" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 15, + "y": 1 + }, + "id": 67, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.5.27", + "targets": [ + { + "exemplar": true, + "expr": "sum(mysql_global_status_innodb_buffer_pool_bytes_data{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}) by (xstore_name)", + "instant": true, + "interval": "", + "legendFormat": "Logical", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Buffer Pool Size", + "type": "stat" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 9, + "y": 5 + }, + "id": 14, + "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "8.5.27", + "targets": [ + { + "exemplar": true, + "expr": " sum(mysql_global_status_threads_running{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"})\n", + "instant": true, + "interval": "", + "legendFormat": "Threads(Running)", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": " sum(mysql_global_status_threads_connected{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"})", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Threads(Connected)", + "refId": "B" + } + ], + "title": "Connections/Threads", + "type": "bargauge" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 15, + "y": 5 + }, + "id": 68, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.5.27", + "targets": [ + { + "exemplar": true, + "expr": "sum(mysql_global_status_uptime{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"})", + "instant": true, + "interval": "", + "legendFormat": "Logical", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Uptime", + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 6, + "panels": [], + "title": "Data Node", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "align": "center", + "displayMode": "auto", + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "CPU %" + }, + "properties": [ + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "custom.displayMode", + "value": "gradient-gauge" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "MEM %" + }, + "properties": [ + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "custom.displayMode", + "value": "gradient-gauge" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "MEM" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + }, + { + "id": "custom.width", + "value": 119 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "MEM (Limit)" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + }, + { + "id": "custom.width", + "value": 127 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Pod" + }, + "properties": [ + { + "id": "custom.filterable", + "value": true + }, + { + "id": "custom.width", + "value": 215 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Network (Recv)" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + }, + { + "id": "custom.displayMode", + "value": "auto" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Network (Sent)" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "node" + }, + "properties": [ + { + "id": "custom.width", + "value": 205 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Host" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "Node Dashboard", + "url": "./d/fa49a4706d07a042595b664c87fb33ea/nodes?orgId=1&var-datasource=$datasource&var-instance=${__value.text}" + } + ] + }, + { + "id": "custom.width", + "value": 221 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Pod" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "Pod Dashboard", + "url": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=${__value.text}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU" + }, + "properties": [ + { + "id": "custom.width", + "value": 92 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU (Limit)" + }, + "properties": [ + { + "id": "custom.width", + "value": 110 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.filterable", + "value": true + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "XCluster Dashboard", + "url": "./d/wp0sJClGz/xstore-overview?orgId=1&var-datasource=$datasource&var-xstore=${__value.text}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 38, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 0, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.5.27", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by(pod, xstore_name, xstore_role) (mysql_up{xstore_name=\"$xstore_name\", polardbx_role=\"dn\", namespace=\"$namespace\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "queryType": "randomWalk", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "exemplar": true, + "expr": "sum by (pod, node) (polardbx_container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", container=\"engine\"}\n * on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "CPU", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "exemplar": true, + "expr": "sum by (pod) (\n kube_pod_container_resource_limits{namespace=\"$namespace\", container=\"engine\", resource=\"cpu\", unit=\"core\"}\n* on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\"}\n)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "CPU (Limit)", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "exemplar": true, + "expr": "sum by (pod) (polardbx_container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", container=\"engine\"}\n * on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\"})\n/ sum by (pod) (\n kube_pod_container_resource_limits{namespace=\"$namespace\", container=\"engine\", resource=\"cpu\", unit=\"core\"}\n* on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\"}\n)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "CPU %", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "exemplar": true, + "expr": "sum by (pod) (\n container_memory_working_set_bytes{namespace=\"$namespace\", container=\"engine\", id=~\"^/kubepods.*\"}\n * on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\"}\n)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "MEM", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "exemplar": true, + "expr": "sum by (pod) (\n kube_pod_container_resource_limits{namespace=\"$namespace\", container=\"engine\", resource=\"memory\", unit=\"byte\"}\n* on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\"}\n)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "exemplar": true, + "expr": "sum by (pod) (\n container_memory_working_set_bytes{namespace=\"$namespace\", container=\"engine\", id=~\"^/kubepods.*\"}\n * on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\"}\n)\n/\nsum by (pod) (\n kube_pod_container_resource_limits{namespace=\"$namespace\", container=\"engine\", resource=\"memory\", unit=\"byte\"}\n* on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\"}\n)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "exemplar": true, + "expr": "sum by (pod) (rate(mysql_global_status_bytes_sent{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\"}[1m]))", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "exemplar": true, + "expr": "sum by (pod) (rate(mysql_global_status_bytes_received{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\"}[1m]))", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by(pod, xstore_role) (mysql_up{xstore_name=\"$xstore\", polardbx_role=\"dn\", namespace=\"$namespace\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "__auto", + "range": false, + "refId": "J" + } + ], + "title": "Data Nodes", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "pod" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time 1": true, + "Time 2": true, + "Time 3": true, + "Time 4": true, + "Time 5": true, + "Time 6": true, + "Time 7": true, + "Time 8": true, + "Time 9": true, + "Value #A": true, + "Value #J": true, + "pod": false + }, + "indexByName": { + "Time 1": 1, + "Time 2": 5, + "Time 3": 7, + "Time 4": 9, + "Time 5": 11, + "Time 6": 13, + "Time 7": 15, + "Time 8": 17, + "Time 9": 19, + "Value #B": 4, + "Value #C": 6, + "Value #D": 8, + "Value #E": 10, + "Value #F": 12, + "Value #G": 14, + "Value #H": 16, + "Value #I": 18, + "Value #J": 20, + "node": 3, + "pod": 0, + "xstore_role": 2 + }, + "renameByName": { + "Value #B": "CPU", + "Value #C": "CPU (Limit)", + "Value #D": "CPU %", + "Value #E": "MEM", + "Value #F": "MEM (Limit)", + "Value #G": "MEM %", + "Value #H": "Network (Recv)", + "Value #I": "Network (Sent)", + "node": "Host", + "pod": "POD", + "xstore_name": "Name" + } + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "field": "DN" + } + ] + } + } + ], + "type": "table" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 20 + }, + "id": 46, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(polardbx_container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", container=\"engine\"}\n* on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\", xstore_role=\"leader\"})", + "interval": "", + "legendFormat": "cpu", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "CPU (Total)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "max": 1.2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 20 + }, + "id": 47, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(polardbx_container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", container=\"engine\"}\n* on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\", polardbx_role=\"dn\", xstore_role=\"leader\"})\n/\nsum(kube_pod_container_resource_limits{namespace=\"$namespace\", container=\"engine\", resource=\"cpu\", unit=\"core\"}\n* on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\", polardbx_role=\"dn\", xstore_role=\"leader\"})", + "interval": "", + "legendFormat": "avg cpu %", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "CPU % (Avg)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 20 + }, + "id": 48, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", container=\"engine\", id=~\"^/kubepods.*\"}\n* on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\", xstore_role=\"leader\"})", + "interval": "", + "legendFormat": "memory", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Memory (Total)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 20 + }, + "id": 49, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", container=\"engine\", id=~\"^/kubepods.*\"}\n* on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\", polardbx_role=\"dn\", xstore_role=\"leader\"})\n/\nsum(kube_pod_container_resource_limits{namespace=\"$namespace\", container=\"engine\", resource=\"memory\", unit=\"byte\"}\n* on(namespace,pod)\n group_left() mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\", polardbx_role=\"dn\", xstore_role=\"leader\"})", + "interval": "", + "legendFormat": "avg mem %", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Memory % (Avg)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 28 + }, + "id": 50, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum (polardbx_container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", container=\"engine\"}\n* on(namespace,pod)\n group_left(xstore_name) mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\", polardbx_role=\"dn\", xstore_role=\"leader\"}) by (xstore_name)", + "interval": "", + "legendFormat": "{{ xstore_name }}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "CPU (DN)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "max": 1.2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 28 + }, + "id": 51, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(polardbx_container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", container=\"engine\"}\n* on(namespace,pod)\n group_left(xstore_name) mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\", polardbx_role=\"dn\", xstore_role=\"leader\"}) by (xstore_name)\n/\nsum(kube_pod_container_resource_limits{namespace=\"$namespace\", container=\"engine\", resource=\"cpu\", unit=\"core\"}\n* on(namespace,pod)\n group_left(xstore_name) mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\", polardbx_role=\"dn\", xstore_role=\"leader\"}) by (xstore_name)", + "interval": "", + "legendFormat": "{{ xstore_name }}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "CPU % (DN)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 28 + }, + "id": 52, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", container=\"engine\", id=~\"^/kubepods.*\"}\n* on(namespace,pod)\n group_left(xstore_name) mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\", polardbx_role=\"dn\", xstore_role=\"leader\"}) by (xstore_name)", + "interval": "", + "legendFormat": "{{ xstore_name }}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Memory (DN)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 28 + }, + "id": 53, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", container=\"engine\", id=~\"^/kubepods.*\"}\n* on(namespace,pod)\n group_left(xstore_name) mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\", polardbx_role=\"dn\", xstore_role=\"leader\"}) by (xstore_name)\n/\nsum(kube_pod_container_resource_limits{namespace=\"$namespace\", container=\"engine\", resource=\"memory\", unit=\"byte\"}\n* on(namespace,pod)\n group_left(xstore_name) mysql_up{xstore_name=\"$xstore\", namespace=\"$namespace\", polardbx_role=\"dn\", xstore_role=\"leader\"}) by (xstore_name)", + "interval": "", + "legendFormat": "{{ xstore_name }}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Memory % (DN)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 36 + }, + "id": 55, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_queries{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "interval": "", + "legendFormat": "qps (physical)", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "QPS", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 36 + }, + "id": 56, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(mysql_global_status_threads_connected{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"})", + "interval": "", + "legendFormat": "connections", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(mysql_global_status_threads_running{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"})", + "hide": false, + "interval": "", + "legendFormat": "threads", + "refId": "B" + } + ], + "title": "Connections/Threads", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 36 + }, + "id": 57, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(mysql_global_status_innodb_buffer_pool_bytes_data{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"})", + "interval": "", + "legendFormat": "buffer pool size", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Buffer Pool Size (Total)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 36 + }, + "id": 58, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(mysql_global_status_innodb_buffer_pool_bytes_data{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}) by (xstore_name)", + "interval": "", + "legendFormat": "{{ xstore_name }}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Buffer Pool Size (DN)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "log": 10, + "type": "log" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 44 + }, + "id": 59, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(mysql_global_status_buffer_pool_dirty_pages{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"})", + "interval": "", + "legendFormat": "dirty", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_buffer_pool_page_changes_total{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[10m]))", + "hide": false, + "interval": "", + "legendFormat": "flush", + "queryType": "randomWalk", + "refId": "B" + } + ], + "title": "Buffer Pool Dirty/Flush (Total)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 44 + }, + "id": 60, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(mysql_global_status_innodb_row_lock_current_waits{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"})", + "interval": "", + "legendFormat": "current wait", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Row Lock Current Wait (Total)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 44 + }, + "id": 61, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_innodb_buffer_pool_read_requests{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "interval": "", + "legendFormat": "reads", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_innodb_buffer_pool_write_requests{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "hide": false, + "interval": "", + "legendFormat": "writes", + "queryType": "randomWalk", + "refId": "B" + } + ], + "title": "Logical Reads/Writes (Total)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 44 + }, + "id": 62, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_innodb_log_writes{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "interval": "", + "legendFormat": "log writes", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_innodb_data_reads{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "hide": false, + "interval": "", + "legendFormat": "data reads", + "queryType": "randomWalk", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_innodb_data_fsyncs{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "hide": false, + "interval": "", + "legendFormat": "data fsyncs", + "queryType": "randomWalk", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_innodb_os_log_fsyncs{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "hide": false, + "interval": "", + "legendFormat": "log fsyncs", + "queryType": "randomWalk", + "refId": "D" + } + ], + "title": "IOPS (Total)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 52 + }, + "id": 63, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_innodb_data_written{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "interval": "", + "legendFormat": "data written/s", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_innodb_data_read{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "hide": false, + "interval": "", + "legendFormat": "data read/s", + "queryType": "randomWalk", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_innodb_os_log_written{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "hide": false, + "interval": "", + "legendFormat": "log writtern/s", + "queryType": "randomWalk", + "refId": "C" + } + ], + "title": "IO Throughput (Total)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 52 + }, + "id": 64, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_bytes_received{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "interval": "", + "legendFormat": "received/s", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_bytes_sent{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\"}[1m]))", + "hide": false, + "interval": "", + "legendFormat": "sent/s", + "queryType": "randomWalk", + "refId": "B" + } + ], + "title": "Network (Total)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 52 + }, + "id": 65, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_commands_total{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\", command=~\"xa_.*\"}[1m])) by (command)", + "interval": "", + "legendFormat": "{{ command }}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "XA Transactions (Total)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 52 + }, + "id": 66, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.5.3", + "targets": [ + { + "exemplar": true, + "expr": "sum(rate(mysql_global_status_commands_total{xstore_name=\"$xstore\", polardbx_role=\"dn\", xstore_role=\"leader\", namespace=\"$namespace\", command=~\"begin|commit|rollback\"}[1m])) by (command)", + "interval": "", + "legendFormat": "{{ command }}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Transactions (Total)", + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 36, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_pod_info, cluster)", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "query": "label_values(kube_pod_info, cluster)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "prometheus", + "value": "prometheus" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "selected": false, + "text": "default", + "value": "default" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(mysql_up, namespace)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "namespace", + "options": [], + "query": { + "query": "label_values(mysql_up, namespace)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/^(?!kube\\-system|.*\\-operator\\-system|monitoring|loki)/", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "polardbx-s", + "value": "polardbx-s" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(mysql_up{cluster=\"$cluster\", namespace=\"$namespace\"},xstore_name)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "xstore", + "options": [], + "query": { + "query": "label_values(mysql_up{cluster=\"$cluster\", namespace=\"$namespace\"},xstore_name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "XStore Overview", + "uid": "xstoreoverview", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/charts/polardbx-monitor/templates/grafana-dashboard-xstore-overview-configmap.yaml b/charts/polardbx-monitor/templates/grafana-dashboard-xstore-overview-configmap.yaml new file mode 100644 index 0000000..e5679f7 --- /dev/null +++ b/charts/polardbx-monitor/templates/grafana-dashboard-xstore-overview-configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-dashboard-xstore-overview + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +data: +{{ (.Files.Glob "dashboard/xstore-overview.json").AsConfig | indent 2 }} diff --git a/charts/polardbx-monitor/templates/grafana-deployment.yaml b/charts/polardbx-monitor/templates/grafana-deployment.yaml index aa522b3..3addb90 100644 --- a/charts/polardbx-monitor/templates/grafana-deployment.yaml +++ b/charts/polardbx-monitor/templates/grafana-deployment.yaml @@ -117,6 +117,9 @@ spec: - mountPath: /grafana-dashboard-definitions/1/polardbx-overview name: grafana-dashboard-polardbx-overview readOnly: false + - mountPath: /grafana-dashboard-definitions/1/xstore-overview + name: grafana-dashboard-xstore-overview + readOnly: false {{- with .Values.monitors.grafana.nodeSelector }} nodeSelector: {{ toYaml . | nindent 8 }} @@ -211,4 +214,7 @@ spec: - configMap: name: grafana-dashboard-polardbx-overview name: grafana-dashboard-polardbx-overview + - configMap: + name: grafana-dashboard-xstore-overview + name: grafana-dashboard-xstore-overview diff --git a/charts/polardbx-monitor/templates/polardbx-alert-rules.yaml b/charts/polardbx-monitor/templates/polardbx-alert-rules.yaml index b791ef6..8cfb092 100644 --- a/charts/polardbx-monitor/templates/polardbx-alert-rules.yaml +++ b/charts/polardbx-monitor/templates/polardbx-alert-rules.yaml @@ -203,7 +203,7 @@ spec: summary: PolarDB-X-Node Disk Usage is Too High description: Instance {{`{{ $labels.instance }}`}} mountpoint {{`{{ $labels.mountpoint }}`}} Disk Usage is too high, over 90% for 5m. expr: | - sum((node_filesystem_size_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"} - node_filesystem_free_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"}) * 100 /(node_filesystem_avail_bytes{fstype=~"ext.*|xfs|nfs", mountpoint !~".*pod.*", mountpoint != "/boot"} + (node_filesystem_size_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"}-node_filesystem_free_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"}))) by (instance, mountpoint) * 100 >= 90 + sum((node_filesystem_size_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"} - node_filesystem_free_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"}) /(node_filesystem_avail_bytes{fstype=~"ext.*|xfs|nfs", mountpoint !~".*pod.*", mountpoint != "/boot"} + (node_filesystem_size_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"}-node_filesystem_free_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"}))) by (instance, mountpoint) * 100 >= 90 for: 5m labels: severity: critical @@ -212,7 +212,7 @@ spec: summary: PolarDB-X-Node Disk Usage is High description: Instance {{`{{ $labels.instance }}`}} mountpoint {{`{{ $labels.mountpoint }}`}} Disk Usage is high, over 80% for 5m. expr: | - sum((node_filesystem_size_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"} - node_filesystem_free_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"}) * 100 /(node_filesystem_avail_bytes{fstype=~"ext.*|xfs|nfs", mountpoint !~".*pod.*", mountpoint != "/boot"} + (node_filesystem_size_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"}-node_filesystem_free_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"}))) by (instance, mountpoint) * 100 >= 80 + sum((node_filesystem_size_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"} - node_filesystem_free_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"}) /(node_filesystem_avail_bytes{fstype=~"ext.*|xfs|nfs", mountpoint !~".*pod.*", mountpoint != "/boot"} + (node_filesystem_size_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"}-node_filesystem_free_bytes{fstype=~"ext.*|xfs|nfs",mountpoint !~".*pod.*", mountpoint != "/boot"}))) by (instance, mountpoint) * 100 >= 80 for: 5m labels: severity: warning diff --git a/charts/polardbx-monitor/values.yaml b/charts/polardbx-monitor/values.yaml index 47dd8c7..f2dd28f 100644 --- a/charts/polardbx-monitor/values.yaml +++ b/charts/polardbx-monitor/values.yaml @@ -30,7 +30,7 @@ monitors: # Grafana docker repo and image. It can be set to your private repo. repo: grafana image: grafana - version: 7.5.3 + version: 8.5.27 # Grafana replicas, you can scale out/in grafana by this value. replicas: 1 # Grafana port, default: 3000 diff --git a/charts/polardbx-operator/Chart.yaml b/charts/polardbx-operator/Chart.yaml index 3a0bcb9..8db2bcf 100644 --- a/charts/polardbx-operator/Chart.yaml +++ b/charts/polardbx-operator/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: polardbx-operator description: Helm chart of polardbx-operator type: application -version: 1.4.1 -appVersion: v1.4.1 +version: 1.5.0-beta +appVersion: v1.5.0-beta keywords: - polardb-x - operator diff --git a/charts/polardbx-operator/crds/polardbx.aliyun.com_polardbxbackups.yaml b/charts/polardbx-operator/crds/polardbx.aliyun.com_polardbxbackups.yaml index 114c982..5466efd 100644 --- a/charts/polardbx-operator/crds/polardbx.aliyun.com_polardbxbackups.yaml +++ b/charts/polardbx-operator/crds/polardbx.aliyun.com_polardbxbackups.yaml @@ -260,6 +260,8 @@ spec: used by cn/dn/gms. properties: name: + type: string + namespace: description: parameter template type: string type: object @@ -480,11 +482,101 @@ spec: properties: cdc: properties: + groups: + items: + properties: + config: + properties: + envs: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + type: object + name: + type: string + replicas: + default: 2 + format: int32 + minimum: 0 + type: integer + template: + properties: + hostNetwork: + description: HostNetwork mode. + type: boolean + image: + description: Image for CDC. Should be replaced + by default value if not present. + type: string + imagePullPolicy: + description: ImagePullPolicy describes a + policy for if/when to pull a container + image (especially for the engine container). + type: string + imagePullSecrets: + description: ImagePullSecrets represents + the secrets for pulling private images. + items: + description: LocalObjectReference contains + enough information to let you locate + the referenced object inside the same + namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + type: array + resources: + default: + limits: + cpu: 4 + memory: 8Gi + description: Resources. Default is limits + of 4 cpu and 8Gi memory. + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum + amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the + minimum amount of compute resources + required. If Requests is omitted for + a container, it defaults to Limits + if that is explicitly specified, otherwise + to an implementation-defined value. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + type: object + type: object + type: array replicas: + anyOf: + - type: integer + - type: string default: 2 - format: int32 - minimum: 0 - type: integer + x-kubernetes-int-or-string: true template: default: resources: @@ -556,7 +648,6 @@ spec: type: object type: object xReplicas: - format: int32 minimum: 0 type: integer type: object @@ -947,6 +1038,8 @@ spec: cdc: items: properties: + extraName: + type: string name: type: string replicas: @@ -1080,6 +1173,8 @@ spec: cn: items: properties: + extraName: + type: string name: type: string replicas: @@ -1213,6 +1308,8 @@ spec: columnar: items: properties: + extraName: + type: string name: type: string replicas: diff --git a/charts/polardbx-operator/crds/polardbx.aliyun.com_polardbxclusters.yaml b/charts/polardbx-operator/crds/polardbx.aliyun.com_polardbxclusters.yaml index 0242962..de38fb6 100644 --- a/charts/polardbx-operator/crds/polardbx.aliyun.com_polardbxclusters.yaml +++ b/charts/polardbx-operator/crds/polardbx.aliyun.com_polardbxclusters.yaml @@ -222,6 +222,8 @@ spec: used by cn/dn/gms. properties: name: + type: string + namespace: description: parameter template type: string type: object @@ -436,11 +438,99 @@ spec: properties: cdc: properties: + groups: + items: + properties: + config: + properties: + envs: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + type: object + name: + type: string + replicas: + default: 2 + format: int32 + minimum: 0 + type: integer + template: + properties: + hostNetwork: + description: HostNetwork mode. + type: boolean + image: + description: Image for CDC. Should be replaced + by default value if not present. + type: string + imagePullPolicy: + description: ImagePullPolicy describes a policy + for if/when to pull a container image (especially + for the engine container). + type: string + imagePullSecrets: + description: ImagePullSecrets represents the + secrets for pulling private images. + items: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + type: array + resources: + default: + limits: + cpu: 4 + memory: 8Gi + description: Resources. Default is limits of + 4 cpu and 8Gi memory. + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum + amount of compute resources allowed. More + info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum + amount of compute resources required. + If Requests is omitted for a container, + it defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + type: object + type: object + type: array replicas: + anyOf: + - type: integer + - type: string default: 2 - format: int32 - minimum: 0 - type: integer + x-kubernetes-int-or-string: true template: default: resources: @@ -511,7 +601,6 @@ spec: type: object type: object xReplicas: - format: int32 minimum: 0 type: integer type: object @@ -896,6 +985,8 @@ spec: cdc: items: properties: + extraName: + type: string name: type: string replicas: @@ -1016,6 +1107,8 @@ spec: cn: items: properties: + extraName: + type: string name: type: string replicas: @@ -1136,6 +1229,8 @@ spec: columnar: items: properties: + extraName: + type: string name: type: string replicas: @@ -1948,6 +2043,10 @@ spec: randHash: description: Rand represents a random string value to avoid collision. type: string + readonlyStorageInfoHash: + description: LatestSyncReadonlyTs represents the lastest time sync + readonly storage info to metadb + type: string replicaStatus: description: ReplicaStatus represents the replica status of the cluster. properties: @@ -2164,11 +2263,101 @@ spec: properties: cdc: properties: + groups: + items: + properties: + config: + properties: + envs: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + type: object + name: + type: string + replicas: + default: 2 + format: int32 + minimum: 0 + type: integer + template: + properties: + hostNetwork: + description: HostNetwork mode. + type: boolean + image: + description: Image for CDC. Should be replaced + by default value if not present. + type: string + imagePullPolicy: + description: ImagePullPolicy describes a + policy for if/when to pull a container + image (especially for the engine container). + type: string + imagePullSecrets: + description: ImagePullSecrets represents + the secrets for pulling private images. + items: + description: LocalObjectReference contains + enough information to let you locate + the referenced object inside the same + namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + type: array + resources: + default: + limits: + cpu: 4 + memory: 8Gi + description: Resources. Default is limits + of 4 cpu and 8Gi memory. + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum + amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the + minimum amount of compute resources + required. If Requests is omitted for + a container, it defaults to Limits + if that is explicitly specified, otherwise + to an implementation-defined value. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + type: object + type: object + type: array replicas: + anyOf: + - type: integer + - type: string default: 2 - format: int32 - minimum: 0 - type: integer + x-kubernetes-int-or-string: true template: default: resources: @@ -2240,7 +2429,6 @@ spec: type: object type: object xReplicas: - format: int32 minimum: 0 type: integer type: object @@ -2631,6 +2819,8 @@ spec: cdc: items: properties: + extraName: + type: string name: type: string replicas: @@ -2764,6 +2954,8 @@ spec: cn: items: properties: + extraName: + type: string name: type: string replicas: @@ -2897,6 +3089,8 @@ spec: columnar: items: properties: + extraName: + type: string name: type: string replicas: diff --git a/charts/polardbx-operator/crds/polardbx.aliyun.com_xstorefollowers.yaml b/charts/polardbx-operator/crds/polardbx.aliyun.com_xstorefollowers.yaml index 867e136..7f075e8 100644 --- a/charts/polardbx-operator/crds/polardbx.aliyun.com_xstorefollowers.yaml +++ b/charts/polardbx-operator/crds/polardbx.aliyun.com_xstorefollowers.yaml @@ -82,10 +82,6 @@ spec: description: CurrentJobTask represents the task name of the current job type: string - electionWeight: - description: ElectionWeight represents the election weight of target - pod - type: integer flowFlags: description: FlowFlags represent flow flags items: diff --git a/charts/polardbx-operator/crds/polardbx.aliyun.com_xstores.yaml b/charts/polardbx-operator/crds/polardbx.aliyun.com_xstores.yaml index 5fee796..b5fffe0 100644 --- a/charts/polardbx-operator/crds/polardbx.aliyun.com_xstores.yaml +++ b/charts/polardbx-operator/crds/polardbx.aliyun.com_xstores.yaml @@ -163,6 +163,8 @@ spec: used by cn/dn/gms. properties: name: + type: string + namespace: description: Parameter template type: string type: object @@ -1406,7 +1408,7 @@ spec: hostNetwork: default: false description: HostNetwork defines whether the node - uses the host network. Default is true. + uses the host network. Default is false. type: boolean image: description: Image is the image of xstore engine. @@ -2480,7 +2482,7 @@ spec: hostNetwork: default: false description: HostNetwork defines whether the node uses - the host network. Default is true. + the host network. Default is false. type: boolean image: description: Image is the image of xstore engine. Controller @@ -3897,7 +3899,7 @@ spec: hostNetwork: default: false description: HostNetwork defines whether the node - uses the host network. Default is true. + uses the host network. Default is false. type: boolean image: description: Image is the image of xstore engine. @@ -4971,7 +4973,7 @@ spec: hostNetwork: default: false description: HostNetwork defines whether the node uses - the host network. Default is true. + the host network. Default is false. type: boolean image: description: Image is the image of xstore engine. Controller diff --git a/charts/polardbx-operator/templates/controller-config-configmap.yaml b/charts/polardbx-operator/templates/controller-config-configmap.yaml index 9ce1585..051eeee 100644 --- a/charts/polardbx-operator/templates/controller-config-configmap.yaml +++ b/charts/polardbx-operator/templates/controller-config-configmap.yaml @@ -12,6 +12,7 @@ data: storage_engine: {{ .Values.webhook.defaults.storageEngine }} service_type: {{ .Values.webhook.defaults.serviceType }} upgrade_strategy: {{ .Values.webhook.defaults.upgradeStrategy }} + operator_version: {{ .Values.version }} config.yaml: |- images: repo: {{ .Values.imageRepo }} @@ -50,6 +51,7 @@ data: enable_aliyun_ack_resource_controller: {{ .Values.controllerManager.config.scheduler.enableAliyunAckResourceController }} enable_debug_mode_for_compute_nodes: false enable_privileged_container: {{ .Values.controllerManager.config.container.privileged }} + enable_run_mode_check: false force_cgroup: {{ .Values.controllerManager.config.container.forceCGroup }} store: enable_privileged_container: {{ .Values.controllerManager.config.container.privileged }} diff --git a/charts/polardbx-operator/templates/controller-manager-deployment.yaml b/charts/polardbx-operator/templates/controller-manager-deployment.yaml index a71d025..3ed0f5b 100644 --- a/charts/polardbx-operator/templates/controller-manager-deployment.yaml +++ b/charts/polardbx-operator/templates/controller-manager-deployment.yaml @@ -42,15 +42,15 @@ spec: {{- end }} {{- with .Values.controllerManager.nodeSelector }} nodeSelector: - {{ toYaml . | indent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.controllerManager.affinity }} affinity: - {{ toYaml . | indent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.controllerManager.tolerations }} tolerations: - {{ toYaml . | indent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} containers: - name: polardbx-operator diff --git a/charts/polardbx-operator/templates/parameter-template-product-57.yaml b/charts/polardbx-operator/templates/parameter-template-product-57.yaml new file mode 100644 index 0000000..6836b8c --- /dev/null +++ b/charts/polardbx-operator/templates/parameter-template-product-57.yaml @@ -0,0 +1,2904 @@ +apiVersion: polardbx.aliyun.com/v1 +kind: PolarDBXParameterTemplate +metadata: + name: product-57 +spec: + nodeType: + cn: + name: cnTemplate + paramList: + - defaultValue: 05:00 + divisibilityFactor: 0 + mode: readwrite + name: BACKGROUND_STATISTIC_COLLECTION_END_TIME + optional: '[00:00|01:00|02:00|03:00|04:00|05:00|06:00|07:00|08:00|09:00|10:00|11:00|12:00|13:00|14:00|15:00|16:00|17:00|18:00|19:00|20:00|21:00|22:00|23:00]' + restart: false + unit: STRING + - defaultValue: 02:00 + divisibilityFactor: 0 + mode: readwrite + name: BACKGROUND_STATISTIC_COLLECTION_START_TIME + optional: '[00:00|01:00|02:00|03:00|04:00|05:00|06:00|07:00|08:00|09:00|10:00|11:00|12:00|13:00|14:00|15:00|16:00|17:00|18:00|19:00|20:00|21:00|22:00|23:00]' + restart: false + unit: STRING + - defaultValue: '5000' + divisibilityFactor: 1 + mode: readwrite + name: CONN_POOL_BLOCK_TIMEOUT + optional: '[1000-60000]' + restart: false + unit: INT + - defaultValue: '30' + divisibilityFactor: 1 + mode: readwrite + name: CONN_POOL_IDLE_TIMEOUT + optional: '[1-60]' + restart: false + unit: INT + - defaultValue: '60' + divisibilityFactor: 1 + mode: readwrite + name: CONN_POOL_MAX_POOL_SIZE + optional: '[1-1600]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: CONN_POOL_MAX_WAIT_THREAD_COUNT + optional: '[-1-8192]' + restart: false + unit: INT + - defaultValue: '20' + divisibilityFactor: 1 + mode: readwrite + name: CONN_POOL_MIN_POOL_SIZE + optional: '[0-60]' + restart: false + unit: INT + - defaultValue: '512' + divisibilityFactor: 1 + mode: readwrite + name: CONN_POOL_XPROTO_MAX_POOLED_SESSION_PER_INST + optional: '[1-8192]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: CONN_POOL_XPROTO_STORAGE_DB_PORT + optional: '[-1-0]' + restart: false + unit: INT + - defaultValue: 'true' + divisibilityFactor: 0 + mode: readwrite + name: ENABLE_BACKGROUND_STATISTIC_COLLECTION + optional: '[true|false]' + restart: false + unit: STRING + - defaultValue: 'true' + divisibilityFactor: 1 + mode: readwrite + name: ENABLE_COMPLEX_DML_CROSS_DB + optional: '[true|false]' + restart: false + unit: STRING + - defaultValue: 'true' + divisibilityFactor: 0 + mode: readwrite + name: ENABLE_HLL + optional: '[true|false]' + restart: false + unit: STRING + - defaultValue: 'true' + divisibilityFactor: 0 + mode: readwrite + name: ENABLE_LOCAL_MODE + optional: '[true|false]' + restart: false + unit: STRING + - defaultValue: 'true' + divisibilityFactor: 0 + mode: readwrite + name: ENABLE_LOGICALVIEW_COST + optional: '[true|false]' + restart: false + unit: STRING + - defaultValue: 'false' + divisibilityFactor: 1 + mode: readwrite + name: ENABLE_RECYCLEBIN + optional: '[true|false]' + restart: false + unit: STRING + - defaultValue: 'true' + divisibilityFactor: 0 + mode: readwrite + name: ENABLE_SPM + optional: '[true|false]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 1 + mode: readwrite + name: ENABLE_SQL_FLASHBACK_EXACT_MATCH + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'true' + divisibilityFactor: 0 + mode: readwrite + name: ENABLE_STATEMENTS_SUMMARY + optional: '[true|false]' + restart: false + unit: STRING + - defaultValue: 'true' + divisibilityFactor: 0 + mode: readwrite + name: ENABLE_STATISTIC_FEEDBACK + optional: '[true|false]' + restart: false + unit: STRING + - defaultValue: 'true' + divisibilityFactor: 1 + mode: readwrite + name: FORBID_EXECUTE_DML_ALL + optional: '[true|false]' + restart: false + unit: STRING + - defaultValue: '-1' + divisibilityFactor: 1 + mode: readwrite + name: GENERAL_DYNAMIC_SPEED_LIMITATION + optional: '[-1-10000000]' + restart: false + unit: INT + - defaultValue: 'false' + divisibilityFactor: 1 + mode: readwrite + name: INFO_SCHEMA_QUERY_WITH_STAT + optional: '[true|false]' + restart: false + unit: STRING + - defaultValue: '2' + divisibilityFactor: 0 + mode: readwrite + name: IN_SUB_QUERY_THRESHOLD + optional: '[1-65535]' + restart: false + unit: INT + - defaultValue: SYSTEM + divisibilityFactor: 1 + mode: readwrite + name: LOGICAL_DB_TIME_ZONE + optional: '[SYSTEM|Ā±HH:mm]' + restart: false + unit: TZ + - defaultValue: '28800000' + divisibilityFactor: 1 + mode: readwrite + name: LOGIC_IDLE_TIMEOUT + optional: '[3600000-86400000]' + restart: false + unit: INT + - defaultValue: '16777216' + divisibilityFactor: 1 + mode: readwrite + name: MAX_ALLOWED_PACKET + optional: '[4194304-33554432]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: PARALLELISM + optional: '[-1-8]' + restart: false + unit: INT + - defaultValue: '-1' + divisibilityFactor: 1 + mode: readwrite + name: PER_QUERY_MEMORY_LIMIT + optional: '[-1-9223372036854775807]' + restart: false + unit: INT + - defaultValue: 00:00-01:00 + divisibilityFactor: 1 + mode: readwrite + name: PURGE_TRANS_START_TIME + optional: 00:00~23:59 + restart: false + unit: HOUR_RANGE + - defaultValue: '1000' + divisibilityFactor: 1 + mode: readwrite + name: SLOW_SQL_TIME + optional: '[1000-900000]' + restart: false + unit: INT + - defaultValue: '900000' + divisibilityFactor: 1 + mode: readwrite + name: SOCKET_TIMEOUT + optional: '[0-3600000]' + restart: false + unit: INT + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: STATEMENTS_SUMMARY_PERCENT + optional: '[0-100]' + restart: false + unit: INT + - defaultValue: REPEATABLE-READ + divisibilityFactor: 0 + mode: readwrite + name: TRANSACTION_ISOLATION + optional: '[REPEATABLE-READ|READ-COMMITTED|READ-UNCOMMITTED|SERIALIZABLE]' + restart: false + unit: STRING + - defaultValue: '500' + divisibilityFactor: 1 + mode: readwrite + name: XPROTO_MAX_DN_CONCURRENT + optional: '[1-8192]' + restart: false + unit: INT + - defaultValue: '32' + divisibilityFactor: 1 + mode: readwrite + name: XPROTO_MAX_DN_WAIT_CONNECTION + optional: '[1-8192]' + restart: false + unit: INT + - defaultValue: 'false' + divisibilityFactor: 1 + mode: readwrite + name: ENABLE_COROUTINE + optional: '[true|false]' + restart: true + unit: STRING + dn: + name: dnTemplate + paramList: + - defaultValue: myisam,memory,archive + divisibilityFactor: 0 + mode: readonly + name: disabled_storage_engines + optional: '[myisam,memory,archive|myisam,memory|myisam,archive]' + restart: false + unit: string + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readonly + name: innodb_use_native_aio + optional: '[OFF|ON]' + restart: false + unit: STRING + - defaultValue: SYSTEM + divisibilityFactor: 0 + mode: readonly + name: log_timestamps + optional: '[SYSTEM|UTC]' + restart: false + unit: STRING + - defaultValue: '8' + divisibilityFactor: 1 + mode: readonly + name: loose_innodb_adaptive_hash_index_parts + optional: '[1-512]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readonly + name: loose_performance_point_enabled + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readonly + name: loose_rds_check_core_file_enabled + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '20' + divisibilityFactor: 1 + mode: readonly + name: loose_rds_kill_connections + optional: '[0-18446744073709551615]' + restart: false + unit: int + - defaultValue: aurora_proxy + divisibilityFactor: 0 + mode: readonly + name: loose_rds_proxy_user_list + optional: .* + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readonly + name: loose_show_ipk_info + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '''aliyun_root,aurora,replicator''' + divisibilityFactor: 0 + mode: readonly + name: maintain_user_list + optional: '''aliyun_root,aurora,replicator''' + restart: false + unit: STRING + - defaultValue: FORCE + divisibilityFactor: 0 + mode: readonly + name: myisam_recover_options + optional: '[OFF|DEFAULT|BACKUP|FORCE|QUICK|BACKUP,FORCE]' + restart: false + unit: STRING + - defaultValue: '512' + divisibilityFactor: 1 + mode: readonly + name: rds_reserved_connections + optional: '[0-512]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: autocommit + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: automatic_sp_privileges + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: auto_increment_increment + optional: '[1-65535]' + restart: false + unit: INT + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: auto_increment_offset + optional: '[1-65535]' + restart: false + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: avoid_temporal_upgrade + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '2097152' + divisibilityFactor: 4096 + mode: readwrite + name: binlog_cache_size + optional: '[4096-16777216]' + restart: false + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 1 + mode: readwrite + name: binlog_order_commits + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: binlog_rows_query_log_events + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: full + divisibilityFactor: 0 + mode: readwrite + name: binlog_row_image + optional: '[full|minimal]' + restart: false + unit: STRING + - defaultValue: '32768' + divisibilityFactor: 4096 + mode: readwrite + name: binlog_stmt_cache_size + optional: '[4096-16777216]' + restart: false + unit: INT + - defaultValue: '"aes-128-ecb"' + divisibilityFactor: 1 + mode: readwrite + name: block_encryption_mode + optional: '["aes-128-ecb"|"aes-192-ecb"|"aes-256-ecb"|"aes-128-cbc"|"aes-192-cbc"|"aes-256-cbc"]' + restart: false + unit: STRING + - defaultValue: '4194304' + divisibilityFactor: 1 + mode: readwrite + name: bulk_insert_buffer_size + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: binary + divisibilityFactor: 0 + mode: readwrite + name: character_set_filesystem + optional: '[utf8|latin1|gbk|binary]' + restart: false + unit: STRING + - defaultValue: '1' + divisibilityFactor: 0 + mode: readwrite + name: concurrent_insert + optional: '[0|1|2]' + restart: false + unit: STRING + - defaultValue: '10' + divisibilityFactor: 1 + mode: readwrite + name: connect_timeout + optional: '[1-3600]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: default_week_format + optional: '[0-7]' + restart: false + unit: INT + - defaultValue: '100' + divisibilityFactor: 1 + mode: readwrite + name: delayed_insert_limit + optional: '[1-4294967295]' + restart: false + unit: INT + - defaultValue: '300' + divisibilityFactor: 1 + mode: readwrite + name: delayed_insert_timeout + optional: '[1-3600]' + restart: false + unit: INT + - defaultValue: '1000' + divisibilityFactor: 1 + mode: readwrite + name: delayed_queue_size + optional: '[1-4294967295]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: delay_key_write + optional: '[ON|OFF|ALL]' + restart: false + unit: STRING + - defaultValue: '4' + divisibilityFactor: 1 + mode: readwrite + name: div_precision_increment + optional: '[0-30]' + restart: false + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: end_markers_in_json + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '200' + divisibilityFactor: 1 + mode: readwrite + name: eq_range_index_dive_limit + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: event_scheduler + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: explicit_defaults_for_timestamp + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: flush_time + optional: '[0-31536000]' + restart: false + unit: INT + - defaultValue: '1024' + divisibilityFactor: 1 + mode: readwrite + name: group_concat_max_len + optional: '[4-1844674407370954752]' + restart: false + unit: INT + - defaultValue: '644' + divisibilityFactor: 1 + mode: readwrite + name: host_cache_size + optional: '[0-65535]' + restart: false + unit: INT + - defaultValue: '''''' + divisibilityFactor: 0 + mode: readwrite + name: init_connect + optional: '[''''|''set names utf8mb4''|''set names utf8''|''set names utf8mb4 + collate utf8mb4_general_ci'']' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_adaptive_flushing + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '10' + divisibilityFactor: 1 + mode: readwrite + name: innodb_adaptive_flushing_lwm + optional: '[0-70]' + restart: false + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: innodb_adaptive_hash_index + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '150000' + divisibilityFactor: 1 + mode: readwrite + name: innodb_adaptive_max_sleep_delay + optional: '[1-1000000]' + restart: false + unit: INT + - defaultValue: '64' + divisibilityFactor: 1 + mode: readwrite + name: innodb_autoextend_increment + optional: '[1-1000]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_buffer_pool_dump_at_shutdown + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '25' + divisibilityFactor: 1 + mode: readwrite + name: innodb_buffer_pool_dump_pct + optional: '[1-100]' + restart: false + unit: INT + - defaultValue: all + divisibilityFactor: 0 + mode: readwrite + name: innodb_change_buffering + optional: '[none|inserts|deletes|changes|purges|all]' + restart: false + unit: STRING + - defaultValue: '25' + divisibilityFactor: 1 + mode: readwrite + name: innodb_change_buffer_max_size + optional: '[0-50]' + restart: false + unit: INT + - defaultValue: crc32 + divisibilityFactor: 0 + mode: readwrite + name: innodb_checksum_algorithm + optional: '[innodb|crc32|none|strict_innodb|strict_crc32|strict_none]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: innodb_cmp_per_index_enabled + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '5' + divisibilityFactor: 1 + mode: readwrite + name: innodb_compression_failure_threshold_pct + optional: '[0-100]' + restart: false + unit: INT + - defaultValue: '6' + divisibilityFactor: 1 + mode: readwrite + name: innodb_compression_level + optional: '[0-9]' + restart: false + unit: INT + - defaultValue: '50' + divisibilityFactor: 1 + mode: readwrite + name: innodb_compression_pad_pct_max + optional: '[0-70]' + restart: false + unit: INT + - defaultValue: '5000' + divisibilityFactor: 1 + mode: readwrite + name: innodb_concurrency_tickets + optional: '[1-4294967295]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_deadlock_detect + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_disable_sort_file_cache + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '1' + divisibilityFactor: 0 + mode: readwrite + name: innodb_flush_log_at_trx_commit + optional: '[0|1|2]' + restart: false + unit: STRING + - defaultValue: '1' + divisibilityFactor: 0 + mode: readwrite + name: innodb_flush_neighbors + optional: '[0|1|2]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_flush_sync + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: innodb_ft_enable_diag_print + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_ft_enable_stopword + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '2000' + divisibilityFactor: 1 + mode: readwrite + name: innodb_ft_num_word_optimize + optional: '[0-10000]' + restart: false + unit: INT + - defaultValue: '2000000000' + divisibilityFactor: 1 + mode: readwrite + name: innodb_ft_result_cache_limit + optional: '[1000000-4294967295]' + restart: false + unit: INT + - defaultValue: '' + divisibilityFactor: 0 + mode: readwrite + name: innodb_ft_server_stopword_table + optional: .* + restart: false + unit: STRING + - defaultValue: '20000' + divisibilityFactor: 1 + mode: readwrite + name: innodb_io_capacity + optional: '[0-18446744073709551615]' + restart: false + unit: INT + - defaultValue: '40000' + divisibilityFactor: 1 + mode: readwrite + name: innodb_io_capacity_max + optional: '[0-18446744073709551615]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_large_prefix + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '50' + divisibilityFactor: 1 + mode: readwrite + name: innodb_lock_wait_timeout + optional: '[1-1073741824]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_log_checksums + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '8192' + divisibilityFactor: 1 + mode: readwrite + name: innodb_lru_scan_depth + optional: '[100-18446744073709551615]' + restart: false + unit: INT + - defaultValue: '75' + divisibilityFactor: 1 + mode: readwrite + name: innodb_max_dirty_pages_pct + optional: '[0-99]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: innodb_max_dirty_pages_pct_lwm + optional: '[0-99]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: innodb_max_purge_lag + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: innodb_max_purge_lag_delay + optional: '[0-10000000]' + restart: false + unit: INT + - defaultValue: '1073741824' + divisibilityFactor: 1 + mode: readwrite + name: innodb_max_undo_log_size + optional: '[10485760-18446744073709551615]' + restart: false + unit: INT + - defaultValue: '' + divisibilityFactor: 0 + mode: readwrite + name: innodb_monitor_disable + optional: all + restart: false + unit: STRING + - defaultValue: '' + divisibilityFactor: 0 + mode: readwrite + name: innodb_monitor_enable + optional: all + restart: false + unit: STRING + - defaultValue: '37' + divisibilityFactor: 1 + mode: readwrite + name: innodb_old_blocks_pct + optional: '[5-95]' + restart: false + unit: INT + - defaultValue: '1000' + divisibilityFactor: 1 + mode: readwrite + name: innodb_old_blocks_time + optional: '[0-1024]' + restart: false + unit: INT + - defaultValue: '134217728' + divisibilityFactor: 1 + mode: readwrite + name: innodb_online_alter_log_max_size + optional: '[134217728-2147483647]' + restart: false + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: innodb_optimize_fulltext_only + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_print_all_deadlocks + optional: '[OFF|ON]' + restart: false + unit: STRING + - defaultValue: '128' + divisibilityFactor: 1 + mode: readwrite + name: innodb_purge_rseg_truncate_frequency + optional: '[1-128]' + restart: false + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: innodb_random_read_ahead + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '56' + divisibilityFactor: 1 + mode: readwrite + name: innodb_read_ahead_threshold + optional: '[0-1024]' + restart: false + unit: INT + - defaultValue: '128' + divisibilityFactor: 1 + mode: readwrite + name: innodb_rollback_segments + optional: '[1-128]' + restart: false + unit: INT + - defaultValue: '6' + divisibilityFactor: 1 + mode: readwrite + name: innodb_spin_wait_delay + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_stats_auto_recalc + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: nulls_equal + divisibilityFactor: 0 + mode: readwrite + name: innodb_stats_method + optional: '[nulls_equal|nulls_unequal|nulls_ignored]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: innodb_stats_on_metadata + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_stats_persistent + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '20' + divisibilityFactor: 1 + mode: readwrite + name: innodb_stats_persistent_sample_pages + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: '8' + divisibilityFactor: 1 + mode: readwrite + name: innodb_stats_sample_pages + optional: '[1-4294967296]' + restart: false + unit: INT + - defaultValue: '8' + divisibilityFactor: 1 + mode: readwrite + name: innodb_stats_transient_sample_pages + optional: '[1-4294967295]' + restart: false + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: innodb_status_output + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: innodb_status_output_locks + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_strict_mode + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '30' + divisibilityFactor: 1 + mode: readwrite + name: innodb_sync_spin_loops + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_table_locks + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: innodb_thread_concurrency + optional: '[0-1000]' + restart: false + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: innodb_thread_sleep_delay + optional: '[0-1000000]' + restart: false + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: innodb_undo_log_truncate + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '7200' + divisibilityFactor: 1 + mode: readwrite + name: interactive_timeout + optional: '[10-86400]' + restart: false + unit: INT + - defaultValue: '{LEAST(DBInstanceClassMemory/1048576*128, 262144)}' + divisibilityFactor: 1 + mode: readwrite + name: join_buffer_size + optional: '[128-4294967295]' + restart: false + unit: INT + - defaultValue: '300' + divisibilityFactor: 100 + mode: readwrite + name: key_cache_age_threshold + optional: '[100-4294967295]' + restart: false + unit: INT + - defaultValue: '1024' + divisibilityFactor: 512 + mode: readwrite + name: key_cache_block_size + optional: '[512-16384]' + restart: false + unit: B + - defaultValue: '100' + divisibilityFactor: 1 + mode: readwrite + name: key_cache_division_limit + optional: '[1-100]' + restart: false + unit: INT + - defaultValue: en_US + divisibilityFactor: 0 + mode: readwrite + name: lc_time_names + optional: '[ja_JP|pt_BR|en_US]' + restart: false + unit: STRING + - defaultValue: '1800' + divisibilityFactor: 1 + mode: readwrite + name: lock_wait_timeout + optional: '[1-1073741824]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 0 + mode: readwrite + name: log_bin_use_v1_row_events + optional: '[0|1]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: log_bin_trust_function_creators + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: log_queries_not_using_indexes + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: log_slow_admin_statements + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: log_slow_slave_statements + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: log_throttle_queries_not_using_indexes + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: '1' + divisibilityFactor: 6 + mode: readwrite + name: long_query_time + optional: '[0.1-31536000]' + restart: false + unit: DOUBLE + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_hotspot + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_hotspot_for_autocommit + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_hotspot_lock_type + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: loose_implicit_primary_key + optional: '[0-1]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_innodb_data_file_purge + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '100' + divisibilityFactor: 1 + mode: readwrite + name: loose_innodb_data_file_purge_interval + optional: '[0-10000]' + restart: false + unit: INT + - defaultValue: '128' + divisibilityFactor: 1 + mode: readwrite + name: loose_innodb_data_file_purge_max_size + optional: '[16-1073741824]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_innodb_log_compressed_pages + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_max_execution_time + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_opt_rds_audit_log_enabled + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,subquery_materialization_cost_based=on,use_index_extensions=on + divisibilityFactor: 0 + mode: readwrite + name: loose_optimizer_switch + optional: .* + restart: false + unit: STRING + - defaultValue: enabled=off,one_line=off + divisibilityFactor: 0 + mode: readwrite + name: loose_optimizer_trace + optional: .* + restart: false + unit: STRING + - defaultValue: greedy_search=on,range_optimizer=on,dynamic_range=on,repeated_subselect=on + divisibilityFactor: 0 + mode: readwrite + name: loose_optimizer_trace_features + optional: .* + restart: false + unit: STRING + - defaultValue: '16777216' + divisibilityFactor: 1 + mode: readwrite + name: loose_rds_audit_log_buffer_size + optional: '[16777216-104857600]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_rds_audit_log_cached_method + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_rds_audit_log_reserve_all + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: MYSQL_V1 + divisibilityFactor: 0 + mode: readwrite + name: loose_rds_audit_log_version + optional: '[MYSQL_V1|MYSQL_V3]' + restart: false + unit: STRING + - defaultValue: '2048' + divisibilityFactor: 1 + mode: readwrite + name: loose_rds_audit_max_sql_size + optional: '[0-32768]' + restart: false + unit: INT + - defaultValue: '100000' + divisibilityFactor: 1 + mode: readwrite + name: loose_rds_audit_row_limit + optional: '[0-100000000]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_rds_force_memory_to_innodb + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_rds_force_myisam_to_innodb + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_rds_set_connection_id_enabled + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '' + divisibilityFactor: 1 + mode: readwrite + name: loose_rds_user_with_kill_option + optional: .* + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_rpl_semi_sync_master_enabled + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '1000' + divisibilityFactor: 1 + mode: readwrite + name: loose_rpl_semi_sync_master_timeout + optional: '[0-18446744073709551615]' + restart: false + unit: INT + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: loose_rpl_semi_sync_master_trace_level + optional: '[1|16|32|64]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_rpl_semi_sync_master_wait_no_slave + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: AFTER_SYNC + divisibilityFactor: 0 + mode: readwrite + name: loose_rpl_semi_sync_master_wait_point + optional: '[AFTER_SYNC|AFTER_COMMIT]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 1 + mode: readwrite + name: loose_rpl_semi_sync_slave_enabled + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: loose_rpl_semi_sync_slave_trace_level + optional: '[1|16|32|64]' + restart: false + unit: STRING + - defaultValue: '"*"' + divisibilityFactor: 0 + mode: readwrite + name: loose_session_track_system_variables + optional: .* + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_session_track_transaction_info + optional: '[STATE|CHARACTERISTICS|OFF]' + restart: false + unit: STRING + - defaultValue: '8' + divisibilityFactor: 1 + mode: readwrite + name: loose_slave_parallel_workers + optional: '[0-1024]' + restart: false + unit: INT + - defaultValue: '32' + divisibilityFactor: 1 + mode: readwrite + name: loose_thread_pool_size + optional: '[1-64]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 0 + mode: readwrite + name: low_priority_updates + optional: '[0|1]' + restart: false + unit: STRING + - defaultValue: TABLE + divisibilityFactor: 0 + mode: readwrite + name: master_info_repository + optional: '[TABLE|FILE]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: master_verify_checksum + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '1073741824' + divisibilityFactor: 1 + mode: readwrite + name: max_allowed_packet + optional: '[16384-1073741824]' + restart: false + unit: INT + - defaultValue: '18446744073709551615' + divisibilityFactor: 1 + mode: readwrite + name: max_binlog_cache_size + optional: '[4096-18446744073709547520]' + restart: false + unit: INT + - defaultValue: '18446744073709551615' + divisibilityFactor: 4096 + mode: readwrite + name: max_binlog_stmt_cache_size + optional: '[4096-18446744073709547520]' + restart: false + unit: INT + - defaultValue: '100' + divisibilityFactor: 1 + mode: readwrite + name: max_connect_errors + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: '64' + divisibilityFactor: 1 + mode: readwrite + name: max_error_count + optional: '[0-65535]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: max_execution_time + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: '67108864' + divisibilityFactor: 1024 + mode: readwrite + name: max_heap_table_size + optional: '[16384-1844674407370954752]' + restart: false + unit: INT + - defaultValue: '18446744073709551615' + divisibilityFactor: 1 + mode: readwrite + name: max_join_size + optional: '[1-18446744073709551615]' + restart: false + unit: INT + - defaultValue: '1024' + divisibilityFactor: 1 + mode: readwrite + name: max_length_for_sort_data + optional: '[0-838860]' + restart: false + unit: INT + - defaultValue: '65536' + divisibilityFactor: 1 + mode: readwrite + name: max_points_in_geometry + optional: '[3-1048576]' + restart: false + unit: INT + - defaultValue: '16382' + divisibilityFactor: 1 + mode: readwrite + name: max_prepared_stmt_count + optional: '[0-1048576]' + restart: false + unit: INT + - defaultValue: '18446744073709551615' + divisibilityFactor: 1 + mode: readwrite + name: max_seeks_for_key + optional: '[1-18446744073709551615]' + restart: false + unit: INT + - defaultValue: '1024' + divisibilityFactor: 1 + mode: readwrite + name: max_sort_length + optional: '[4-8388608]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: max_sp_recursion_depth + optional: '[0-255]' + restart: false + unit: INT + - defaultValue: '102400' + divisibilityFactor: 1 + mode: readwrite + name: max_write_lock_count + optional: '[1-102400]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: min_examined_row_limit + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: '262144' + divisibilityFactor: 1 + mode: readwrite + name: myisam_sort_buffer_size + optional: '[262144-16777216]' + restart: false + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: mysql_native_password_proxy_users + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '16384' + divisibilityFactor: 1024 + mode: readwrite + name: net_buffer_length + optional: '[1024-1048576]' + restart: false + unit: INT + - defaultValue: '30' + divisibilityFactor: 1 + mode: readwrite + name: net_read_timeout + optional: '[1-18446744073709551615]' + restart: false + unit: INT + - defaultValue: '10' + divisibilityFactor: 1 + mode: readwrite + name: net_retry_count + optional: '[1-4294967295]' + restart: false + unit: INT + - defaultValue: '60' + divisibilityFactor: 1 + mode: readwrite + name: net_write_timeout + optional: '[1-18446744073709551615]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 0 + mode: readwrite + name: old_passwords + optional: '[0|2]' + restart: false + unit: STRING + - defaultValue: '1' + divisibilityFactor: 0 + mode: readwrite + name: optimizer_prune_level + optional: '[0|1]' + restart: false + unit: STRING + - defaultValue: '62' + divisibilityFactor: 1 + mode: readwrite + name: optimizer_search_depth + optional: '[0-62]' + restart: false + unit: INT + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: optimizer_trace_limit + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: '16384' + divisibilityFactor: 1 + mode: readwrite + name: optimizer_trace_max_mem_size + optional: '[0-4294967295]' + restart: false + unit: INT + - defaultValue: '-1' + divisibilityFactor: 1 + mode: readwrite + name: optimizer_trace_offset + optional: '[-2147483648-2147483647]' + restart: false + unit: INT + - defaultValue: '32768' + divisibilityFactor: 1 + mode: readwrite + name: preload_buffer_size + optional: '[1024-1073741824]' + restart: false + unit: INT + - defaultValue: '8192' + divisibilityFactor: 1024 + mode: readwrite + name: query_alloc_block_size + optional: '[1024-16384]' + restart: false + unit: INT + - defaultValue: '1048576' + divisibilityFactor: 1 + mode: readwrite + name: query_cache_limit + optional: '[1-1048576]' + restart: false + unit: INT + - defaultValue: '1024' + divisibilityFactor: 512 + mode: readwrite + name: query_cache_min_res_unit + optional: '[512-18446744073709551608]' + restart: false + unit: INT + - defaultValue: '0' + divisibilityFactor: 1024 + mode: readwrite + name: query_cache_size + optional: '[0-10485760000]' + restart: false + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 1 + mode: readwrite + name: query_cache_wlock_invalidate + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '8192' + divisibilityFactor: 1024 + mode: readwrite + name: query_prealloc_size + optional: '[8192-1048576]' + restart: false + unit: INT + - defaultValue: '4096' + divisibilityFactor: 1 + mode: readwrite + name: range_alloc_block_size + optional: '[4096-18446744073709551615]' + restart: false + unit: INT + - defaultValue: '8388608' + divisibilityFactor: 1 + mode: readwrite + name: range_optimizer_max_mem_size + optional: '[0-18446744073709551615]' + restart: false + unit: INT + - defaultValue: '{LEAST(DBInstanceClassMemory/1048576*128, 262144)}' + divisibilityFactor: 1 + mode: readwrite + name: read_buffer_size + optional: '[8200-2147479552]' + restart: false + unit: INT + - defaultValue: TABLE + divisibilityFactor: 0 + mode: readwrite + name: relay_log_info_repository + optional: '[TABLE|FILE]' + restart: false + unit: STRING + - defaultValue: AFTER_SYNC + divisibilityFactor: 0 + mode: readwrite + name: rpl_semi_sync_master_wait_point + optional: '[AFTER_SYNC|AFTER_COMMIT]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: session_track_gtids + optional: '[OFF|OWN_GTID|ALL_GTIDS]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: session_track_schema + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: session_track_state_change + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: sha256_password_proxy_users + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: show_compatibility_56 + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: show_old_temporals + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: strict + divisibilityFactor: 0 + mode: readwrite + name: slave_exec_mode + optional: '[smart|strict]' + restart: false + unit: STRING + - defaultValue: '60' + divisibilityFactor: 1 + mode: readwrite + name: slave_net_timeout + optional: '[15-300]' + restart: false + unit: INT + - defaultValue: '2' + divisibilityFactor: 1 + mode: readwrite + name: slow_launch_time + optional: '[1-1024]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: slow_query_log + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '868352' + divisibilityFactor: 1 + mode: readwrite + name: sort_buffer_size + optional: '[32768-4294967295]' + restart: false + unit: INT + - defaultValue: '' + divisibilityFactor: 0 + mode: readwrite + name: sql_mode + optional: (\s*|REAL_AS_FLOAT|PIPES_AS_CONCAT|ANSI_QUOTES|IGNORE_SPACE|ONLY_FULL_GROUP_BY|NO_UNSIGNED_SUBTRACTION|NO_DIR_IN_CREATE|POSTGRESQL|ORACLE|MSSQL|DB2|MAXDB|NO_KEY_OPTIONS|NO_TABLE_OPTIONS|NO_FIELD_OPTIONS|MYSQL323|MYSQL40|ANSI|NO_AUTO_VALUE_ON_ZERO|NO_BACKSLASH_ESCAPES|STRICT_TRANS_TABLES|STRICT_ALL_TABLES|NO_ZERO_IN_DATE|NO_ZERO_DATE|ALLOW_INVALID_DATES|ERROR_FOR_DIVISION_BY_ZERO|TRADITIONAL|HIGH_NOT_PRECEDENCE|NO_ENGINE_SUBSTITUTION|PAD_CHAR_TO_FULL_LENGTH|NO_AUTO_CREATE_USER)(,NO_AUTO_CREATE_USER|,REAL_AS_FLOAT|,PIPES_AS_CONCAT|,ANSI_QUOTES|,IGNORE_SPACE|,ONLY_FULL_GROUP_BY|,NO_UNSIGNED_SUBTRACTION|,NO_DIR_IN_CREATE|,POSTGRESQL|,ORACLE|,MSSQL|,DB2|,MAXDB|,NO_KEY_OPTIONS|,NO_TABLE_OPTIONS|,NO_FIELD_OPTIONS|,MYSQL323|,MYSQL40|,ANSI|,NO_AUTO_VALUE_ON_ZERO|,NO_BACKSLASH_ESCAPES|,STRICT_TRANS_TABLES|,STRICT_ALL_TABLES|,NO_ZERO_IN_DATE|,NO_ZERO_DATE|,ALLOW_INVALID_DATES|,ERROR_FOR_DIVISION_BY_ZERO|,TRADITIONAL|,HIGH_NOT_PRECEDENCE|,NO_ENGINE_SUBSTITUTION|,PAD_CHAR_TO_FULL_LENGTH)* + restart: false + unit: STRING + - defaultValue: '256' + divisibilityFactor: 1 + mode: readwrite + name: stored_program_cache + optional: '[16-524288]' + restart: false + unit: INT + - defaultValue: '{LEAST(DBInstanceClassMemory/1073741824*1024, 20000)}' + divisibilityFactor: 1 + mode: readwrite + name: table_definition_cache + optional: '[400-524288]' + restart: false + unit: INT + - defaultValue: '{LEAST(DBInstanceClassMemory/1073741824*1024, 20000)}' + divisibilityFactor: 1 + mode: readwrite + name: table_open_cache + optional: '[1-524288]' + restart: false + unit: INT + - defaultValue: '256' + divisibilityFactor: 1 + mode: readwrite + name: thread_cache_size + optional: '[0-16384]' + restart: false + unit: INT + - defaultValue: '2097152' + divisibilityFactor: 1 + mode: readwrite + name: tmp_table_size + optional: '[262144-134217728]' + restart: false + unit: INT + - defaultValue: '8192' + divisibilityFactor: 1024 + mode: readwrite + name: transaction_alloc_block_size + optional: '[1024-131072]' + restart: false + unit: INT + - defaultValue: REPEATABLE-READ + divisibilityFactor: 0 + mode: readwrite + name: transaction_isolation + optional: '[READ-UNCOMMITTED|READ-COMMITTED|REPEATABLE-READ|SERIALIZABLE]' + restart: false + unit: STRING + - defaultValue: '4096' + divisibilityFactor: 1024 + mode: readwrite + name: transaction_prealloc_size + optional: '[1024-131072]' + restart: false + unit: INT + - defaultValue: 'YES' + divisibilityFactor: 0 + mode: readwrite + name: updatable_views_with_limit + optional: '[YES|NO]' + restart: false + unit: STRING + - defaultValue: '86400' + divisibilityFactor: 1 + mode: readwrite + name: wait_timeout + optional: '[1-31536000]' + restart: false + unit: INT + - defaultValue: WRITESET + divisibilityFactor: 1 + mode: readwrite + name: binlog_transaction_dependency_tracking + optional: '[WRITESET|WRITESET_SESSION|COMMIT_ORDER]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: local_infile + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '2' + divisibilityFactor: 1 + mode: readwrite + name: log_error_verbosity + optional: '[1-3]' + restart: false + unit: INT + - defaultValue: '10' + divisibilityFactor: 1 + mode: readwrite + name: loose_innodb_index_pct_free + optional: '[5-60]' + restart: false + unit: INT + - defaultValue: INNODB + divisibilityFactor: 0 + mode: readwrite + name: loose_internal_tmp_disk_storage_engine + optional: '[INNODB|MYISAM]' + restart: false + unit: STRING + - defaultValue: '2' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_point_iostat_interval + optional: '[0-60]' + restart: false + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_performance_point_lock_rwlock_enabled + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '32' + divisibilityFactor: 1 + mode: readwrite + name: loose_thread_pool_oversubscribe + optional: '[10-64]' + restart: false + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: sync_master_info + optional: '[0-18446744073709551615]' + restart: false + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: sync_relay_log_info + optional: '[0-18446744073709551615]' + restart: false + unit: INT + - defaultValue: XXHASH64 + divisibilityFactor: 1 + mode: readwrite + name: transaction_write_set_extraction + optional: '[OFF|MURMUR32|XXHASH64]' + restart: false + unit: STRING + - defaultValue: '3000' + divisibilityFactor: 1 + mode: readwrite + name: back_log + optional: '[0-65535]' + restart: true + unit: INT + - defaultValue: CRC32 + divisibilityFactor: 0 + mode: readwrite + name: binlog_checksum + optional: '[CRC32|NONE]' + restart: true + unit: STRING + - defaultValue: utf8 + divisibilityFactor: 0 + mode: readwrite + name: character_set_server + optional: '[utf8|latin1|gbk|gb18030|utf8mb4]' + restart: true + unit: STRING + - defaultValue: InnoDB + divisibilityFactor: 0 + mode: readwrite + name: default_storage_engine + optional: '[InnoDB|innodb]' + restart: true + unit: STRING + - defaultValue: '+8:00' + divisibilityFactor: 0 + mode: readwrite + name: default_time_zone + optional: '[SYSTEM|-12:00|-11:00|-10:00|-9:00|-8:00|-7:00|-6:00|-5:00|-4:00|-3:00|-2:00|-1:00|\+0:00|\+1:00|\+2:00|\+3:00|\+4:00|\+5:00|\+5:30|\+5:45|\+6:00|\+6:30|\+7:00|\+8:00|\+9:00|\+10:00|\+11:00|\+12:00|\+13:00]' + restart: true + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: disconnect_on_expired_password + optional: '[ON|OFF]' + restart: true + unit: STRING + - defaultValue: '84' + divisibilityFactor: 1 + mode: readwrite + name: ft_max_word_len + optional: '[10-4294967295]' + restart: true + unit: INT + - defaultValue: '4' + divisibilityFactor: 1 + mode: readwrite + name: ft_min_word_len + optional: '[1-3600]' + restart: true + unit: INT + - defaultValue: '20' + divisibilityFactor: 1 + mode: readwrite + name: ft_query_expansion_limit + optional: '[0-1000]' + restart: true + unit: INT + - defaultValue: '2' + divisibilityFactor: 0 + mode: readwrite + name: innodb_autoinc_lock_mode + optional: '[0|1|2]' + restart: true + unit: STRING + - defaultValue: '8' + divisibilityFactor: 1 + mode: readwrite + name: innodb_buffer_pool_instances + optional: '[1-64]' + restart: true + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: innodb_buffer_pool_load_at_startup + optional: '[ON|OFF]' + restart: true + unit: STRING + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: innodb_commit_concurrency + optional: '[0-1000]' + restart: true + unit: INT + - defaultValue: O_DIRECT + divisibilityFactor: 0 + mode: readwrite + name: innodb_flush_method + optional: '[fsync|O_DSYNC|littlesync|nosync|O_DIRECT|O_DIRECT_NO_FSYNC]' + restart: true + unit: STRING + - defaultValue: '8000000' + divisibilityFactor: 1 + mode: readwrite + name: innodb_ft_cache_size + optional: '[1600000-80000000]' + restart: true + unit: INT + - defaultValue: '84' + divisibilityFactor: 1 + mode: readwrite + name: innodb_ft_max_token_size + optional: '[10-84]' + restart: true + unit: INT + - defaultValue: '3' + divisibilityFactor: 1 + mode: readwrite + name: innodb_ft_min_token_size + optional: '[0-16]' + restart: true + unit: INT + - defaultValue: '2' + divisibilityFactor: 1 + mode: readwrite + name: innodb_ft_sort_pll_degree + optional: '[1-16]' + restart: true + unit: INT + - defaultValue: '640000000' + divisibilityFactor: 1 + mode: readwrite + name: innodb_ft_total_cache_size + optional: '[32000000-1600000000]' + restart: true + unit: INT + - defaultValue: '8589934592' + divisibilityFactor: 1024 + mode: readwrite + name: innodb_log_file_size + optional: '[4194304-107374182400]' + restart: true + unit: INT + - defaultValue: '{LEAST(DBInstanceClassMemory/1073741824*1024, 20000)}' + divisibilityFactor: 1 + mode: readwrite + name: innodb_open_files + optional: '[10-2147483647]' + restart: true + unit: INT + - defaultValue: '4' + divisibilityFactor: 1 + mode: readwrite + name: innodb_page_cleaners + optional: '[1-64]' + restart: true + unit: INT + - defaultValue: '300' + divisibilityFactor: 1 + mode: readwrite + name: innodb_purge_batch_size + optional: '[1-5000]' + restart: true + unit: INT + - defaultValue: '4' + divisibilityFactor: 1 + mode: readwrite + name: innodb_purge_threads + optional: '[1-32]' + restart: true + unit: INT + - defaultValue: '4' + divisibilityFactor: 1 + mode: readwrite + name: innodb_read_io_threads + optional: '[1-64]' + restart: true + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: innodb_rollback_on_timeout + optional: '[OFF|ON]' + restart: true + unit: STRING + - defaultValue: '1048576' + divisibilityFactor: 512 + mode: readwrite + name: innodb_sort_buffer_size + optional: '[65536-67108864]' + restart: true + unit: INT + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: innodb_sync_array_size + optional: '[1-64]' + restart: true + unit: INT + - defaultValue: '4' + divisibilityFactor: 1 + mode: readwrite + name: innodb_write_io_threads + optional: '[1-64]' + restart: true + unit: INT + - defaultValue: AES_256_CBC + divisibilityFactor: 0 + mode: readwrite + name: loose_innodb_encrypt_algorithm + optional: '[AES_256_CBC|SM4]' + restart: true + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_innodb_numa_interleave + optional: '[ON|OFF]' + restart: true + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_innodb_support_instant_add_column + optional: '[ON|OFF]' + restart: false + unit: STRING + - defaultValue: '1' + divisibilityFactor: 0 + mode: readwrite + name: lower_case_table_names + optional: '[0|1]' + restart: true + unit: STRING + - defaultValue: '1024' + divisibilityFactor: 1 + mode: readwrite + name: metadata_locks_cache_size + optional: '[1-1048576]' + restart: true + unit: INT + - defaultValue: '2' + divisibilityFactor: 1 + mode: readwrite + name: ngram_token_size + optional: '[0-20]' + restart: true + unit: int + - defaultValue: '65535' + divisibilityFactor: 1 + mode: readwrite + name: open_files_limit + optional: '[1-2147483647]' + restart: true + unit: INT + - defaultValue: '{LEAST(DBInstanceClassMemory/8589934592, 1)}' + divisibilityFactor: 1 + mode: readwrite + name: performance_schema + optional: '[0-1]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 0 + mode: readwrite + name: query_cache_type + optional: '[0|1|2]' + restart: true + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: relay_log_recovery + optional: '[ON|OFF]' + restart: true + unit: STRING + - defaultValue: LOGICAL_CLOCK + divisibilityFactor: 0 + mode: readwrite + name: slave_parallel_type + optional: '[DATABASE|LOGICAL_CLOCK]' + restart: true + unit: STRING + - defaultValue: '16' + divisibilityFactor: 1 + mode: readwrite + name: table_open_cache_instances + optional: '[1-64]' + restart: true + unit: INT + - defaultValue: '262144' + divisibilityFactor: 1024 + mode: readwrite + name: thread_stack + optional: '[131072-2147483647]' + restart: true + unit: INT + - defaultValue: TLSv1,TLSv1.1,TLSv1.2 + divisibilityFactor: 0 + mode: readwrite + name: tls_version + optional: '[TLSv1,TLSv1.1,TLSv1...' + restart: true + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: general_log + optional: 'OFF' + restart: true + unit: STRING + - defaultValue: '33554432' + divisibilityFactor: 1048576 + mode: readwrite + name: innodb_buffer_pool_chunk_size + optional: '[1048576-9223372036854775807]' + restart: true + unit: INT + - defaultValue: ibtmp1:12M:autoextend + divisibilityFactor: 0 + mode: readwrite + name: innodb_temp_data_file_path + optional: .* + restart: true + unit: STRING + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: innodb_undo_tablespaces + optional: '[0-126]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_point_iostat_volume_size + optional: '[0-100000]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_accounts_size + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_performance_schema_consumer_events_stages_current + optional: '[OFF|ON]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_performance_schema_consumer_events_stages_history + optional: '[OFF|ON]' + restart: false + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_performance_schema_consumer_events_stages_history_long + optional: '[OFF|ON]' + restart: false + unit: STRING + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_digests_size + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_events_stages_history_long_size + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_events_stages_history_size + optional: '[-1-1024]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_events_statements_history_long_size + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_events_statements_history_size + optional: '[-1-1024]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_events_transactions_history_long_size + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_events_transactions_history_size + optional: '[-1-1024]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_events_waits_history_long_size + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_events_waits_history_size + optional: '[-1-1024]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_hosts_size + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '''%%%%=OFF''' + divisibilityFactor: 0 + mode: readwrite + name: performance_schema_instrument + optional: .* + restart: true + unit: STRING + - defaultValue: '''wait/lock/metadata/sql/mdl=ON''' + divisibilityFactor: 0 + mode: readwrite + name: loose_performance_schema_instrument + optional: .* + restart: true + unit: STRING + - defaultValue: '''memory/%%%%=COUNTED''' + divisibilityFactor: 0 + mode: readwrite + name: loose_performance_schema_instrument + optional: .* + restart: true + unit: STRING + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_cond_classes + optional: '[0-256]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_cond_instances + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_digest_length + optional: '[0-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_file_classes + optional: '[0-256]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_file_handles + optional: '[-1-32768]' + restart: true + unit: INT + - defaultValue: '1000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_file_instances + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_index_stat + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_memory_classes + optional: '[0-1024]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_metadata_locks + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_mutex_classes + optional: '[0-256]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_mutex_instances + optional: '[-1-104857600]' + restart: true + unit: INT + - defaultValue: '1000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_prepared_statements_instances + optional: '[-1-4194304]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_program_instances + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_rwlock_classes + optional: '[0-256]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_rwlock_instances + optional: '[-1-104857600]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_socket_classes + optional: '[0-256]' + restart: true + unit: INT + - defaultValue: '1000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_socket_instances + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_sql_text_length + optional: '[0-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_stage_classes + optional: '[0-256]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_statement_classes + optional: '[0-256]' + restart: true + unit: INT + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_statement_stack + optional: '[0-256]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_table_handles + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '1000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_table_instances + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_table_lock_stat + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_thread_classes + optional: '[0-256]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_max_thread_instances + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_session_connect_attrs_size + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_setup_actors_size + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_setup_objects_size + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_performance_schema_users_size + optional: '[-1-1048576]' + restart: true + unit: INT + - defaultValue: '' + divisibilityFactor: 0 + mode: readwrite + name: slave_type_conversions + optional: '[s*|ALL_LOSSY|ALL_NON_LOSSY|ALL_SIGNED|ALL_UNSIGNED]' + restart: true + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: binlog_rows_query_key_content + optional: '[ON|OFF]' + restart: true + unit: STRING + - defaultValue: '4' + divisibilityFactor: 1 + mode: readwrite + name: consensus_io_thread_cnt + optional: .* + restart: true + unit: INT + - defaultValue: '100000' + divisibilityFactor: 1 + mode: readwrite + name: consensus_new_follower_threshold + optional: .* + restart: true + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: consensus_replicate_with_cache_log + optional: .* + restart: true + unit: STRING + - defaultValue: '4' + divisibilityFactor: 1 + mode: readwrite + name: consensus_worker_thread_cnt + optional: .* + restart: true + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: enable_appliedindex_checker + optional: .* + restart: true + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: enforce_gtid_consistency + optional: .* + restart: true + unit: STRING + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: expire_logs_days + optional: .* + restart: true + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: gtid_mode + optional: .* + restart: true + unit: STRING + - defaultValue: '8388608' + divisibilityFactor: 1 + mode: readwrite + name: innodb_log_buffer_size + optional: .* + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: io_state_delay_threshold + optional: .* + restart: true + unit: INT + - defaultValue: '120' + divisibilityFactor: 1 + mode: readwrite + name: io_state_retry_times + optional: .* + restart: true + unit: INT + - defaultValue: '16777216' + divisibilityFactor: 1 + mode: readwrite + name: key_buffer_size + optional: .* + restart: true + unit: INT + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: kill_idle_transaction + optional: .* + restart: true + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_async_commit + optional: .* + restart: true + unit: STRING + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: loose_boost_pk_access + optional: .* + restart: true + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_cluster-learner-node + optional: .* + restart: true + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_cluster-log-type-node + optional: .* + restart: true + unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_cluster-mts-recover-use-index + optional: .* + restart: true + unit: STRING + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: loose_commit_lock_done_count + optional: .* + restart: true + unit: INT + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_consensus_election_timeout + optional: .* + restart: true + unit: INT + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: loose_consensus_heartbeat_thread_cnt + optional: .* + restart: true + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_consensus_large_trx + optional: .* + restart: true + unit: STRING + - defaultValue: '10000' + divisibilityFactor: 1 + mode: readwrite + name: loose_consensus_max_delay_index + optional: .* + restart: true + unit: INT + - defaultValue: '5000' + divisibilityFactor: 1 + mode: readwrite + name: loose_consensus_min_delay_index + optional: .* + restart: true + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_consensus_optimistic_heartbeat + optional: .* + restart: true + unit: STRING + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: loose_enable_gts + optional: '[0|1]' + restart: true + unit: STRING + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_expire_logs_days + optional: .* + restart: true + unit: INT + - defaultValue: '2000' + divisibilityFactor: 1 + mode: readwrite + name: loose_gts_lease + optional: '[0-2147483647]' + restart: true + unit: INT + - defaultValue: PERSIST + divisibilityFactor: 0 + mode: readwrite + name: loose_innodb_csn_mode + optional: .* + restart: true + unit: STRING + - defaultValue: '5000' + divisibilityFactor: 1 + mode: readwrite + name: loose_innodb_prepare_wait_timeout + optional: '[0-2147483647]' + restart: true + unit: INT + - defaultValue: '1800000' + divisibilityFactor: 1 + mode: readwrite + name: loose_innodb_purge_history + optional: '[0-2147483647]' + restart: true + unit: INT + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: loose_io_state + optional: .* + restart: true + unit: INT + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: loose_log_slave_updates + optional: .* + restart: true + unit: INT + - defaultValue: wait/lock/metadata/sql/mdl=ON + divisibilityFactor: 0 + mode: readwrite + name: loose_performance-schema-instrument + optional: .* + restart: true + unit: STRING + - defaultValue: '16777216' + divisibilityFactor: 1 + mode: readwrite + name: loose_polarx_max_allowed_packet + optional: '[0-2147483647]' + restart: true + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_relay_log_purge + optional: .* + restart: true + unit: STRING + - defaultValue: '0' + divisibilityFactor: 1 + mode: readwrite + name: loose_relay_log_recovery + optional: .* + restart: true + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_replicate-same-server-id + optional: .* + restart: true + unit: STRING + - defaultValue: '3000' + divisibilityFactor: 1 + mode: readwrite + name: loose_replica_read_timeout + optional: '[0-2147483647]' + restart: true + unit: INT + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_rotate_log_table + optional: .* + restart: true + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: loose_skip_slave_start + optional: .* + restart: true + unit: STRING + - defaultValue: TABLE + divisibilityFactor: 0 + mode: readwrite + name: loose_slave_pr_mode + optional: .* + restart: true + unit: STRING + - defaultValue: one-thread-per-connection + divisibilityFactor: 0 + mode: readwrite + name: loose_thread_handling + optional: .* + restart: true + unit: STRING + - defaultValue: '442368' + divisibilityFactor: 1 + mode: readwrite + name: read_rnd_buffer_size + optional: .* + restart: true + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: relay_log_purge + optional: .* + restart: true + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: replicate-same-server-id + optional: .* + restart: true + unit: STRING + - defaultValue: 'OFF' + divisibilityFactor: 0 + mode: readwrite + name: skip_slave_start + optional: .* + restart: true + unit: STRING + - defaultValue: '1073741824' + divisibilityFactor: 1 + mode: readwrite + name: slave_pending_jobs_size_max + optional: .* + restart: true + unit: INT + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: slave_sql_verify_checksum + optional: .* + restart: true + unit: STRING + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: sync_binlog + optional: .* + restart: true + unit: INT + - defaultValue: '1' + divisibilityFactor: 1 + mode: readwrite + name: sync_relay_log + optional: .* + restart: true + unit: INT + - defaultValue: one-thread-per-connection + divisibilityFactor: 0 + mode: readwrite + name: thread_handling + optional: .* + restart: true + unit: STRING diff --git a/charts/polardbx-operator/templates/parameter-template-product.yaml b/charts/polardbx-operator/templates/parameter-template-product-80.yaml similarity index 99% rename from charts/polardbx-operator/templates/parameter-template-product.yaml rename to charts/polardbx-operator/templates/parameter-template-product-80.yaml index f1243ab..dc62663 100644 --- a/charts/polardbx-operator/templates/parameter-template-product.yaml +++ b/charts/polardbx-operator/templates/parameter-template-product-80.yaml @@ -1,7 +1,7 @@ apiVersion: polardbx.aliyun.com/v1 kind: PolarDBXParameterTemplate metadata: - name: product + name: product-80 spec: nodeType: cn: @@ -339,6 +339,13 @@ spec: optional: '[ON|OFF]' restart: false unit: STRING + - defaultValue: 'ON' + divisibilityFactor: 0 + mode: readwrite + name: loose_binlog_rows_query_key_content + optional: '[ON|OFF]' + restart: true + unit: STRING - defaultValue: '32768' divisibilityFactor: 4096 mode: readwrite @@ -750,7 +757,7 @@ spec: - defaultValue: '0' divisibilityFactor: 1 mode: readwrite - name: innodb_equal_gcn_visible + name: loose_innodb_equal_gcn_visible optional: .* restart: true unit: INT @@ -1272,7 +1279,7 @@ spec: optional: '[ja_JP|pt_BR|en_US]' restart: false unit: STRING - - defaultValue: 'OFF' + - defaultValue: 'ON' divisibilityFactor: 0 mode: readwrite name: local_infile @@ -2639,7 +2646,7 @@ spec: - defaultValue: '1073741824' divisibilityFactor: 1 mode: readwrite - name: temptable_max_ram + name: loose_temptable_max_ram optional: '[2097152-107374182400]' restart: false unit: INT diff --git a/charts/polardbx-operator/templates/tools-updater-daemonset.yaml b/charts/polardbx-operator/templates/tools-updater-daemonset.yaml index 90fb433..16fe2c3 100644 --- a/charts/polardbx-operator/templates/tools-updater-daemonset.yaml +++ b/charts/polardbx-operator/templates/tools-updater-daemonset.yaml @@ -16,7 +16,7 @@ spec: app.kubernetes.io/component: tools-updater updateStrategy: rollingUpdate: - maxUnavailable: 100% + maxUnavailable: 1 template: metadata: labels: diff --git a/charts/polardbx-operator/values.yaml b/charts/polardbx-operator/values.yaml index 2904f5c..e366304 100644 --- a/charts/polardbx-operator/values.yaml +++ b/charts/polardbx-operator/values.yaml @@ -14,7 +14,10 @@ images: polardbxJob: polardbx-job # Default image tag. Use app version if not specified or 'latest' if useLatestImage is true. -imageTag: v1.4.1 +imageTag: v1.5.0-beta + +# version will be written to pxc and xstore annotation +version: v1.5.0-beta # Uses the latest images for operator components. useLatestImage: false @@ -98,6 +101,13 @@ hostPathFileService: fsTotalFlow: 524288000 # 500MB/s fsBufferSize: 2097152 # 2MB sinks: + - name: default + type: s3 + minioEndpoint: xxx + minioAccessKey: xxx + minioSecretKey: xxxxx + minioBucket: xxx + useSSL: false - name: default type: oss endpoint: xxx @@ -111,9 +121,9 @@ hostPathFileService: user: admin password: xxxx rootPath: /xxx - - - + + + resources: requests: cpu: 100m diff --git a/cmd/polardbx-filestream-cli/main.go b/cmd/polardbx-filestream-cli/main.go index 55bc88e..c2d8c41 100644 --- a/cmd/polardbx-filestream-cli/main.go +++ b/cmd/polardbx-filestream-cli/main.go @@ -42,6 +42,7 @@ var ( stream string sink string ossBufferSize string + minioBufferSize string ) var activeHosts map[string]discovery.HostInfo @@ -57,6 +58,7 @@ func init() { flag.StringVar(&retentionTime, "meta.retentionTime", "", "Field RetentionTime of metadata") flag.StringVar(&sink, "meta.sink", "", "Sink name of metadata") flag.StringVar(&ossBufferSize, "meta.ossBufferSize", "", "oss buffer size of metadata") + flag.StringVar(&minioBufferSize, "meta.minioBufferSize", "", "minio buffer size of metadata") flag.StringVar(&destNodeName, "destNodeName", "", "The name of the destination node name") flag.StringVar(&hostInfoFilePath, "hostInfoFilePath", "/tools/xstore/hdfs-nodes.json", "The file path of the host info file") flag.StringVar(&stream, "stream", "", "The file stream type such as tar, default: empty string") @@ -112,15 +114,16 @@ func getHostInfo() map[string]discovery.HostInfo { func main() { client := NewFileClient(host, port, nil) metadata := ActionMetadata{ - Action: Action(action), - InstanceId: instanceId, - Filename: filename, - RedirectAddr: redirectAddr, - Filepath: filepath, - Stream: stream, - RequestId: uuid.New().String(), - Sink: sink, - OssBufferSize: ossBufferSize, + Action: Action(action), + InstanceId: instanceId, + Filename: filename, + RedirectAddr: redirectAddr, + Filepath: filepath, + Stream: stream, + RequestId: uuid.New().String(), + Sink: sink, + OssBufferSize: ossBufferSize, + MinioBufferSize: minioBufferSize, } if strings.HasPrefix(strings.ToLower(action), "upload") { len, err := client.Upload(os.Stdin, metadata) diff --git a/go.mod b/go.mod index 9a7a205..13b94b5 100644 --- a/go.mod +++ b/go.mod @@ -50,6 +50,7 @@ require ( require ( github.com/eapache/queue v1.1.0 github.com/itchyny/timefmt-go v0.1.4 + github.com/minio/minio-go/v7 v7.0.9-0.20210210235136-83423dddb072 github.com/onsi/ginkgo v1.16.5 github.com/pkg/errors v0.9.1 github.com/prometheus/common v0.26.0 @@ -83,10 +84,14 @@ require ( github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/json-iterator/go v1.1.11 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect + github.com/klauspost/cpuid v1.3.1 // indirect github.com/kr/fs v0.1.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mattn/go-isatty v0.0.12 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/minio/md5-simd v1.1.1 // indirect + github.com/minio/sha256-simd v0.1.1 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/moby/spdystream v0.2.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.1 // indirect @@ -98,6 +103,7 @@ require ( github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/procfs v0.6.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect + github.com/rs/xid v1.2.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tklauser/go-sysconf v0.3.9 // indirect github.com/tklauser/numcpus v0.3.0 // indirect diff --git a/go.sum b/go.sum index 747c2ce..85a85dc 100644 --- a/go.sum +++ b/go.sum @@ -9,93 +9,142 @@ cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0 h1:xE3CPsOgttP4ACBePh79zTKALtXwn/Edhcr16R5hMWU= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0 h1:9x7Bx0A9R5/M9jibeJeZWqjeVEIxYW9fZYqB9a70/bY= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0 h1:Lpy6hKgdcl7a3WGSfJIFmxmcdjSpP6OmBEfcOv1Y680= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0 h1:UDpwYIwla4jHGzZJaEJYx1tOejbgSoNqsAfHAUYe2r8= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +git.apache.org/thrift.git v0.13.0 h1:/3bz5WZ+sqYArk7MBBBbDufMxKKOA56/6JO6psDpUDY= git.apache.org/thrift.git v0.13.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +github.com/Azure/azure-pipeline-go v0.2.2 h1:6oiIS9yaG6XCCzhgAgKFfIWyo4LLCiDhZot6ltoThhY= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-storage-blob-go v0.10.0 h1:evCwGreYo3XLeBV4vSxLbLiYb6e0SzsJiXQVRGsRXxs= github.com/Azure/azure-storage-blob-go v0.10.0/go.mod h1:ep1edmW+kNQx4UfWM9heESNmQdijykocJ0YOxmMX8SE= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.11.12 h1:gI8ytXbxMfI+IVbI9mP2JGCTXIuhHLgRlvQ9X4PsnHE= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.1/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= +github.com/Azure/go-autorest/autorest/adal v0.9.5 h1:Y3bBUV4rTuxenJJs41HU3qmqsb+auo+a3Lz+PlJPpL0= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzUzbJPqhK839ygXJ82sde8x3ogr6R28= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v2.2.0+incompatible h1:V5BKkxACZLjzHjSgBbr2gvLA2Ae49yhc6CSY7MLy5k4= github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/sarama v1.27.2 h1:1EyY1dsxNDUQEv0O/4TsjosHI2CgB1uo9H/v56xzTxc= github.com/Shopify/sarama v1.27.2/go.mod h1:g5s5osgELxgM+Md9Qni9rzo7Rbt+vvFQI4bt/Mc93II= +github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/agnivade/levenshtein v1.0.1 h1:3oJU7J3FGFmyhn8KHjmVaZCN5hxTr7GxgRue+sxIXdQ= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/alecthomas/participle v0.2.1 h1:4AVLj1viSGa4LG5HDXKXrm5xRx19SB/rS/skPQB1Grw= github.com/alecthomas/participle v0.2.1/go.mod h1:SW6HZGeZgSIpcUWX3fXpfZhuaWHnmoD5KCVaqSaNTkk= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/aliyun/aliyun-oss-go-sdk v2.1.10+incompatible h1:D3gwOr9qUUmyyBRDbpnATqu+EkqqmigFd3Od6xO1QUU= github.com/aliyun/aliyun-oss-go-sdk v2.1.10+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/arkbriar/apimachinery v0.21.2-enc2 h1:VWVFUcgj7YVzFFqqp3omkQ4DQPTGBX59eFGS40j5S4g= github.com/arkbriar/apimachinery v0.21.2-enc2/go.mod h1:pWQYsEjrUUDsvos4sLfo0vCrX6lqlujy0WzPJ4OjFhw= github.com/arkbriar/client-go v0.21.2-enc3 h1:EwjiEz93tl7qRt2rwhvI7/3bK57cpycllEEQcvjeb3E= github.com/arkbriar/client-go v0.21.2-enc3/go.mod h1:HdJ9iknWpbl3vMGtib6T2PyI/VYxiZfq936WNVHBRrA= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 h1:EFSB7Zo9Eg91v7MJPVsifUysc/wPdN+NOnVe6bWbdBM= github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.35.20 h1:Hs7x9Czh+MMPnZLQqHhsuZKeNFA3Vuf7pdy2r5QlVb0= github.com/aws/aws-sdk-go v1.35.20/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= +github.com/aws/aws-sdk-go-v2 v0.18.0 h1:qZ+woO4SamnH/eEbjM2IDLhRNwIwND/RQyVlBLp3Jqg= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f h1:ZNv7On9kyUzm7fvRZumSyy/IUiSC7AzL0I1jKKtwooA= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= +github.com/bcicen/jstream v1.0.1 h1:BXY7Cu4rdmc0rhyTVyT3UkxAiX3bnLpKLas9btbH5ck= github.com/bcicen/jstream v1.0.1/go.mod h1:9ielPxqFry7Y4Tg3j4BfjPocfJ3TbsRtXOAYXYmRuAQ= +github.com/beevik/ntp v0.3.0 h1:xzVrPrE4ziasFXgBVBZJDP0Wg/KpMwk2KHJ4Ba8GrDw= github.com/beevik/ntp v0.3.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -103,92 +152,139 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/casbin/casbin/v2 v2.1.2 h1:bTwon/ECRx9dwBy2ewRVr5OiqjeXSGiTUY74sDPQi/g= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo= github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= +github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403 h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/colinmarc/hdfs v1.1.3 h1:662salalXLFmp+ctD+x0aG+xOg62lnVnOJHksXYpFBw= github.com/colinmarc/hdfs v1.1.3/go.mod h1:0DumPviB681UcSuJErAbDIOx6SIaJWj463TymfZG02I= +github.com/colinmarc/hdfs/v2 v2.2.0 h1:4AaIlTq+/sWmeqYhI0dX8bD4YrMQM990tRjm636FkGM= github.com/colinmarc/hdfs/v2 v2.2.0/go.mod h1:Wss6n3mtaZyRwWaqtSH+6ge01qT0rw9dJJmvoUnIQ/E= +github.com/coredns/coredns v1.4.0 h1:RubBkYmkByUqZWWkjRHvNLnUHgkRVqAWgSMmRFvpE1A= github.com/coredns/coredns v1.4.0/go.mod h1:zASH/MVDgR6XZTbxvOnsZfffS+31vg6Ackf/wo1+AM0= +github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dchest/siphash v1.2.1 h1:4cLinnzVJDKxTCl9B01807Yiy+W7ZzVHj/KIroQRvT4= github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4= github.com/dghubble/trie v0.0.0-20210609182954-9a58e577d803 h1:b+41UvlE18LbWc+UcxehnLXrxp8jSTmX8QglDZ8OAzI= github.com/dghubble/trie v0.0.0-20210609182954-9a58e577d803/go.mod h1:xNBeoT4V92/aNvuC3IJ2g59uxuKP4/kzvkpoHrb7v4A= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/distribution/distribution v2.7.1+incompatible h1:aGFx4EvJWKEh//lHPLwFhFgwFHKH06TzNVPamrMn04M= github.com/distribution/distribution v2.7.1+incompatible/go.mod h1:EgLm2NgWtdKgzF9NpMzUKgzmR7AMmb0VQi2B+ZzDRjc= +github.com/djherbis/atime v1.0.0 h1:ySLvBAM0EvOGaX7TI4dAM5lWj+RdJUCKtGSEHN8SGBg= github.com/djherbis/atime v1.0.0/go.mod h1:5W+KBIuTwVGcqjIfaTwt+KSYX1o6uep8dtevevQP/f8= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0 h1:w3NnFcKR5241cfmQU5ZZAsf0xcpId6mWOupTvJlUX2U= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dolmen-go/codegen v1.0.0 h1:B/U0E1Cf5KekYF7Cx+M+CVi+Kk5juyGetb5QcXWZSgw= github.com/dolmen-go/codegen v1.0.0/go.mod h1:hw2TU7hTAA0vaJ1Cow+oSW9ClG+4uBGn6zPXIXsYW5c= github.com/dolmen-go/endian v1.0.1 h1:jc0rXoO1gWajQ/7sw1lZIjLwPphdKYGdYEp3y5KIpUs= github.com/dolmen-go/endian v1.0.1/go.mod h1:rw+fkskwTwEP3rsM5/TnnJIw3rQo/K2/s6BvAYNJWf0= +github.com/dswarbrick/smart v0.0.0-20190505152634-909a45200d6d h1:QK8IYltsNy+5QZcDFbVkyInrs98/wHy1tfUTGG91sps= github.com/dswarbrick/smart v0.0.0-20190505152634-909a45200d6d/go.mod h1:apXo4PA/BgBPrt66j0N45O2stlBTRowdip2igwcUWVc= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/eclipse/paho.mqtt.golang v1.3.0 h1:MU79lqr3FKNKbSrGN7d7bNYqh8MwWW7Zcx0iG+VIw9I= github.com/eclipse/paho.mqtt.golang v1.3.0/go.mod h1:eTzb4gxwwyWpqBUHGQZ4ABAV7+Jgm1PklsYT/eo8Hcc= +github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad h1:EmNYJhPYy0pOFjCx2PrgtaBXmee0iUX9hLlxE1xHOJE= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -197,25 +293,38 @@ github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWc github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.10.2 h1:19ARM85nVi4xH7xPXuc5eM/udya5ieh7b/Sv+d844Tk= github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-asn1-ber/asn1-ber v1.5.1 h1:pDbRAunXzIUXfx4CB2QJFv5IuPiuoW+sWvr/Us009o8= github.com/go-asn1-ber/asn1-ber v1.5.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -223,7 +332,9 @@ github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-ldap/ldap v3.0.2+incompatible h1:kD5HQcAzlQ7yrhfn+h+MSABeAy/jAJhvIJ/QDllP44g= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-ldap/ldap/v3 v3.2.4 h1:PFavAq2xTgzo/loE8qNXcQaofAaqIpI4WgaLdv+1l3E= github.com/go-ldap/ldap/v3 v3.2.4/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= @@ -242,45 +353,55 @@ github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70t github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5 h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.4 h1:5I4CCSqoWzT+82bBkNIvmLc0UOsoKKQ4Fz+3VxOB7SY= github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4 h1:csnOgcgAiuGoM/Po7PEpKDoNulCcF3FGbSnbHfxgjMI= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.5 h1:Xm0Ao53uqnk9QE/LlYV5DEU09UAgpliA85QoT9LzqPw= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.5 h1:QhCBKRYqZR+SKo4gl1lPhPahope8/RLt6EVgY8X80w0= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= @@ -288,10 +409,13 @@ github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfC github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31 h1:28FVBuwkwowZMjbA7M0wXsI6t3PYulRTMio3SO+eKCM= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gogo/googleapis v1.1.0 h1:kFkMAZBNAn4j7K0GiZr8cRYzejq68VbheufiV3YuyFI= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -299,6 +423,7 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -310,6 +435,7 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1 h1:ocYkMQY5RrXTYgXl7ICpV0IXwlEQGwKIsery4gyXa1U= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -330,9 +456,12 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gomodule/redigo v1.8.3 h1:HR0kYDX2RJZvAup8CsiJwxB4dTCSC0AaUq6S4SiLwUc= github.com/gomodule/redigo v1.8.3/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -349,116 +478,173 @@ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3 h1:SRgJV+IoxM5MKyFdlSUeNy6/ycRUF2yBAKdAQswoHUk= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0 h1:HXNYlRkkM/t+Y/Yhxtwcy02dlYwIaoxzvxPnS+cqy78= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0 h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.9.1/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v1.1.5 h1:9byZdVjKTe5mce63pRVNP1L7UAmdHOTEMGehn6KvJWs= github.com/hashicorp/go-msgpack v1.1.5/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.0.1 h1:4OtAfUGbnKC6yS48p0CtMX2oFYtzFZVv6rok3cRWgnE= github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-retryablehttp v0.5.4 h1:1BZvpawXoJCWX6pNtow9+rpEj+3itIlutiqnntI6jOE= github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.1 h1:DMo4fmknnz0E0evoNYnV48RjWndOsmd6OW+09R3cEP8= github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/raft v1.2.0 h1:mHzHIrF0S91d3A7RPBvuqkgB4d/7oFJZyvf1Q4m7GA0= github.com/hashicorp/raft v1.2.0/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= +github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea h1:xykPFhrBAS2J0VBzVa5e80b5ZtYuNQtgXjN40qBZlD4= github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod h1:pNv7Wc3ycL6F5oOWn+tPGo2gWD4a5X+yp/ntwdKLjRk= +github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/vault/api v1.0.4 h1:j08Or/wryXT4AcHj1oCbMd7IijXcKzYUGw59LGu9onU= github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= +github.com/hashicorp/vault/sdk v0.1.13 h1:mOEPeOhT7jl0J4AMl1E705+BcmeRs1VmKNb9F0sMLy8= github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0 h1:0U6+BtN6LhaYuTnIJq4Wyq5cpn6O2kWrxAtcqBmYY6w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 h1:UDMh68UUwekSh5iP2OMhRRZJiiBccgV7axzUG8vi56c= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/itchyny/timefmt-go v0.1.4 h1:hFEfWVdwsEi+CY8xY2FtgWHGQaBaC3JeHd+cve0ynVM= github.com/itchyny/timefmt-go v0.1.4/go.mod h1:nEP7L+2YmAbT2kZ2HfSs1d8Xtw9LY8D2stDBckWakZ8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= +github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= github.com/jcmturner/gokrb5/v8 v8.4.1/go.mod h1:T1hnNppQsBtxW0tCHMHTkAt8n/sABdzZgZdoFrZaZNM= +github.com/jcmturner/gokrb5/v8 v8.4.2 h1:6ZIM6b/JJN0X8UM43ZOM6Z4SJzla+a/u7scXFJzodkA= github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= github.com/jcmturner/rpc/v2 v2.0.2/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jlaffaye/ftp v0.0.0-20210307004419-5d4190119067 h1:P2S26PMwXl8+ZGuOG3C69LG4be5vHafUayZm9VPw3tU= github.com/jlaffaye/ftp v0.0.0-20210307004419-5d4190119067/go.mod h1:2lmrmq866uF2tnje75wQHzmPXhmSWUt7Gyx2vgK1RCU= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -468,45 +654,65 @@ github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/ github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s= github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= github.com/klauspost/cpuid/v2 v2.0.2/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.3 h1:DNljyrHyxlkk8139OXIAAauCwV8eQGDD6Z8YqnDXdZw= github.com/klauspost/cpuid/v2 v2.0.3/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/readahead v1.3.1 h1:QqXNYvm+VvqYcbrRT4LojUciM0XrznFRIDrbHiJtu/0= github.com/klauspost/readahead v1.3.1/go.mod h1:AH9juHzNH7xqdqFHrMRSHeH2Ps+vFf+kblDqzPFiLJg= +github.com/klauspost/reedsolomon v1.9.11 h1:n2kipJFo+CPqg7fH988XJXjqEyj14RJ8BYj7UayxPNg= github.com/klauspost/reedsolomon v1.9.11/go.mod h1:nLvuzNvy1ZDNQW30IuMc2ZWCbiqrJgdLoUS2X8HAUVg= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5 h1:hyz3dwM5QLc1Rfoz4FuWJQG5BN7tc6K1MndAUnGpQr4= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lib/pq v1.8.0 h1:9xohqzkUwzR4Ga4ivdTcawVS89YSDVxXMa3xJX3cGzg= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743 h1:143Bb8f8DuGWck/xpNUOckBVYfFbBTnLevfRZ1aVVqo= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1 h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lyft/protoc-gen-validate v0.0.13 h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -514,11 +720,14 @@ github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.1 h1:qiyop7gCflfhwCzGyeT0gro3sF9AIg9HU98JORTkqfI= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -528,6 +737,7 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-sqlite3 v1.14.8 h1:gDp86IdQsN/xWjIEmr9MF6o9mpksUgh0fu+9ByFxzIU= github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= @@ -535,33 +745,53 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.35 h1:oTfOaDH+mZkdcgdIjH6yBajRGtIwcwcaR+rt23ZSrJs= github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/minio/cli v1.22.0 h1:VTQm7lmXm3quxO917X3p+el1l0Ca5X3S4PM2ruUYO68= github.com/minio/cli v1.22.0/go.mod h1:bYxnK0uS629N3Bq+AOZZ+6lwF77Sodk4+UL9vNuXhOY= +github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= +github.com/minio/md5-simd v1.1.1 h1:9ojcLbuZ4gXbB2sX53MKn8JUZ0sB/2wfwsEcRw+I08U= github.com/minio/md5-simd v1.1.1/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= github.com/minio/minio v0.0.0-20210219003537-2dce5d944281 h1:VcNP8p+jVn6MMbfcN8xUlPL5oavTlU4L6K9MZSty9WE= github.com/minio/minio v0.0.0-20210219003537-2dce5d944281/go.mod h1:LV4jb5iYfcGLujwjcUaRjdBiurnKIHGYNj1jCb45zfQ= +github.com/minio/minio-go/v7 v7.0.9-0.20210210235136-83423dddb072 h1:zlheLAzZ66jYLUsa81R8gwPtSgKRI5FMJyAKuaJpkHE= github.com/minio/minio-go/v7 v7.0.9-0.20210210235136-83423dddb072/go.mod h1:pEZBUa+L2m9oECoIA6IcSK8bv/qggtQVLovjeKK5jYc= +github.com/minio/selfupdate v0.3.1 h1:BWEFSNnrZVMUWXbXIgLDNDjbejkmpAmZvy/nCz1HlEs= github.com/minio/selfupdate v0.3.1/go.mod h1:b8ThJzzH7u2MkF6PcIra7KaXO9Khf6alWPvMSyTDCFM= +github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/minio/simdjson-go v0.2.1 h1:nxYlp4Qd0w2pwLlif00l5vTFL6PcNAKpyHq27/pageg= github.com/minio/simdjson-go v0.2.1/go.mod h1:JPUSkRykfSPS+AhO0YPA1h0l5vY7NqrF4zel2b12wxc= +github.com/minio/sio v0.2.1 h1:NjzKiIMSMcHediVQR0AFVx2tp7Wxh9tKPfDI3kH7aHQ= github.com/minio/sio v0.2.1/go.mod h1:8b0yPp2avGThviy/+OCJBI6OMpvxoUuiLvE6F1lebhw= +github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mmcloughlin/avo v0.0.0-20201105074841-5d2f697d268f h1:D4I34fbgczGrhrN4DzBCZXT3u/nMWJnGmviIjSzzXSw= github.com/mmcloughlin/avo v0.0.0-20201105074841-5d2f697d268f/go.mod h1:6aKT4zZIrpGqB3RpFU14ByCSSyKY6LfJz4J/JJChHfI= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -572,36 +802,52 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/montanaflynn/stats v0.5.0 h1:2EkzeTSqBB4V4bJwWrt5gIIrZmpJBcoIRGS2kWLgzmk= github.com/montanaflynn/stats v0.5.0/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/jwt v1.1.0 h1:+vOlgtM0ZsF46GbmUoadq0/2rChNS45gtxHEa3H1gqM= github.com/nats-io/jwt v1.1.0/go.mod h1:n3cvmLfBfnpV4JJRN7lRYCyZnw48ksGsbThGXEk4w9M= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats-server/v2 v2.1.9 h1:Sxr2zpaapgpBT9ElTxTVe62W+qjnhPcKY/8W5cnA/Qk= github.com/nats-io/nats-server/v2 v2.1.9/go.mod h1:9qVyoewoYXzG1ME9ox0HwkkzyYvnlBDugfR4Gg/8uHU= +github.com/nats-io/nats-streaming-server v0.19.0 h1:NVYusu6kcMxRBj1wOWRdXBUHf1bzkJQbsHovsg+Fr1o= github.com/nats-io/nats-streaming-server v0.19.0/go.mod h1:oqrRqpMg84aiPDyroTornjVWNYJKh+6ozh2Mgt8dslE= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nats.go v1.10.0 h1:L8qnKaofSfNFbXg0C5F71LdjPRnmQwSsA4ukmkt1TvY= github.com/nats-io/nats.go v1.10.0/go.mod h1:AjGArbfyR50+afOUotNX2Xs5SYHf+CoOa5HH1eEl2HE= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.4/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.2.0 h1:WXKF7diOaPU9cJdLD7nuzwasQy9vT1tBqzXZZf3AMJM= github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nats-io/stan.go v0.7.0 h1:sMVHD9RkxPOl6PJfDVBQd+gbxWkApeYl6GrH+10msO4= github.com/nats-io/stan.go v0.7.0/go.mod h1:Ci6mUIpGQTjl++MqK2XzkWI/0vF+Bl72uScx7ejSYmU= github.com/ncw/directio v1.0.5 h1:JSUBhdjEvVaJvOoyPAbcW0fnd0tvRXD76wEfZ1KcQz4= github.com/ncw/directio v1.0.5/go.mod h1:rX/pKEYkOXBGOggmcyJeJGloCkleSvphPx2eV3t6ROk= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nsqio/go-nsq v1.0.8 h1:3L2F8tNLlwXXlp2slDUrUWSBn2O3nMh8R1/KEDFTHPk= github.com/nsqio/go-nsq v1.0.8/go.mod h1:vKq36oyeVXgsS5Q8YEO7WghqidAVXQlcFxzQbQTuDEY= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/oklog v0.3.2 h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 h1:58+kh9C6jJVXYjt8IE48G2eWl6BjwU5Gj0gqY84fy78= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olivere/elastic/v7 v7.0.22 h1:esBA6JJwvYgfms0EVlH7Z+9J4oQ/WUADF2y/nCNDw7s= github.com/olivere/elastic/v7 v7.0.22/go.mod h1:VDexNy9NjmtAkrjNoI7tImv7FR4tf5zUA3ickqu5Pc8= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -620,42 +866,60 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4 h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89blD2Mh2Q= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117 h1:7822vZ646Atgxkp3tqrSufChvAAYgIy+iFEGpQntwlI= github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= +github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/performancecopilot/speed v3.0.0+incompatible h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI= github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1 h1:F++O52m40owAmADcojzM+9gyjmMOY/T4oYJkgFDH8RE= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.13.2 h1:taJnKntsWgU+qae21Rx52lIwndAdKrj0mfUNQsz1z4Q= github.com/pkg/sftp v1.13.2/go.mod h1:LzqnAvaD5TWeNBsZpfKxSYn1MbjWwOsCIAFFJbpIsK8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021 h1:0XM1XL/OFFJjXsYXlG30spTkV/E9+gmd5GD1w2HE8xM= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.44.1 h1:E7dpj/bFlP8REMa60VzUZwmmtxLICMKW1hRoXVVkGy0= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.44.1/go.mod h1:3WYi4xqXxGGXWDdQIITnLNmuDzO5n6wYva9spVhR4fg= @@ -697,59 +961,88 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/quasilyte/go-ruleguard v0.2.1 h1:56eRm0daAyny9UhJnmtJW/UyLZQusukBAB8oT8AHKHo= github.com/quasilyte/go-ruleguard v0.2.1/go.mod h1:hN2rVc/uS4bQhQKTio2XaSJSafJwqBUWWwtssT3cQmc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible h1:j1Wcmh8OrK4Q7GXY+V7SVSY8nUWQxHW5TkBe7YUl+2s= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/secure-io/sio-go v0.3.1 h1:dNvY9awjabXTYGsTF1PiCySl9Ltofk9GA3VdWlo7rRc= github.com/secure-io/sio-go v0.3.1/go.mod h1:+xbkjDzPjwh4Axd07pRKSNriS9SCiYksWnZqdnfpQxs= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shirou/gopsutil v3.20.11+incompatible h1:LJr4ZQK4mPpIV5gOa4jCOKOGb4ty4DZO54I4FGqIpto= github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v1.1.1 h1:T/YLemO5Yp7KPzS+lVtu+WsHn8yoSwTfItdAd1r3cck= github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= +github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9 h1:hp2CYQUINdZMHdvTdXtPOY2ainKl4IoMcpAXEf2xj3Q= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/gunit v1.4.2 h1:tyWYZffdPhQPfK5VsMQXfauwnJkqg7Tv5DLuQVYxq3Q= github.com/smartystreets/gunit v1.4.2/go.mod h1:ZjM1ozSIMJlAz/ay4SG8PeKF00ckUp+zMHZXV9/bvak= +github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1 h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -757,14 +1050,19 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v1.0.0 h1:kuuDrUJFZL1QYL9hUNuCxNObNzB0bV/ZG5jV3RWAQgo= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a h1:AhmOdSHeswKHBjhsLs/7+1voOxT+LLrSk/Nxvk35fug= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -774,46 +1072,69 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tidwall/gjson v1.6.7 h1:Mb1M9HZCRWEcXQ8ieJo7auYyyiSux6w9XN3AdTpxJrE= github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= +github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/pretty v1.0.2 h1:Z7S3cePv9Jwm1KwS0513MRaoUe3S01WPbLNV40pwWZU= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/sjson v1.0.4 h1:UcdIRXff12Lpnu3OLtZvnc03g4vH2suXDXhBwBqmzYg= github.com/tidwall/sjson v1.0.4/go.mod h1:bURseu1nuBkFpIES5cz6zBtjmYeOQmEESshn7VpF15Y= +github.com/tinylib/msgp v1.1.3 h1:3giwAkmtaEDLSV0MdO1lDLuPgklgPzmk8H9+So2BVfA= github.com/tinylib/msgp v1.1.3/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31 h1:OXcKh35JaYsGMRzpvFkLv/MEyPuL49CThT1pZ8aSml4= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 h1:3SVOIvH7Ae1KRYyQWRjXWJEA9sS/c/pjvH++55Gr648= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a h1:0R4NLDRDZX6JcmhJgXi5E4b8Wg84ihbmUKp/GvSPEzc= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/vektah/gqlparser v1.1.2 h1:ZsyLGn7/7jDNI+y4SEhI4yAxRChlv15pUHMjijT+e68= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE= github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= +github.com/willf/bloom v2.0.3+incompatible h1:QDacWdqcAUI1MPOwIQZRy9kOR7yxfyEmxX8Wdm2/JPA= github.com/willf/bloom v2.0.3+incompatible/go.mod h1:MmAltL9pDMNTrvUkxdg0k0q5I0suxmuwp3KbyrZLOZ8= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.0.0-20201125193152-8a03d2e9614b/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489 h1:1JFLBqwIgdyHN1ZtgjTBwO+blA6gVOmZurpiMEsETKo= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -821,6 +1142,7 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -834,12 +1156,14 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +golang.org/x/arch v0.0.0-20201008161808-52c3e6f60cff h1:XmKBi9R6duxOB3lfc72wyrwiOY7X2Jl1wuI+RFOyMDE= golang.org/x/arch v0.0.0-20201008161808-52c3e6f60cff/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -883,6 +1207,7 @@ golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMk golang.org/x/exp v0.0.0-20220407100705-7b9b53b0aca4 h1:K3x+yU+fbot38x5bQbU2QqUAVyYLEktdNH2GxZLnM3U= golang.org/x/exp v0.0.0-20220407100705-7b9b53b0aca4/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -893,8 +1218,10 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= @@ -1127,6 +1454,7 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= @@ -1141,6 +1469,7 @@ google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1206,7 +1535,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1214,9 +1545,13 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25 h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -1224,18 +1559,28 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.63.2 h1:tGK/CyBg7SMzb60vP1M03vNZ3VDu3wGQJwn7Sxi9r3c= gopkg.in/ini.v1 v1.63.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= +gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI= gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= +gopkg.in/jcmturner/gokrb5.v7 v7.5.0 h1:a9tsXlIDD9SKxotJMK3niV7rPZAJeX2aD/0yg3qlIrg= gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU= gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1251,8 +1596,10 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1260,6 +1607,7 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA= k8s.io/api v0.21.2/go.mod h1:Lv6UGJZ1rlMI1qusN8ruAp9PUBFyBwpEHAdG24vIsiU= @@ -1269,8 +1617,10 @@ k8s.io/apiextensions-apiserver v0.18.3/go.mod h1:TMsNGs7DYpMXd+8MOCX8KzPOCx8fnZM k8s.io/apiextensions-apiserver v0.21.4 h1:HkajN/vmT/9HnFmUxvpXfSGkTCvH/ax4e3+j6mqWUDU= k8s.io/apiextensions-apiserver v0.21.4/go.mod h1:OoC8LhI9LnV+wKjZkXIBbLUwtnOGJiTRE33qctH5CIk= k8s.io/apiserver v0.18.3/go.mod h1:tHQRmthRPLUtwqsOnJJMoI8SW3lnoReZeE861lH8vUw= +k8s.io/apiserver v0.21.4 h1:egJgdhW0ueq5iJSY0c5YedPvRM2Ft/D3dcXOgwvs9jY= k8s.io/apiserver v0.21.4/go.mod h1:SErUuFBBPZUcD2nsUU8hItxoYheqyYr2o/pCINEPW8g= k8s.io/code-generator v0.18.3/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= +k8s.io/code-generator v0.21.4 h1:vO8jVuEGV4UF+/2s/88Qg05MokE/1QUFi/Q2YDgz++A= k8s.io/code-generator v0.21.4/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= k8s.io/component-base v0.18.3/go.mod h1:bp5GzGR0aGkYEfTj+eTY0AN/vXTgkJdQXjNTTVUaa3k= k8s.io/component-base v0.21.4 h1:Bc0AttSyhJFVXEIHz+VX+D11j/5z7SPPhl6whiXaRzs= @@ -1278,9 +1628,11 @@ k8s.io/component-base v0.21.4/go.mod h1:ZKG0eHVX+tUDcaoIGpU3Vtk4TIjMddN9uhEWDmW6 k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027 h1:Uusb3oh8XcdzDF/ndlI4ToKTYVlkCSJP39SRY2mfRAw= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= @@ -1326,15 +1678,21 @@ modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.0.1 h1:WyIDpEpAIx4Hel6q/Pcgj/VhaQV5XPJ2I6ryIYbjnpc= modernc.org/z v1.0.1/go.mod h1:8/SRk5C/HgiQWCgXdfpb+1RvhORdkz5sw72d3jjtyqA= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22 h1:fmRfl9WJ4ApJn7LxNuED4m0t18qivVQOxP6aAYG9J6c= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/controller-runtime v0.9.7 h1:DlHMlAyLpgEITVvNsuZqMbf8/sJl9HirmCZIeR5H9mQ= sigs.k8s.io/controller-runtime v0.9.7/go.mod h1:nExcHcQ2zvLMeoO9K7rOesGCmgu32srN5SENvpAEbGA= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= @@ -1343,4 +1701,5 @@ sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZa sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/hack/copy_image.sh b/hack/copy_image.sh index c14c8e1..2dba04d 100755 --- a/hack/copy_image.sh +++ b/hack/copy_image.sh @@ -15,11 +15,11 @@ # limitations under the License. -SOURCE_REPO=polardbx -SOURCE_VERSION=v1.4.1 +SOURCE_REPO=polarximages-registry.cn-zhangjiakou.cr.aliyuncs.com/daixingpolarximages +SOURCE_VERSION=v1.5.0-beta DEST_REPO=polardbx -DEST_VERSION=latest -TARGETS="xstore-tools polardbx-operator probe-proxy polardbx-exporter polardbx-init polardbx-hpfs polardbx-job" +DEST_VERSION=v1.5.0-beta +TARGETS="xstore-tools polardbx-operator probe-proxy polardbx-exporter polardbx-init polardbx-hpfs polardbx-job polardbx-logstash" #pull from source image and tag it for i in $TARGETS diff --git a/pkg/featuregate/featuregates.go b/pkg/featuregate/featuregates.go index 78730c5..f10ce57 100644 --- a/pkg/featuregate/featuregates.go +++ b/pkg/featuregate/featuregates.go @@ -67,9 +67,10 @@ var ( EnableGalaxyClusterMode = declareFeatureGate("EnableGalaxyCluster", true, false, "Enable cluster mode on galaxy store engine.") EnforceQoSGuaranteed = declareFeatureGate("EnforceQoSGuaranteed", false, false, "Enforce pod's QoS to Guaranteed.") ResetTrustIpsBeforeStart = declareFeatureGate("ResetTrustIpsBeforeStart", false, true, "Reset trust ips in CNs to avoid security problems.") - EnableXStoreWithPodService = declareFeatureGate("EnableXStoreWithPodService", true, false, "Use services for pods in xstore.") + EnableXStoreWithPodService = declareFeatureGate("EnableXStoreWithPodService", false, false, "Use services for pods in xstore.") EnforceClusterIpXStorePod = declareFeatureGate("EnforceClusterIpXStorePod", false, false, "Use cluster ip services for pods in old xstore.") EnableAutoRebuildFollower = declareFeatureGate("EnableAutoRebuildFollower", false, false, "Enable creating rebuild task for follower if it is unhealthy.") + EnableLabMode = declareFeatureGate("EnableLabMode", false, false, "Enable creating rebuild task for follower if it is unhealthy.") ) var extraFeatureGates []string diff --git a/pkg/hpfs/backupbinlog/action.go b/pkg/hpfs/backupbinlog/action.go index b73a46e..8fa5c42 100644 --- a/pkg/hpfs/backupbinlog/action.go +++ b/pkg/hpfs/backupbinlog/action.go @@ -180,14 +180,17 @@ func uploadBinlogFile(reader io.Reader, binlogFile *BinlogFile) error { action := filestream.UploadOss if binlogFile.SinkType == config.SinkTypeSftp { action = filestream.UploadSsh + } else if binlogFile.SinkType == config.SinkTypeMinio { + action = filestream.UploadMinio } //upload binlogfile binlogFileMetadata := filestream.ActionMetadata{ - Action: filestream.Action(action), - Filepath: getBinlogFilepath(binlogFile), - RequestId: uuid.New().String(), - Sink: binlogFile.SinkName, - OssBufferSize: strconv.FormatInt(binlogFile.Size, 10), + Action: filestream.Action(action), + Filepath: getBinlogFilepath(binlogFile), + RequestId: uuid.New().String(), + Sink: binlogFile.SinkName, + OssBufferSize: strconv.FormatInt(binlogFile.Size, 10), + MinioBufferSize: strconv.FormatInt(binlogFile.Size, 10), } uploadedLen, err := client.Upload(reader, binlogFileMetadata) if err != nil { @@ -205,14 +208,17 @@ func uploadBinlogFileMeta(binlogFile *BinlogFile) error { action := filestream.UploadOss if binlogFile.SinkType == config.SinkTypeSftp { action = filestream.UploadSsh + } else if binlogFile.SinkType == config.SinkTypeMinio { + action = filestream.UploadMinio } binlogMetaJsonBytes, _ := json.Marshal(binlogFile) binlogMetaFileMetadata := filestream.ActionMetadata{ - Action: filestream.Action(action), - Filepath: getBinlogMetaFilepath(binlogFile), - RequestId: uuid.New().String(), - Sink: binlogFile.SinkName, - OssBufferSize: fmt.Sprintf("%d", len(binlogMetaJsonBytes)), + Action: filestream.Action(action), + Filepath: getBinlogMetaFilepath(binlogFile), + RequestId: uuid.New().String(), + Sink: binlogFile.SinkName, + OssBufferSize: fmt.Sprintf("%d", len(binlogMetaJsonBytes)), + MinioBufferSize: fmt.Sprintf("%d", len(binlogMetaJsonBytes)), } reader := bytes.NewReader(binlogMetaJsonBytes) uploadedLen, err := client.Upload(reader, binlogMetaFileMetadata) diff --git a/pkg/hpfs/config/config.go b/pkg/hpfs/config/config.go index 36d8453..546d200 100644 --- a/pkg/hpfs/config/config.go +++ b/pkg/hpfs/config/config.go @@ -30,6 +30,7 @@ import ( var ConfigFilepath = "/config/config.yaml" const ( + SinkTypeMinio = "s3" SinkTypeOss = "oss" SinkTypeSftp = "sftp" SinkTypeNone = "none" @@ -37,6 +38,11 @@ const ( DefaultMaxLocalBinlogCount = 50 ) +type MinioSink struct { + OssSink + UseSSL bool `json:"useSSL,omitempty"` +} + type OssSink struct { Endpoint string `json:"endpoint,omitempty"` AccessKey string `json:"accessKey,omitempty"` @@ -56,6 +62,7 @@ type Sink struct { Type string `json:"type,omitempty"` OssSink SftpSink + MinioSink } type BackupBinlogConfig struct { diff --git a/pkg/hpfs/filestream/common.go b/pkg/hpfs/filestream/common.go index e66953d..a003672 100644 --- a/pkg/hpfs/filestream/common.go +++ b/pkg/hpfs/filestream/common.go @@ -13,6 +13,8 @@ func GetClientActionBySinkType(sinkType string) Action { return DownloadOss case config.SinkTypeSftp: return DownloadSsh + case config.SinkTypeMinio: + return DownloadMinio } return InvalidAction } diff --git a/pkg/hpfs/filestream/filesercli_test.go b/pkg/hpfs/filestream/filesercli_test.go index a1fa838..5310dcf 100644 --- a/pkg/hpfs/filestream/filesercli_test.go +++ b/pkg/hpfs/filestream/filesercli_test.go @@ -20,6 +20,7 @@ import ( "archive/tar" "bytes" "encoding/base64" + "github.com/alibaba/polardbx-operator/pkg/hpfs/config" "github.com/google/uuid" . "github.com/onsi/gomega" "io" @@ -317,3 +318,96 @@ func TestDownloadRemote(t *testing.T) { time.Sleep(2 * time.Second) checkFile(g) } + +func TestUploadAndDownloadMinio(t *testing.T) { + config.ConfigFilepath = "/Users/wkf/hpfs/config.yaml" + g := NewGomegaWithT(t) + config.InitConfig() + fileServer := startFileServer() + defer fileServer.Stop() + client := NewFileClient("127.0.0.1", 22222, nil) + + defer os.RemoveAll("./busuinstanceid/") + fd, err := os.OpenFile("./filesercli_test.go", os.O_RDONLY, 0664) + g.Expect(err).Should(BeNil()) + actionMetadata := ActionMetadata{ + Action: UploadMinio, + InstanceId: "busuinstanceid", + Filename: "busutest.txt", + RequestId: uuid.New().String(), + } + _, err = client.Upload(fd, actionMetadata) + fd.Close() + client.Check(actionMetadata) + g.Expect(err).Should(BeNil()) + actionMetadata = ActionMetadata{ + Action: DownloadMinio, + InstanceId: "busuinstanceid", + Filename: "busutest.txt", + } + os.MkdirAll("./busuinstanceid", os.ModePerm) + fd, err = os.OpenFile("./busuinstanceid/busutest.txt", os.O_CREATE|os.O_RDWR, os.ModePerm) + g.Expect(err).Should(BeNil()) + _, err = client.Download(fd, actionMetadata) + fd.Close() + g.Expect(err).Should(BeNil()) + checkFile(g) + os.RemoveAll("./busuinstanceid/") +} + +func TestUploadAndDownloadMinioUsingMinioBufferSize(t *testing.T) { + config.ConfigFilepath = "/Users/wkf/hpfs/config.yaml" + g := NewGomegaWithT(t) + config.InitConfig() + fileServer := startFileServer() + defer fileServer.Stop() + client := NewFileClient("127.0.0.1", 22222, nil) + defer os.RemoveAll("./busuinstanceid/") + fd, err := os.OpenFile("./filesercli_test.go", os.O_RDONLY, 0664) + g.Expect(err).Should(BeNil()) + actionMetadata := ActionMetadata{ + Action: UploadMinio, + InstanceId: "busuinstanceid", + Filename: "busutest.txt", + RequestId: uuid.New().String(), + MinioBufferSize: "102400", + } + _, err = client.Upload(fd, actionMetadata) + fd.Close() + client.Check(actionMetadata) + g.Expect(err).Should(BeNil()) + actionMetadata = ActionMetadata{ + Action: DownloadMinio, + InstanceId: "busuinstanceid", + Filename: "busutest.txt", + } + os.MkdirAll("./busuinstanceid", os.ModePerm) + fd, err = os.OpenFile("./busuinstanceid/busutest.txt", os.O_CREATE|os.O_RDWR, os.ModePerm) + g.Expect(err).Should(BeNil()) + _, err = client.Download(fd, actionMetadata) + fd.Close() + g.Expect(err).Should(BeNil()) + checkFile(g) + os.RemoveAll("./busuinstanceid/") + +} + +func TestListFilesMinio(t *testing.T) { + config.ConfigFilepath = "/Users/wkf/hpfs/config.yaml" + g := NewGomegaWithT(t) + config.InitConfig() + fileServer := startFileServer() + defer fileServer.Stop() + client := NewFileClient("127.0.0.1", 22222, nil) + + actionMetadata := ActionMetadata{ + Action: ListMinio, + Filepath: "busuhhhh", + } + os.MkdirAll("./busuinstanceid", os.ModePerm) + fd, err := os.OpenFile("./busuinstanceid/busutest.txt", os.O_CREATE|os.O_RDWR, os.ModePerm) + g.Expect(err).Should(BeNil()) + _, err = client.List(fd, actionMetadata) + fd.Close() + g.Expect(err).Should(BeNil()) +} diff --git a/pkg/hpfs/filestream/request.go b/pkg/hpfs/filestream/request.go index 1534a20..d379b26 100644 --- a/pkg/hpfs/filestream/request.go +++ b/pkg/hpfs/filestream/request.go @@ -32,6 +32,9 @@ const ( UploadSsh Action = "uploadSsh" DownloadSsh Action = "downloadSsh" ListSsh Action = "listSsh" + UploadMinio Action = "uploadMinio" + DownloadMinio Action = "downloadMinio" + ListMinio Action = "listMinio" InvalidAction Action = "" ) @@ -42,19 +45,20 @@ const ( ) const ( - MetaDataLenLen = 4 - MetaFiledLen = 11 - MetadataActionOffset = 0 - MetadataInstanceIdOffset = 1 - MetadataFilenameOffset = 2 - MetadataRedirectOffset = 3 - MetadataFilepathOffset = 4 - MetadataRetentionTimeOffset = 5 - MetadataStreamOffset = 6 - MetadataSinkOffset = 7 - MetadataRequestIdOffset = 8 - MetadataOssBufferSizeOffset = 9 - MetadataLimitSize = 10 + MetaDataLenLen = 4 + MetaFiledLen = 12 + MetadataActionOffset = 0 + MetadataInstanceIdOffset = 1 + MetadataFilenameOffset = 2 + MetadataRedirectOffset = 3 + MetadataFilepathOffset = 4 + MetadataRetentionTimeOffset = 5 + MetadataStreamOffset = 6 + MetadataSinkOffset = 7 + MetadataRequestIdOffset = 8 + MetadataOssBufferSizeOffset = 9 + MetadataLimitSize = 10 + MetadataMinioBufferSizeOffset = 11 ) var ActionLocal2Remote2 = map[Action]Action{ @@ -65,22 +69,23 @@ var ActionLocal2Remote2 = map[Action]Action{ } type ActionMetadata struct { - Action `json:"action,omitempty"` - InstanceId string `json:"instanceId,omitempty"` - Filename string `json:"filename,omitempty"` - RedirectAddr string `json:"redirectAddr,omitempty"` - Filepath string `json:"filepath,omitempty"` - RetentionTime string `json:"retentionTime,omitempty"` - Stream string `json:"stream,omitempty"` - Sink string `json:"sink,omitempty"` - RequestId string `json:"requestId,omitempty"` - OssBufferSize string `json:"ossBufferSize,omitempty"` - LimitSize string `json:"limitSize,omitempty"` - redirect bool + Action `json:"action,omitempty"` + InstanceId string `json:"instanceId,omitempty"` + Filename string `json:"filename,omitempty"` + RedirectAddr string `json:"redirectAddr,omitempty"` + Filepath string `json:"filepath,omitempty"` + RetentionTime string `json:"retentionTime,omitempty"` + Stream string `json:"stream,omitempty"` + Sink string `json:"sink,omitempty"` + RequestId string `json:"requestId,omitempty"` + OssBufferSize string `json:"ossBufferSize,omitempty"` + LimitSize string `json:"limitSize,omitempty"` + MinioBufferSize string `json:"minioBufferSize,omitempty"` + redirect bool } func (action *ActionMetadata) ToString() string { - return strings.Join([]string{string(action.Action), action.InstanceId, action.Filename, action.RedirectAddr, action.Filepath, action.RetentionTime, action.Stream, action.Sink, action.RequestId, action.OssBufferSize, action.LimitSize}, ",") + return strings.Join([]string{string(action.Action), action.InstanceId, action.Filename, action.RedirectAddr, action.Filepath, action.RetentionTime, action.Stream, action.Sink, action.RequestId, action.OssBufferSize, action.LimitSize, action.MinioBufferSize}, ",") } const ( diff --git a/pkg/hpfs/filestream/server.go b/pkg/hpfs/filestream/server.go index 46560fa..7bc154e 100644 --- a/pkg/hpfs/filestream/server.go +++ b/pkg/hpfs/filestream/server.go @@ -57,6 +57,7 @@ const ( ) var OssParams = map[string]string{"write_len": "true"} +var minioParams = map[string]string{"write_len": "true"} var TaskMap = sync.Map{} @@ -166,6 +167,14 @@ func (f *FileServer) handleRequest(conn net.Conn) error { f.processDownloadSsh(logger, metadata, conn) case strings.ToLower(string(ListSsh)): f.processListSsh(logger, metadata, conn) + case strings.ToLower(string(UploadMinio)): + f.markTask(logger, metadata, TaskStateDoing) + err := f.processUploadMinio(logger, metadata, conn) + f.processTaskResult(logger, err, metadata) + case strings.ToLower(string(DownloadMinio)): + f.processDownloadMinio(logger, metadata, conn) + case strings.ToLower(string(ListMinio)): + f.processListMinio(logger, metadata, conn) case strings.ToLower(string(CheckTask)): f.processCheckTask(logger, metadata, conn) default: @@ -417,6 +426,15 @@ func getOssAuth(sink Sink) map[string]string { } } +func getMinioAuth(sink Sink) map[string]string { + return map[string]string{ + "endpoint": sink.Endpoint, + "access_key": sink.AccessKey, + "secret_key": sink.AccessSecret, + "useSSL": strconv.FormatBool(sink.UseSSL), + } +} + func (f *FileServer) processUploadOss(logger logr.Logger, metadata ActionMetadata, conn net.Conn) error { sink, err := GetSink(metadata.Sink, SinkTypeOss) if err != nil { @@ -583,6 +601,172 @@ func (f *FileServer) processListOss(logger logr.Logger, metadata ActionMetadata, return nil } +func (f *FileServer) processUploadMinio(logger logr.Logger, metadata ActionMetadata, conn net.Conn) error { + sink, err := GetSink(metadata.Sink, SinkTypeMinio) + if err != nil { + logger.Error(err, "fail to get sink", "sinkName", metadata.Sink) + return err + } + fileService, err := remote.GetFileService("s3") + if err != nil { + logger.Error(err, "Failed to get file service of minio") + return err + } + if metadata.Filepath == "" { + filepath := filepath.Join(metadata.InstanceId, metadata.Filename) + metadata.Filepath = filepath + } + reader, writer := io.Pipe() + defer func() { + reader.Close() + writer.Close() + }() + var wg sync.WaitGroup + wg.Add(1) + go func() { + defer func() { + writer.Close() + wg.Done() + }() + len, _ := f.flowControl.LimitFlow(conn, writer, conn) + logger.Info("limitFlow", "len", len) + }() + ctx := context.Background() + newMinioParams := polarxMap.MergeMap(map[string]string{ + "retention-time": metadata.RetentionTime, + }, minioParams, false).(map[string]string) + if newMinioParams["retention-time"] == "" { + delete(newMinioParams, "retention-time") + } + if metadata.MinioBufferSize != "" { + newMinioParams["limit_reader_size"] = metadata.MinioBufferSize + } + newMinioParams["bucket"] = sink.Bucket + minioAuth := getMinioAuth(*sink) + ft, err := fileService.UploadFile(ctx, reader, metadata.Filepath, minioAuth, newMinioParams) + if err != nil { + logger.Error(err, "Failed to upload file to minio") + return err + } + err = ft.Wait() + reader.Close() + if err != nil { + logger.Error(err, "Failed to upload file to minio after wait") + return err + } + wg.Wait() + return nil +} + +func (f *FileServer) processDownloadMinio(logger logr.Logger, metadata ActionMetadata, conn net.Conn) error { + sink, err := GetSink(metadata.Sink, SinkTypeMinio) + if err != nil { + logger.Error(err, "fail to get sink", "sinkName", metadata.Sink) + return err + } + fileService, err := remote.GetFileService("s3") + if err != nil { + logger.Error(err, "Failed to get file service of minio") + return err + } + if metadata.Filepath == "" { + filepath := filepath.Join(metadata.InstanceId, metadata.Filename) + metadata.Filepath = filepath + } + pReader, writer := io.Pipe() + defer func() { + writer.Close() + pReader.Close() + }() + var wg sync.WaitGroup + wg.Add(1) + go func() { + defer func() { + err := recover() + if err != nil { + logger.Info("panic", "err", err) + } + }() + defer func() { + pReader.Close() + wg.Done() + }() + var reader io.Reader = pReader + if metadata.LimitSize != "" { + limitSize, _ := strconv.ParseInt(metadata.LimitSize, 10, 64) + reader = io.LimitReader(reader, limitSize) + } + len, _ := f.flowControl.LimitFlow(reader, conn, nil) + logger.Info("limitFlow", "len", len) + }() + ctx := context.Background() + newMinioParams := polarxMap.MergeMap(map[string]string{}, minioParams, false).(map[string]string) + newMinioParams["bucket"] = sink.Bucket + minioAuth := getMinioAuth(*sink) + ft, err := fileService.DownloadFile(ctx, writer, metadata.Filepath, minioAuth, newMinioParams) + if err != nil { + logger.Error(err, "Failed to download file from minio ") + return err + } + err = ft.Wait() + writer.Close() + if err != nil { + logger.Error(err, "Failed to download file from minio ") + return err + } + wg.Wait() + return nil +} + +func (f *FileServer) processListMinio(logger logr.Logger, metadata ActionMetadata, conn net.Conn) error { + sink, err := GetSink(metadata.Sink, SinkTypeMinio) + if err != nil { + logger.Error(err, "fail to get sink", "sinkName", metadata.Sink) + return err + } + fileService, err := remote.GetFileService("s3") + if err != nil { + logger.Error(err, "Failed to get file service of minio") + return err + } + if metadata.Filepath != "" && metadata.Filepath[len(metadata.Filepath)-1] != '/' { + metadata.Filepath = polarxPath.NewPathFromStringSequence(metadata.Filepath, "") + } + logger.Info("filepath to be listed: " + metadata.Filepath) + reader, writer := io.Pipe() + defer func() { + writer.Close() + reader.Close() + }() + var wg sync.WaitGroup + wg.Add(1) + go func() { + defer func() { + reader.Close() + wg.Done() + }() + len, _ := f.flowControl.LimitFlow(reader, conn, nil) + logger.Info("limitFlow", "len", len) + }() + ctx := context.Background() + minioParams := polarxMap.MergeMap(map[string]string{}, minioParams, false).(map[string]string) + minioParams["bucket"] = sink.Bucket + minioAuth := getMinioAuth(*sink) + ft, err := fileService.ListFiles(ctx, writer, metadata.Filepath, minioAuth, minioParams) + if err != nil { + logger.Error(err, "Failed to list file from oss ") + return err + } + err = ft.Wait() + writer.Close() + if err != nil { + logger.Error(err, "Failed to list file from oss ") + return err + } + wg.Wait() + return nil +} + func (f *FileServer) processUploadRemote(logger logr.Logger, metadata ActionMetadata, conn net.Conn) error { host, port := f.parseNetAddr(metadata.RedirectAddr) fileClient := NewFileClient(host, port, f.flowControl) @@ -881,17 +1065,18 @@ func (f *FileServer) readMetadata(reader io.Reader) (actionMeta ActionMetadata, return } actionMeta = ActionMetadata{ - Action: Action(metadata[MetadataActionOffset]), - InstanceId: metadata[MetadataInstanceIdOffset], - Filename: metadata[MetadataFilenameOffset], - RedirectAddr: metadata[MetadataRedirectOffset], - Filepath: metadata[MetadataFilepathOffset], - RetentionTime: metadata[MetadataRetentionTimeOffset], - Stream: metadata[MetadataStreamOffset], - Sink: metadata[MetadataSinkOffset], - RequestId: metadata[MetadataRequestIdOffset], - OssBufferSize: metadata[MetadataOssBufferSizeOffset], - LimitSize: metadata[MetadataLimitSize], + Action: Action(metadata[MetadataActionOffset]), + InstanceId: metadata[MetadataInstanceIdOffset], + Filename: metadata[MetadataFilenameOffset], + RedirectAddr: metadata[MetadataRedirectOffset], + Filepath: metadata[MetadataFilepathOffset], + RetentionTime: metadata[MetadataRetentionTimeOffset], + Stream: metadata[MetadataStreamOffset], + Sink: metadata[MetadataSinkOffset], + RequestId: metadata[MetadataRequestIdOffset], + OssBufferSize: metadata[MetadataOssBufferSizeOffset], + LimitSize: metadata[MetadataLimitSize], + MinioBufferSize: metadata[MetadataMinioBufferSizeOffset], } return } diff --git a/pkg/hpfs/hpfs_grpc.go b/pkg/hpfs/hpfs_grpc.go index 79259f6..ceb2960 100644 --- a/pkg/hpfs/hpfs_grpc.go +++ b/pkg/hpfs/hpfs_grpc.go @@ -837,6 +837,13 @@ func GetFileServiceParam(sinkName string, sinkType string) (err error, params ma auth["username"] = sinkPtr.User auth["password"] = sinkPtr.Password fileServiceName = "sftp" + } else if sinkPtr.Type == config.SinkTypeMinio { + auth["endpoint"] = sinkPtr.Endpoint + auth["access_key"] = sinkPtr.AccessKey + auth["secret_key"] = sinkPtr.AccessSecret + auth["useSSL"] = strconv.FormatBool(sinkPtr.UseSSL) + params["bucket"] = sinkPtr.Bucket + fileServiceName = "s3" } return } diff --git a/pkg/hpfs/remote/aliyun_oss_test.go b/pkg/hpfs/remote/aliyun_oss_test.go index d074a4e..b5abba6 100644 --- a/pkg/hpfs/remote/aliyun_oss_test.go +++ b/pkg/hpfs/remote/aliyun_oss_test.go @@ -45,3 +45,21 @@ func TestDeleteExpiredFilesOnSftp(t *testing.T) { ft.Wait() fmt.Println(*expiredFilesPtr) } + +func TestDeleteExpiredFilesOnMinio(t *testing.T) { + auth := map[string]string{} + auth["endpoint"] = "play.min.io" + auth["access_key"] = "" + auth["secret_key"] = "" + auth["useSSL"] = "true" + params := map[string]string{} + params["bucket"] = "yj-test-bucket" + params["deadline"] = strconv.FormatInt(time.Now().Unix(), 10) + fileService, _ := GetFileService("s3") + expiredFiles := make([]string, 0) + expiredFilesPtr := &expiredFiles + ctx := context.WithValue(context.Background(), common.AffectedFiles, expiredFilesPtr) + ft, _ := fileService.DeleteExpiredFile(ctx, "busuhhhh", auth, params) + ft.Wait() + fmt.Println(*expiredFilesPtr) +} diff --git a/pkg/hpfs/remote/minio.go b/pkg/hpfs/remote/minio.go new file mode 100644 index 0000000..e408911 --- /dev/null +++ b/pkg/hpfs/remote/minio.go @@ -0,0 +1,531 @@ +package remote + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/alibaba/polardbx-operator/pkg/hpfs/common" + polarxIo "github.com/alibaba/polardbx-operator/pkg/util/io" + polarxPath "github.com/alibaba/polardbx-operator/pkg/util/path" + "github.com/eapache/queue" + "github.com/minio/minio-go/v7" + "github.com/minio/minio-go/v7/pkg/credentials" + "github.com/minio/minio-go/v7/pkg/tags" + "io" + "strconv" + "sync/atomic" + "time" +) + +const ( + MinioLimitedReaderSize = 1 << 20 * 600 //600MB + MinioMaxPartSize = (1 << 30) * 5 //5GB +) + +func init() { + MustRegisterFileService("s3", &minioFs{}) +} + +type minioFs struct{} + +type minioContext struct { + ctx context.Context + + accessKey string + secretKey string + endpoint string + useSSL bool + bucket string + retentionTime time.Duration + writeLen bool + bufferSize int64 + useTmpFile bool + deadline int64 +} + +func newMinioContext(ctx context.Context, auth, params map[string]string) (*minioContext, error) { + var writeLen bool + if val, ok := params["write_len"]; ok { + toWriteLenVal, err := strconv.ParseBool(val) + if err != nil { + return nil, err + } + writeLen = toWriteLenVal + } + var useSSL bool = false + if val, ok := auth["useSSL"]; ok { + touseSSLVal, err := strconv.ParseBool(val) + if err != nil { + return nil, err + } + useSSL = touseSSLVal + } + var bufferSize int64 = 1 << 20 * 50 //50MB + if val, ok := params["buffer_size"]; ok { + toBufferSize, err := strconv.ParseInt(val, 10, 64) + if err != nil { + return nil, err + } + bufferSize = toBufferSize + } + var useTmpFile bool = true + if val, ok := params["use_tmp_file"]; ok { + toUseTmpFile, err := strconv.ParseBool(val) + if err != nil { + return nil, err + } + useTmpFile = toUseTmpFile + } + var deadline int64 = 0 + if val, ok := params["deadline"]; ok { + parsedDeadline, err := strconv.ParseInt(val, 10, 64) + if err != nil { + return nil, err + } + deadline = parsedDeadline + } + + minioCtx := &minioContext{ + ctx: ctx, + endpoint: auth["endpoint"], + accessKey: auth["access_key"], + secretKey: auth["secret_key"], + bucket: params["bucket"], + useSSL: useSSL, + writeLen: writeLen, + bufferSize: bufferSize, + useTmpFile: useTmpFile, + deadline: deadline, + } + + if t, ok := params["retention-time"]; ok { + d, err := time.ParseDuration(t) + if err != nil { + return nil, fmt.Errorf("format error for retention-time: %w", err) + } + minioCtx.retentionTime = d + } else { + minioCtx.retentionTime = 0 + } + + return minioCtx, nil +} + +func (m *minioFs) newClient(minioCtx *minioContext) (*minio.Client, error) { + return minio.New(minioCtx.endpoint, &minio.Options{ + Creds: credentials.NewStaticV4(minioCtx.accessKey, minioCtx.secretKey, ""), + Secure: minioCtx.useSSL, + }) +} + +func (m *minioFs) newCore(minioCtx *minioContext) (*minio.Core, error) { + return minio.NewCore(minioCtx.endpoint, &minio.Options{ + Creds: credentials.NewStaticV4(minioCtx.accessKey, minioCtx.secretKey, ""), + Secure: minioCtx.useSSL, + }) +} + +func (m minioFs) DeleteFile(ctx context.Context, path string, auth, params map[string]string) error { + minioCtx, err := newMinioContext(ctx, auth, params) + if err != nil { + return err + } + client, err := m.newCore(minioCtx) + if err != nil { + return fmt.Errorf("failed to create minio client: %w", err) + } + return client.RemoveObject(ctx, minioCtx.bucket, path, minio.RemoveObjectOptions{}) +} + +func (m minioFs) DeleteExpiredFile(ctx context.Context, path string, auth, params map[string]string) (FileTask, error) { + minioCtx, err := newMinioContext(ctx, auth, params) + if err != nil { + return nil, err + } + client, err := m.newCore(minioCtx) + if err != nil { + return nil, fmt.Errorf("failed to create minio client: %w", err) + } + ft := newFileTask(ctx) + go func() { + err := m.ListMinioFileWithDeadline(client, minioCtx, path, true, func(objs []string) error { + for _, obj := range objs { + if val, ok := ctx.Value(common.AffectedFiles).(*[]string); ok { + *val = append(*val, obj) + } + } + return nil + }) + ft.complete(err) + }() + return ft, nil + +} + +func (m *minioFs) UploadFile(ctx context.Context, reader io.Reader, path string, auth, params map[string]string) (FileTask, error) { + minioCtx, err := newMinioContext(ctx, auth, params) + var limitReaderSize int64 = MinioLimitedReaderSize + val, ok := params["limit_reader_size"] + if ok && val != "" { + parsedVal, err := strconv.ParseInt(val, 10, 64) + if err != nil { + panic(err) + } + limitReaderSize = parsedVal + } + if err != nil { + return nil, err + } + + client, err := m.newCore(minioCtx) + if err != nil { + return nil, fmt.Errorf("failed to create minio client: %w", err) + } + + ft := newFileTask(ctx) + go func() { + opts := minio.PutObjectOptions{} + // Expires at specified time. + if minioCtx.retentionTime > 0 { + opts = minio.PutObjectOptions{RetainUntilDate: time.Now().Add(minioCtx.retentionTime)} + } + if err != nil { + ft.complete(err) + return + } + var partIndex int = 1 + uploadID, err := client.NewMultipartUpload(ctx, minioCtx.bucket, path, opts) + if err != nil { + ft.complete(err) + return + } + defer func() { + client.AbortMultipartUpload(ctx, minioCtx.bucket, path, uploadID) + }() + pipeReader, pipeWriter := io.Pipe() + defer pipeReader.Close() + var actualSize int64 + go func() { + defer pipeWriter.Close() + buff := make([]byte, minioCtx.bufferSize) + written, err := io.CopyBuffer(pipeWriter, reader, buff) + if written > 0 { + if written%limitReaderSize != 0 { + toFillBytes := limitReaderSize - (written % limitReaderSize) + buff = make([]byte, minioCtx.bufferSize) + for { + if toFillBytes == 0 { + break + } + if toFillBytes > minioCtx.bufferSize { + pipeWriter.Write(buff) + toFillBytes -= minioCtx.bufferSize + } else { + pipeWriter.Write(buff[:toFillBytes]) + toFillBytes -= toFillBytes + } + } + } + atomic.StoreInt64(&actualSize, written) + } + if err != nil { + ft.complete(err) + return + } + }() + var uploadedLen int64 + partsInfo := make(map[int]minio.ObjectPart) + emptyBytes := make([]byte, 0) + for { + _, err := pipeReader.Read(emptyBytes) + if err != nil { + break + } + limitedReader := io.LimitReader(pipeReader, limitReaderSize) + + uploadPart, err := client.PutObjectPart(ctx, minioCtx.bucket, path, uploadID, partIndex, limitedReader, limitReaderSize, "", "", nil) + partsInfo[partIndex] = uploadPart + partIndex++ + uploadedLen += limitReaderSize + if err != nil { + break + } + } + if len(partsInfo) > 0 { + completeParts := make([]minio.CompletePart, 0) + for i := 1; i < partIndex; i++ { + part := partsInfo[i] + completeParts = append(completeParts, minio.CompletePart{ + ETag: part.ETag, + PartNumber: part.PartNumber, + }) + } + _, err = client.CompleteMultipartUpload(ctx, minioCtx.bucket, path, uploadID, completeParts) + if err != nil { + ft.complete(err) + return + } + totalSize := atomic.LoadInt64(&actualSize) + SetMinioTags(client, ctx, minioCtx, path, actualSize) + ft.complete(nil) + + var copyPosition int64 + pageNumber := 1 + copiedParts := make([]minio.CompletePart, 0) + if totalSize%limitReaderSize != 0 { + uploadID, err := client.NewMultipartUpload(ctx, minioCtx.bucket, path, opts) + if err != nil { + return + } + metadata := make(map[string]string) + for { + partSize := totalSize - copyPosition + if partSize >= MinioMaxPartSize { + partSize = MinioMaxPartSize + } + copiedUploadPart, err := client.CopyObjectPart(ctx, minioCtx.bucket, path, minioCtx.bucket, path, uploadID, + pageNumber, copyPosition, partSize, metadata) + if err != nil { + return + } + pageNumber++ + copiedParts = append(copiedParts, copiedUploadPart) + copyPosition += partSize + if copyPosition == totalSize { + _, err = client.CompleteMultipartUpload(ctx, minioCtx.bucket, path, uploadID, copiedParts) + if err != nil { + return + } + SetMinioTags(client, ctx, minioCtx, path, actualSize) + break + } + } + } + } else { + ft.complete(nil) + } + }() + return ft, nil +} + +func SetMinioTags(client *minio.Core, ctx context.Context, minioCtx *minioContext, objectName string, actualSize int64) { + tagMap := make(map[string]string) + tagMap["uploader"] = "hpfs" + tagMap["size"] = strconv.FormatInt(actualSize, 10) + tagging, _ := tags.NewTags(tagMap, true) + client.PutObjectTagging(ctx, minioCtx.bucket, objectName, tagging, minio.PutObjectTaggingOptions{}) +} + +func GetMinioActualSizeFromTags(ctx context.Context, client *minio.Client, minioCtx *minioContext, objKey string) int64 { + hpfsUpload := false + var size int64 = -1 + tagResult, err := client.GetObjectTagging(ctx, minioCtx.bucket, objKey, minio.GetObjectTaggingOptions{}) + if err != nil { + return size + } + if tagResult.ToMap() != nil && len(tagResult.ToMap()) > 2 { + sizeStr := "" + for key, value := range tagResult.ToMap() { + if key == "uploader" && value == "hpfs" { + hpfsUpload = true + } + if key == "size" { + sizeStr = value + } + } + if hpfsUpload && sizeStr != "" { + size, err = strconv.ParseInt(sizeStr, 10, 64) + if err != nil { + size = -1 + } + } + } + if !hpfsUpload { + size = -1 + } + return size +} + +func (m *minioFs) DownloadFile(ctx context.Context, writer io.Writer, path string, auth, params map[string]string) (FileTask, error) { + minioCtx, err := newMinioContext(ctx, auth, params) + if err != nil { + return nil, err + } + client, err := m.newClient(minioCtx) + if err != nil { + return nil, fmt.Errorf("failed to create minio client: %w", err) + } + ft := newFileTask(ctx) + go func() { + var bytesCount int64 + if minioCtx.writeLen { + r, err := client.StatObject(ctx, minioCtx.bucket, path, minio.StatObjectOptions{}) + if err != nil { + ft.complete(fmt.Errorf("failed to get object meta: %w", err)) + return + } + bytesCount = r.Size + actualSize := GetMinioActualSizeFromTags(ctx, client, minioCtx, path) + if actualSize != -1 { + bytesCount = actualSize + } + polarxIo.WriteUint64(writer, uint64(bytesCount)) + } + r, err := client.GetObject(ctx, minioCtx.bucket, path, minio.GetObjectOptions{}) + if err != nil { + ft.complete(fmt.Errorf("failed to get object: %w", err)) + return + } + if minioCtx.writeLen { + _, err = io.CopyN(writer, r, bytesCount) + } else { + _, err = io.Copy(writer, r) + } + if err != nil { + ft.complete(fmt.Errorf("failed to copy content: %w", err)) + return + } + ft.complete(nil) + + }() + + return ft, nil +} + +func (m *minioFs) ListFiles(ctx context.Context, writer io.Writer, path string, auth, params map[string]string) (FileTask, error) { + minioCtx, err := newMinioContext(ctx, auth, params) + if err != nil { + return nil, err + } + client, err := m.newCore(minioCtx) + if err != nil { + return nil, fmt.Errorf("failed to create minio client: %w", err) + } + + ft := newFileTask(ctx) + go func() { + entryNames := make([]string, 0) + marker := "" + prefix := path + delimiter := "/" + + for { + lsRes, err := client.ListObjects(minioCtx.bucket, prefix, marker, delimiter, 1000) + if err != nil { + ft.complete(fmt.Errorf("failed to list oss objects in path %s: %w", path, err)) + return + } + for _, object := range lsRes.Contents { // file + entryNames = append(entryNames, polarxPath.GetBaseNameFromPath(object.Key)) + } + for _, dir := range lsRes.CommonPrefixes { // subdirectory + entryNames = append(entryNames, polarxPath.GetBaseNameFromPath(dir.Prefix)) + } + if lsRes.IsTruncated { + marker = lsRes.NextMarker + } else { + break + } + + } + // parse entry slice and send response + encodedEntryNames, err := json.Marshal(entryNames) + if err != nil { + ft.complete(fmt.Errorf("failed to encode entry name slice,: %w", err)) + return + } + if minioCtx.writeLen { + bytesCount := int64(len(encodedEntryNames)) + err := polarxIo.WriteUint64(writer, uint64(bytesCount)) + if err != nil { + ft.complete(fmt.Errorf("failed to send content bytes count: %w", err)) + return + } + _, err = io.CopyN(writer, bytes.NewReader(encodedEntryNames), bytesCount) + } else { + _, err = io.Copy(writer, bytes.NewReader(encodedEntryNames)) + } + if err != nil { + ft.complete(fmt.Errorf("failed to copy content: %w", err)) + return + } + ft.complete(nil) + }() + return ft, nil +} + +func (m *minioFs) ListAllFiles(ctx context.Context, path string, auth, params map[string]string) (FileTask, error) { + minioCtx, err := newMinioContext(ctx, auth, params) + if err != nil { + return nil, err + } + client, err := m.newCore(minioCtx) + if err != nil { + return nil, fmt.Errorf("failed to create minio client: %w", err) + } + ft := newFileTask(ctx) + go func() { + err := m.ListMinioFileWithDeadline(client, minioCtx, path, false, func(objs []string) error { + for _, obj := range objs { + if val, ok := ctx.Value(common.AffectedFiles).(*[]string); ok { + *val = append(*val, obj) + } + } + return nil + }) + ft.complete(err) + }() + return ft, nil + +} + +func (m *minioFs) ListMinioFileWithDeadline(client *minio.Core, minioCtx *minioContext, path string, isDelete bool, callback func([]string) error) error { + marker := "" + delimiter := "/" + fileQueue := queue.New() + path = path + "/" + fileQueue.Add([]string{path, marker}) + for fileQueue.Length() != 0 { + element := fileQueue.Remove().([]string) + lsRes, err := client.ListObjects(minioCtx.bucket, element[0], marker, delimiter, 1000) + if err != nil { + return err + } + if lsRes.IsTruncated { + fileQueue.Add([]string{element[0], lsRes.NextMarker}) + } + for _, commonPrefix := range lsRes.CommonPrefixes { + fileQueue.Add([]string{commonPrefix.Prefix, ""}) + } + if isDelete { + objectsCh := make(chan minio.ObjectInfo) + go func() { + defer close(objectsCh) + for _, obj := range lsRes.Contents { + if obj.LastModified.Unix() < time.Now().Unix() { + objectsCh <- obj + } + } + }() + for rErr := range client.RemoveObjects(context.Background(), minioCtx.bucket, objectsCh, minio.RemoveObjectsOptions{GovernanceBypass: true}) { + fmt.Println("Error detected during deletion: ", rErr) + } + } + objs := make([]string, 0) + + for _, obj := range lsRes.Contents { + if obj.LastModified.Unix() < minioCtx.deadline { + // delete it + objs = append(objs, obj.Key) + } + } + if len(objs) > 0 { + err := callback(objs) + if err != nil { + return err + } + } + } + return nil +} diff --git a/pkg/init/init.go b/pkg/init/init.go index 166704a..e7de54c 100644 --- a/pkg/init/init.go +++ b/pkg/init/init.go @@ -202,6 +202,9 @@ func Do() { defer db.Close() fmt.Println("Connected to metadb!") + deleteStmt := fmt.Sprintf(`DELETE FROM server_info where extras = '%s' and inst_id = '%s' limit 1`, env.PodId, env.InstanceID) + fmt.Println("try clean dirty server info record sql = " + deleteStmt) + fmt.Printf("Try self-registration, register %s:%d to metadb...\n", env.LocalIP, env.ServerPort) stmt := fmt.Sprintf(`REPLACE INTO server_info (inst_id, inst_type, ip, port, htap_port, mgr_port, mpp_port, status, cpu_core, mem_size, extras) @@ -220,6 +223,11 @@ func Do() { os.Exit(-1) } + if _, err := tx.ExecContext(ctx, deleteStmt); err != nil { + fmt.Println("Error when clean dirty server info record") + os.Exit(-1) + } + if _, err := tx.ExecContext(ctx, stmt); err != nil { fmt.Println("Error when self-registering: " + err.Error()) os.Exit(-1) diff --git a/pkg/k8s/helper/dnpod.go b/pkg/k8s/helper/dnpod.go new file mode 100644 index 0000000..1d1f882 --- /dev/null +++ b/pkg/k8s/helper/dnpod.go @@ -0,0 +1,20 @@ +package helper + +import ( + "fmt" + corev1 "k8s.io/api/core/v1" +) + +func GetPaxosAddr(pod *corev1.Pod) string { + paxosPort := MustGetPortFromContainer(MustGetContainerFromPod(pod, "engine"), "paxos").ContainerPort + addr := fmt.Sprintf("%s:%d", pod.Status.PodIP, paxosPort) + return addr +} + +func GetPaxosAddrs(pods []corev1.Pod) []string { + addrs := make([]string, 0, len(pods)) + for _, pod := range pods { + addrs = append(addrs, GetPaxosAddr(&pod)) + } + return addrs +} diff --git a/pkg/k8s/helper/pod.go b/pkg/k8s/helper/pod.go index f591076..612ac4a 100644 --- a/pkg/k8s/helper/pod.go +++ b/pkg/k8s/helper/pod.go @@ -18,7 +18,6 @@ package helper import ( corev1 "k8s.io/api/core/v1" - "time" ) func IsPodRunning(pod *corev1.Pod) bool { @@ -85,13 +84,11 @@ func MustGetContainerFromPod(pod *corev1.Pod, name string) *corev1.Container { } func IsPodDeletedOrFailed(po *corev1.Pod) bool { - return IsPodDeleted(po, 32*time.Second) || IsPodFailed(po) + return IsPodDeleted(po) || IsPodFailed(po) } -func IsPodDeleted(po *corev1.Pod, delaySeconds time.Duration) bool { - now := time.Now() - now = now.Add(-delaySeconds) - return po != nil && !po.DeletionTimestamp.IsZero() && po.DeletionTimestamp.UTC().Before(now) +func IsPodDeleted(po *corev1.Pod) bool { + return po != nil && !po.DeletionTimestamp.IsZero() } func IsPodFailed(po *corev1.Pod) bool { diff --git a/pkg/meta/core/gms/manager.go b/pkg/meta/core/gms/manager.go index 2fa8564..8fbc90c 100644 --- a/pkg/meta/core/gms/manager.go +++ b/pkg/meta/core/gms/manager.go @@ -290,6 +290,9 @@ type Manager interface { // records into metadb. EnableStorageNodes(storageNodes ...StorageNodeInfo) error + //UpdateRoStorageNodes update the ro not_vip storage node info + UpdateRoStorageNodes(storageNodes ...StorageNodeInfo) error + // DisableStorageNodes disables the specified storage nodes by removing the corresponding // records from metadb. DisableStorageNodes(storageNodes ...StorageNodeInfo) error diff --git a/pkg/meta/core/gms/manager_impl.go b/pkg/meta/core/gms/manager_impl.go index c2d6fd9..9145d9d 100644 --- a/pkg/meta/core/gms/manager_impl.go +++ b/pkg/meta/core/gms/manager_impl.go @@ -904,6 +904,20 @@ func (meta *manager) EnableStorageNodes(storageNodes ...StorageNodeInfo) error { return meta.ExecuteStatementsAndNotify(stmt, notifyStmt) } +func (meta *manager) UpdateRoStorageNodes(storageNodes ...StorageNodeInfo) error { + if len(storageNodes) == 0 { + return nil + } + stmts := make([]string, 0) + for _, storageNode := range storageNodes { + stmts = append(stmts, meta.newUpdateRoStorageInfoStmt(storageNode)) + } + stmts = append(stmts, meta.newNotifyStmt(fmt.Sprintf(clStorageInfoDataIdFormat, meta.getClusterID()))) + + // Execute the statement + return meta.ExecuteStatementsAndNotify(stmts...) +} + func (s *StorageNodeInfo) toSelectCriteria() string { return fmt.Sprintf("(storage_inst_id = '%s')", s.Id) } @@ -1163,6 +1177,14 @@ func (meta *manager) newNotifyStmt(dataId string) string { return fmt.Sprintf(`UPDATE config_listener SET op_version = op_version + 1 WHERE data_id = '%s'`, dataId) } +func (meta *manager) newUpdateRoStorageInfoStmt(record StorageNodeInfo) string { + return fmt.Sprintf(` + update storage_info + set ip = '%s', port = %d, xport = %d, gmt_modified = now() + where + storage_inst_id = '%s' and inst_id = '%s' and inst_kind = 1 and is_vip = 0`, record.Host, record.Port, record.XProtocolPort, record.Id, record.ClusterId) +} + func (meta *manager) CreateDBAccount(user, passwd string, grantOptions ...*GrantOption) error { // FIXME current only the first valid grant type is considered. grantType := GrantSuperPrivilege diff --git a/pkg/operator/v1/config/config.go b/pkg/operator/v1/config/config.go index 4629d05..eb31a2f 100644 --- a/pkg/operator/v1/config/config.go +++ b/pkg/operator/v1/config/config.go @@ -27,6 +27,7 @@ import ( ) type config struct { + Version string `json:"version,omitempty"` ImagesConfig imagesConfig `json:"images,omitempty"` SchedulerConfig schedulerConfig `json:"scheduler,omitempty"` ClusterConfig clusterConfig `json:"cluster,omitempty"` diff --git a/pkg/operator/v1/polardbx/controllers/polardbxcluster_controller.go b/pkg/operator/v1/polardbx/controllers/polardbxcluster_controller.go index 0025124..3d285f3 100644 --- a/pkg/operator/v1/polardbx/controllers/polardbxcluster_controller.go +++ b/pkg/operator/v1/polardbx/controllers/polardbxcluster_controller.go @@ -18,7 +18,9 @@ package controllers import ( "context" + "errors" "github.com/alibaba/polardbx-operator/pkg/operator/v1/polardbx/steps/instance/pitr" + polarxJson "github.com/alibaba/polardbx-operator/pkg/util/json" "time" "github.com/alibaba/polardbx-operator/pkg/operator/hint" @@ -64,7 +66,12 @@ type PolarDBXReconciler struct { func (r *PolarDBXReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) { log := r.Logger.WithValues("namespace", request.Namespace, "polardbxcluster", request.Name) - + defer func() { + err := recover() + if err != nil { + log.Error(errors.New(polarxJson.Convert2JsonString(err)), "") + } + }() if hint.IsNamespacePaused(request.Namespace) { log.Info("Reconciling is paused, skip") return reconcile.Result{}, nil @@ -257,9 +264,16 @@ func (r *PolarDBXReconciler) newReconcileTask(rc *polardbxreconcile.Context, pol //sync cn label to pod without rebuild pod instancesteps.TrySyncCnLabelToPodsDirectly(task) + //sync dn label to pod without rebuild pod + instancesteps.TrySyncDnLabelToPodsDirectly(task) + + //sync gms label to pod without rebuild pod + instancesteps.TrySyncGMSLabelToPodsDirectly(task) + // Update snapshot and observed generation. commonsteps.UpdateSnapshotAndObservedGeneration(task) instancesteps.SyncDnReplicasAndCheckControllerRef(task) + instancesteps.SyncReadonlyDnStorageInfo(task) case polardbxv1polardbx.PhaseUpgrading: // Update storage size and configs. control.Block( diff --git a/pkg/operator/v1/polardbx/factory/backup.go b/pkg/operator/v1/polardbx/factory/backup.go index 1c4bffa..f80afc2 100644 --- a/pkg/operator/v1/polardbx/factory/backup.go +++ b/pkg/operator/v1/polardbx/factory/backup.go @@ -165,11 +165,14 @@ func (f *objectFactory) NewDummyPolarDBXBackup(metadata *MetadataBackup) (*polar StorageProvider: *polardbx.Spec.Restore.StorageProvider, }, Status: polardbxv1.PolarDBXBackupStatus{ - Phase: polardbxv1.BackupDummy, - BackupRootPath: polardbx.Spec.Restore.From.BackupSetPath, - ClusterSpecSnapshot: metadata.PolarDBXClusterMetadata.Spec, - XStores: metadata.GetXstoreNameList(), - Backups: make(map[string]string), + Phase: polardbxv1.BackupDummy, + BackupRootPath: polardbx.Spec.Restore.From.BackupSetPath, + ClusterSpecSnapshot: metadata.PolarDBXClusterMetadata.Spec, + XStores: metadata.GetXstoreNameList(), + Backups: make(map[string]string), + LatestRecoverableTimestamp: metadata.LatestRecoverableTimestamp, + StartTime: metadata.StartTime, + EndTime: metadata.EndTime, }, } return polardbxBackup, nil @@ -192,6 +195,12 @@ func (f *objectFactory) NewDummyXstoreBackup(xstoreName string, polardbxBackup * ), Namespace: polardbxBackup.Namespace, Annotations: f.newDummyAnnotation(), + Labels: map[string]string{ + meta.LabelName: polardbxBackup.Spec.Cluster.Name, + meta.LabelTopBackup: polardbxBackup.Name, + meta.LabelBackupXStore: xstoreName, + meta.LabelBackupXStoreUID: string(xstoreMetadata.UID), + }, }, Spec: polardbxv1.XStoreBackupSpec{ XStore: polardbxv1.XStoreReference{ diff --git a/pkg/operator/v1/polardbx/factory/deployment.go b/pkg/operator/v1/polardbx/factory/deployment.go index 77c9102..53cd5fd 100644 --- a/pkg/operator/v1/polardbx/factory/deployment.go +++ b/pkg/operator/v1/polardbx/factory/deployment.go @@ -162,6 +162,9 @@ func (f *objectFactory) getStatelessMatchingRules(replicas int, hostNetwork bool if defaultRule != nil { defaultRuleName = defaultRule.Name } + if f.buildContext.CdcGroup != nil && defaultRuleName == "" { + defaultRuleName = f.buildContext.CdcGroup.Name + } if replicas > ruleDeclaredReplicas { ruleReplicas[defaultRuleName] = matchingRule{ replicas: replicas - ruleDeclaredReplicas, @@ -609,6 +612,9 @@ func (f *objectFactory) newDeployment4CDC(group string, mr *matchingRule, mustSt config := f.rc.Config() topology := polardbx.Status.SpecSnapshot.Topology template := polardbx.Status.SpecSnapshot.Topology.Nodes.CDC.Template + if f.buildContext.CdcGroup != nil && f.buildContext.CdcGroup.Template != nil { + template = *f.buildContext.CdcGroup.Template + } // Factories envFactory, err := NewEnvFactory(f.rc, polardbx, f) @@ -968,6 +974,16 @@ func (f *objectFactory) buildDeployments(rules map[string]matchingRule, builder return deployments, nil } +func (f *objectFactory) filterRules(rules []polardbxv1polardbx.StatelessTopologyRuleItem, filter func(polardbxv1polardbx.StatelessTopologyRuleItem) bool) []polardbxv1polardbx.StatelessTopologyRuleItem { + resultRules := make([]polardbxv1polardbx.StatelessTopologyRuleItem, 0) + for _, rule := range rules { + if filter(rule) { + resultRules = append(resultRules, rule) + } + } + return resultRules +} + func (f *objectFactory) NewDeployments4CDC() (map[string]appsv1.Deployment, error) { polardbx, err := f.rc.GetPolarDBX() if err != nil { @@ -975,23 +991,27 @@ func (f *objectFactory) NewDeployments4CDC() (map[string]appsv1.Deployment, erro } topology := polardbx.Status.SpecSnapshot.Topology rules := topology.Rules.Components.CDC + nodes := topology.Nodes.CDC if nodes == nil { return nil, nil } - replicas := topology.Nodes.CDC.Replicas + topology.Nodes.CDC.XReplicas + normalRules := f.filterRules(rules, func(item polardbxv1polardbx.StatelessTopologyRuleItem) bool { + return item.ExtraName == "" + }) + replicas := topology.Nodes.CDC.Replicas.IntValue() + topology.Nodes.CDC.XReplicas // FIXME Host network for CDC not supported. - matchingRules, err := f.getStatelessMatchingRules(int(replicas) /*template.HostNetwork*/, false, rules) + matchingRules, err := f.getStatelessMatchingRules(int(replicas) /*template.HostNetwork*/, false, normalRules) if err != nil { return nil, err } + deployments := map[string]appsv1.Deployment{} if topology.Nodes.CDC.XReplicas > 0 { //first global binlog cdc, then binlog x cdc. - resultMatchRules := SplitMatchRules(matchingRules, int(topology.Nodes.CDC.Replicas), int(topology.Nodes.CDC.XReplicas)) + resultMatchRules := SplitMatchRules(matchingRules, topology.Nodes.CDC.Replicas.IntValue(), topology.Nodes.CDC.XReplicas) buildXReplicasFlags := []bool{false, true} - deployments := map[string]appsv1.Deployment{} f.buildContext.HasCdcXBinLog = true for index, xReplicasFlags := range buildXReplicasFlags { f.buildContext.BuildCdcXBinLog = xReplicasFlags @@ -1002,10 +1022,32 @@ func (f *objectFactory) NewDeployments4CDC() (map[string]appsv1.Deployment, erro deployments = maputil.MergeMap(deployments, builtDeployments, false).(map[string]appsv1.Deployment) } return deployments, nil + } else { + deployments, err = f.buildDeployments(matchingRules, f.newDeployment4CDC) + if err != nil { + return deployments, err + } } - // Build deployments according rules. - return f.buildDeployments(matchingRules, f.newDeployment4CDC) + for _, group := range topology.Nodes.CDC.Groups { + f.buildContext.CdcGroup = group + exactRules := f.filterRules(rules, func(item polardbxv1polardbx.StatelessTopologyRuleItem) bool { + return item.ExtraName == group.Name + }) + matchingRules, err = f.getStatelessMatchingRules(int(group.Replicas), false, exactRules) + if err != nil { + return nil, err + } + cdcGroupDeployments, err := f.buildDeployments(matchingRules, f.newDeployment4CDC) + if err != nil { + return cdcGroupDeployments, err + } + for k, v := range cdcGroupDeployments { + deployments[k] = v + } + f.buildContext.CdcGroup = nil + } + return deployments, nil } func SplitMatchRules(matchRules map[string]matchingRule, replicasGroups ...int) (resultMatchRules []map[string]matchingRule) { diff --git a/pkg/operator/v1/polardbx/factory/env_factory.go b/pkg/operator/v1/polardbx/factory/env_factory.go index 05f38d7..8161d45 100644 --- a/pkg/operator/v1/polardbx/factory/env_factory.go +++ b/pkg/operator/v1/polardbx/factory/env_factory.go @@ -382,6 +382,19 @@ func (e *envFactory) newBasicEnvVarsForCDCEngine(gmsConn *StorageConnection) []c }) } } + if e.objFactory.buildContext.CdcGroup != nil { + clusterId = e.polardbx.Name + "-group-" + e.objFactory.buildContext.CdcGroup.Name + envs = append(envs, corev1.EnvVar{ + Name: "cluster_id", + Value: clusterId, + }) + for k, v := range e.objFactory.buildContext.CdcGroup.Config.Envs { + envs = append(envs, corev1.EnvVar{ + Name: k, + Value: v.String(), + }) + } + } return envs } diff --git a/pkg/operator/v1/polardbx/factory/object_factory.go b/pkg/operator/v1/polardbx/factory/object_factory.go index c14ae69..0f6961e 100644 --- a/pkg/operator/v1/polardbx/factory/object_factory.go +++ b/pkg/operator/v1/polardbx/factory/object_factory.go @@ -17,14 +17,13 @@ limitations under the License. package factory import ( + polardbxv1 "github.com/alibaba/polardbx-operator/api/v1" "github.com/alibaba/polardbx-operator/api/v1/polardbx" + "github.com/alibaba/polardbx-operator/pkg/operator/v1/polardbx/convention" + polardbxv1reconcile "github.com/alibaba/polardbx-operator/pkg/operator/v1/polardbx/reconcile" promv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" - - polardbxv1 "github.com/alibaba/polardbx-operator/api/v1" - "github.com/alibaba/polardbx-operator/pkg/operator/v1/polardbx/convention" - polardbxv1reconcile "github.com/alibaba/polardbx-operator/pkg/operator/v1/polardbx/reconcile" ) type ObjectFactory interface { @@ -59,6 +58,7 @@ type ObjectFactory interface { type Context struct { HasCdcXBinLog bool BuildCdcXBinLog bool + CdcGroup *polardbx.CdcGroup } type objectFactory struct { diff --git a/pkg/operator/v1/polardbx/factory/probe_configure.go b/pkg/operator/v1/polardbx/factory/probe_configure.go index 14d3e12..dbb65c9 100644 --- a/pkg/operator/v1/polardbx/factory/probe_configure.go +++ b/pkg/operator/v1/polardbx/factory/probe_configure.go @@ -96,18 +96,23 @@ func (p *probeConfigure) ConfigureForCNExporter(container *corev1.Container, por } func (p *probeConfigure) ConfigureForCDCEngine(container *corev1.Container, ports CDCPorts) { + hanlder := corev1.Handler{ + TCPSocket: &corev1.TCPSocketAction{ + Port: intstr.FromInt(ports.GetAccessPort()), + }, + } container.StartupProbe = &corev1.Probe{ InitialDelaySeconds: 10, TimeoutSeconds: 10, PeriodSeconds: 10, FailureThreshold: 18, - Handler: p.newProbeWithProber("/liveness", probe.TypeCdc, &ports), + Handler: hanlder, } container.LivenessProbe = &corev1.Probe{ TimeoutSeconds: 10, PeriodSeconds: 10, FailureThreshold: 5, - Handler: p.newProbeWithProber("/liveness", probe.TypeCdc, &ports), + Handler: hanlder, } } diff --git a/pkg/operator/v1/polardbx/factory/secret.go b/pkg/operator/v1/polardbx/factory/secret.go index 858ab4d..1fddba1 100644 --- a/pkg/operator/v1/polardbx/factory/secret.go +++ b/pkg/operator/v1/polardbx/factory/secret.go @@ -57,6 +57,10 @@ func (f *objectFactory) NewSecret() (*corev1.Secret, error) { privileges := polardbx.Spec.Privileges + if polardbx.Spec.Readonly { + privileges = f.rc.MustGetPrimaryPolarDBX().Spec.Privileges + } + // Random password if not specified. accounts := make(map[string]string) for _, priv := range privileges { diff --git a/pkg/operator/v1/polardbx/factory/storage.go b/pkg/operator/v1/polardbx/factory/storage.go index 87f7f48..82510af 100644 --- a/pkg/operator/v1/polardbx/factory/storage.go +++ b/pkg/operator/v1/polardbx/factory/storage.go @@ -407,6 +407,7 @@ func (f *objectFactory) newXStore( // Determine parameter template. templateName := polardbx.Spec.ParameterTemplate.Name + templateNameSpace := polardbx.Spec.ParameterTemplate.Namespace // Build affinity := f.newXStoreNodeSetAffinity(polardbx, nil) @@ -455,7 +456,8 @@ func (f *objectFactory) newXStore( ), Annotations: map[string]string{ // Set to empty rand to avoid long xstore/pod names. - xstoremeta.AnnotationGuideRand: "", + xstoremeta.AnnotationGuideRand: "", + polardbxv1common.AnnotationOperatorCreateVersion: polardbx.Annotations[polardbxv1common.AnnotationOperatorCreateVersion], }, Finalizers: []string{polardbxmeta.Finalizer}, }, @@ -484,7 +486,8 @@ func (f *objectFactory) newXStore( NodeSets: nodeSets, }, ParameterTemplate: polardbxv1xstore.ParameterTemplate{ - Name: templateName, + Namespace: templateNameSpace, + Name: templateName, }, }, } diff --git a/pkg/operator/v1/polardbx/guide/topology_mode.go b/pkg/operator/v1/polardbx/guide/topology_mode.go index e36e4fb..70d8305 100644 --- a/pkg/operator/v1/polardbx/guide/topology_mode.go +++ b/pkg/operator/v1/polardbx/guide/topology_mode.go @@ -121,7 +121,7 @@ func (h *topologyModeHandler) updateTopology(obj *polardbxv1.PolarDBXCluster, mo Resources: *conf.resource, }, } - obj.Spec.Topology.Nodes.CDC.Replicas = conf.replica + obj.Spec.Topology.Nodes.CDC.Replicas = intstr.FromInt(int(conf.replica)) default: return errors.New("unexpected type of node") } diff --git a/pkg/operator/v1/polardbx/reconcile/context.go b/pkg/operator/v1/polardbx/reconcile/context.go index 2bccd73..a5c5470 100644 --- a/pkg/operator/v1/polardbx/reconcile/context.go +++ b/pkg/operator/v1/polardbx/reconcile/context.go @@ -759,13 +759,17 @@ func (rc *Context) GetDN(i int) (*polardbxv1.XStore, error) { } func (rc *Context) GetLeaderOfDN(xstore *polardbxv1.XStore) (*corev1.Pod, error) { - var leaderPod corev1.Pod leaderPodName := types.NamespacedName{Namespace: rc.Namespace(), Name: xstore.Status.LeaderPod} - err := rc.Client().Get(rc.Context(), leaderPodName, &leaderPod) + return rc.GetPodFromPodName(leaderPodName) +} + +func (rc *Context) GetPodFromPodName(podName types.NamespacedName) (*corev1.Pod, error) { + var pod corev1.Pod + err := rc.Client().Get(rc.Context(), podName, &pod) if err != nil { return nil, err } - return &leaderPod, nil + return &pod, nil } func (rc *Context) GetXstoreByPod(pod *corev1.Pod) (*polardbxv1.XStore, error) { @@ -844,8 +848,8 @@ func (rc *Context) GetDeploymentMap(role string) (map[string]*appsv1.Deployment, } func (rc *Context) GetPods(role string) ([]corev1.Pod, error) { - if role != polardbxmeta.RoleCN && role != polardbxmeta.RoleCDC && role != polardbxmeta.RoleColumnar { - panic("required role to be cn, cdc or columnar, but found " + role) + if role != polardbxmeta.RoleCN && role != polardbxmeta.RoleCDC && role != polardbxmeta.RoleColumnar && role != polardbxmeta.RoleDN && role != polardbxmeta.RoleGMS { + panic("required role to be cn, cdc, dn or columnar, but found " + role) } pods := rc.podsByRole[role] if pods == nil { @@ -868,7 +872,9 @@ func (rc *Context) GetPods(role string) ([]corev1.Pod, error) { if rc.podsByRole == nil { rc.podsByRole = make(map[string][]corev1.Pod) } - + sort.Slice(podList.Items, func(i, j int) bool { + return podList.Items[i].ObjectMeta.CreationTimestamp.Before(&podList.Items[j].ObjectMeta.CreationTimestamp) + }) rc.podsByRole[role] = podList.Items } @@ -1112,15 +1118,11 @@ func (rc *Context) GetXstoreGroupManagerByPod(pod *corev1.Pod) (group.GroupManag return mgr, nil } } - - podService, err := rc.GetService(xstoreconvention.NewXstorePodServiceName(pod)) - if err != nil { - return nil, err - } - host, port, err := k8shelper.GetClusterIpPortFromService(podService, convention.PortAccess) - if err != nil { - return nil, err - } + host := pod.Status.PodIP + port := k8shelper.MustGetPortFromContainer( + k8shelper.MustGetContainerFromPod(pod, convention.ContainerEngine), + convention.PortAccess, + ).ContainerPort xstore, err := rc.GetXstoreByPod(pod) if err != nil { return nil, err @@ -1506,6 +1508,11 @@ func (rc *Context) GetPolarDBXTemplateName() (parameterTemplateName string) { return polardbx.Spec.ParameterTemplate.Name } +func (rc *Context) GetPolarDBXTemplateNameSpace() (parameterTemplateName string) { + polardbx := rc.MustGetPolarDBX() + return polardbx.Spec.ParameterTemplate.Namespace +} + func (rc *Context) SetPolarDBXParams(param map[string]map[string]polardbxv1.Params) { rc.polardbxParamsRoleMap = param } @@ -1542,9 +1549,12 @@ func (rc *Context) GetPolarDBXTemplateParams() (templateParams map[string]map[st return rc.polardbxTemplateParams } -func (rc *Context) GetPolarDBXParameterTemplate(name string) (*polardbxv1.PolarDBXParameterTemplate, error) { +func (rc *Context) GetPolarDBXParameterTemplate(nameSpace, name string) (*polardbxv1.PolarDBXParameterTemplate, error) { + if nameSpace == "" { + nameSpace = rc.polardbxKey.Namespace + } tmKey := types.NamespacedName{ - Namespace: rc.polardbxKey.Namespace, + Namespace: nameSpace, Name: name, } if rc.polardbxParameterTemplate == nil { @@ -1561,8 +1571,8 @@ func (rc *Context) GetPolarDBXParameterTemplate(name string) (*polardbxv1.PolarD return rc.polardbxParameterTemplate, nil } -func (rc *Context) MustGetPolarDBXParameterTemplate(name string) *polardbxv1.PolarDBXParameterTemplate { - polardbxParameterTemplate, err := rc.GetPolarDBXParameterTemplate(name) +func (rc *Context) MustGetPolarDBXParameterTemplate(nameSpace, name string) *polardbxv1.PolarDBXParameterTemplate { + polardbxParameterTemplate, err := rc.GetPolarDBXParameterTemplate(nameSpace, name) if err != nil { panic(err) } diff --git a/pkg/operator/v1/polardbx/steps/backup/common/object.go b/pkg/operator/v1/polardbx/steps/backup/common/object.go index db84b17..57daf2f 100644 --- a/pkg/operator/v1/polardbx/steps/backup/common/object.go +++ b/pkg/operator/v1/polardbx/steps/backup/common/object.go @@ -306,8 +306,7 @@ var CollectBinlogStartIndex = polardbxv1reconcile.NewStepBinder("CollectBinlogSt var DrainCommittingTrans = polardbxv1reconcile.NewStepBinder("DrainCommittingTrans", func(rc *polardbxv1reconcile.Context, flow control.Flow) (reconcile.Result, error) { - backup := rc.MustGetPolarDBXBackup() - cnManager, err := rc.GetPolarDBXGroupManagerByBackup(backup) + cnManager, err := rc.GetPolarDBXGroupManager() if err != nil { return flow.Error(err, "get CN DataSource Failed") } @@ -322,7 +321,7 @@ var DrainCommittingTrans = polardbxv1reconcile.NewStepBinder("DrainCommittingTra var SendHeartBeat = polardbxv1reconcile.NewStepBinder("SendHeartBeat", func(rc *polardbxv1reconcile.Context, flow control.Flow) (reconcile.Result, error) { backup := rc.MustGetPolarDBXBackup() - cnManager, err := rc.GetPolarDBXGroupManagerByBackup(backup) + cnManager, err := rc.GetPolarDBXGroupManager() if err != nil { return flow.Error(err, "Get CN dataSource failed") } @@ -333,7 +332,7 @@ var SendHeartBeat = polardbxv1reconcile.NewStepBinder("SendHeartBeat", " `id` bigint(20) NOT NULL AUTO_INCREMENT BY GROUP,\n" + " `sname` varchar(10) DEFAULT NULL,\n" + " `gmt_modified` datetime(3) DEFAULT NULL,\n" + - " PRIMARY KEY (`id`)\n) ENGINE = InnoDB AUTO_INCREMENT = 1666172319 DEFAULT CHARSET = utf8mb4 DEFAULT COLLATE = utf8mb4_0900_ai_ci broadcast" + " PRIMARY KEY (`id`)\n) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 broadcast" err = cnManager.CreateTable("__cdc__", heartbeatTableDDL) if err != nil { return flow.Error(err, "Create heartbeat table failed: "+err.Error()) diff --git a/pkg/operator/v1/polardbx/steps/instance/common/status.go b/pkg/operator/v1/polardbx/steps/instance/common/status.go index 486d1dc..4b33988 100644 --- a/pkg/operator/v1/polardbx/steps/instance/common/status.go +++ b/pkg/operator/v1/polardbx/steps/instance/common/status.go @@ -203,9 +203,15 @@ var UpdateDisplayReplicas = polardbxv1reconcile.NewStepBinder("UpdateDisplayRepl if err != nil { return flow.Error(err, "Unable to get deployments of CDC.") } + totalCdcReplicas := snapshot.Topology.Nodes.CDC.Replicas.IntValue() + snapshot.Topology.Nodes.CDC.XReplicas + if snapshot.Topology.Nodes.CDC.Groups != nil { + for _, group := range snapshot.Topology.Nodes.CDC.Groups { + totalCdcReplicas += int(group.Replicas) + } + } statusRef.ReplicaStatus.CDC = &polardbxv1polardbx.ReplicasStatus{ Available: int32(countAvailableReplicasFromDeployments(cdcDeployments)), - Total: snapshot.Topology.Nodes.CDC.Replicas + snapshot.Topology.Nodes.CDC.XReplicas, + Total: int32(totalCdcReplicas), } } @@ -318,13 +324,14 @@ var InitializeParameterTemplate = polardbxv1reconcile.NewStepBinder("InitializeP paramMap := rc.GetPolarDBXParams() parameterTemplateName := rc.GetPolarDBXTemplateName() + parameterTemplateNameSpace := rc.GetPolarDBXTemplateNameSpace() templateParams := rc.GetPolarDBXTemplateParams() if parameterTemplateName == "" { return flow.Continue("No parameter template specified, use default.") } - pt, err := rc.GetPolarDBXParameterTemplate(parameterTemplateName) + pt, err := rc.GetPolarDBXParameterTemplate(parameterTemplateNameSpace, parameterTemplateName) if pt == nil { return flow.Error(err, "Unable to get parameter template.", "node", parameterTemplateName) } diff --git a/pkg/operator/v1/polardbx/steps/instance/finalizer/handler.go b/pkg/operator/v1/polardbx/steps/instance/finalizer/handler.go index 73204c0..25b8b63 100644 --- a/pkg/operator/v1/polardbx/steps/instance/finalizer/handler.go +++ b/pkg/operator/v1/polardbx/steps/instance/finalizer/handler.go @@ -24,6 +24,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/reconcile" @@ -63,10 +64,23 @@ func handleFinalizerForPods(rc *polardbxv1reconcile.Context, log logr.Logger, de if len(deletedOrFailedPods) == 0 { return nil } + polardbx := rc.MustGetPolarDBX() - mgr, err := rc.GetPolarDBXGMSManager() - if err != nil { - return err + pxcNotDeleting := polardbx.DeletionTimestamp.IsZero() + if polardbx.Spec.Readonly { + _, err := rc.GetPrimaryPolarDBX() + if apierrors.IsNotFound(err) { + pxcNotDeleting = false + } + } + + var mgr gms.Manager + if pxcNotDeleting { + var err error + mgr, err = rc.GetPolarDBXGMSManager() + if err != nil && pxcNotDeleting { + return err + } } canDeleteTime := v1.NewTime(time.Now().Add(-5 * time.Second)) @@ -81,8 +95,7 @@ func handleFinalizerForPods(rc *polardbxv1reconcile.Context, log logr.Logger, de if role == polardbxmeta.RoleCN { toDeleteInfo := make([]gms.ComputeNodeInfo, 0, len(deletedOrFailedPods)) for _, pod := range deletedOrFailedPods { - // Ignore unscheduled pods. - if !k8shelper.IsPodScheduled(&pod) { + if pod.Status.PodIP == "" { continue } toDeleteInfo = append(toDeleteInfo, gms.ComputeNodeInfo{ @@ -94,14 +107,16 @@ func handleFinalizerForPods(rc *polardbxv1reconcile.Context, log logr.Logger, de Extra: pod.Name, }) } - err := mgr.DeleteComputeNodes(toDeleteInfo...) - if err != nil { - return err + if pxcNotDeleting { + err := mgr.DeleteComputeNodes(toDeleteInfo...) + if err != nil { + return err + } } } else if role == polardbxmeta.RoleCDC { toDeleteInfo := make([]gms.CdcNodeInfo, 0, len(deletedOrFailedPods)) for _, pod := range deletedOrFailedPods { - if !k8shelper.IsPodScheduled(&pod) { + if pod.Status.PodIP == "" { continue } toDeleteInfo = append(toDeleteInfo, gms.CdcNodeInfo{ @@ -112,9 +127,11 @@ func handleFinalizerForPods(rc *polardbxv1reconcile.Context, log logr.Logger, de ).ContainerPort, }) } - err := mgr.DeleteCdcNodes(toDeleteInfo...) - if err != nil { - return err + if pxcNotDeleting { + err := mgr.DeleteCdcNodes(toDeleteInfo...) + if err != nil { + return err + } } } diff --git a/pkg/operator/v1/polardbx/steps/instance/gms/gms.go b/pkg/operator/v1/polardbx/steps/instance/gms/gms.go index 32d17c3..5a7e3bc 100644 --- a/pkg/operator/v1/polardbx/steps/instance/gms/gms.go +++ b/pkg/operator/v1/polardbx/steps/instance/gms/gms.go @@ -21,6 +21,7 @@ import ( "fmt" "github.com/alibaba/polardbx-operator/pkg/util/network" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" "strings" "time" @@ -245,7 +246,7 @@ func SyncDynamicConfigs(force bool) control.BindFunc { // Initialize template parameters if polardbx.Spec.ParameterTemplate.Name != "" { - parameter := rc.MustGetPolarDBXParameterTemplate(polardbx.Spec.ParameterTemplate.Name) + parameter := rc.MustGetPolarDBXParameterTemplate(polardbx.Spec.ParameterTemplate.Namespace, polardbx.Spec.ParameterTemplate.Name) params := parameter.Spec.NodeType.CN.ParamList for _, param := range params { // dynamic config priority higher than parameter template @@ -352,17 +353,30 @@ func transformIntoStorageInfos(rc *polardbxreconcile.Context, polardbx *polardbx }) // Add readonly pod cluster ip service, since CN will not fetch it - if readonly { + if readonly && polardbx.Status.ReadonlyStorageInfoHash == "" { nodeSets := xstore.Spec.Topology.NodeSets for index, nodeSet := range nodeSets { podName := xstoreconvention.NewPodName(xstore, &nodeSet, index) containerPort := int32(xstore.Status.PodPorts[podName].ToMap()[convention.PortAccess]) xPort := network.GetXPort(containerPort) + host := "" + clusterIpService, _ := rc.GetService(xstoreconvention.NewClusterIpServiceName(podName)) + if clusterIpService != nil { + host = clusterIpService.Name + } else { + pod, _ := rc.GetPodFromPodName(types.NamespacedName{Namespace: rc.Namespace(), Name: podName}) + if pod != nil { + host = pod.Status.PodIP + } + } + if host == "" { + continue + } storageInfos = append(storageInfos, gms.StorageNodeInfo{ Id: xstore.Name, MasterId: masterInstId, ClusterId: polardbx.Name, - Host: xstoreconvention.NewClusterIpServiceName(podName), + Host: host, Port: containerPort, XProtocolPort: xPort, User: xstoreconvention.SuperAccount, diff --git a/pkg/operator/v1/polardbx/steps/instance/object.go b/pkg/operator/v1/polardbx/steps/instance/object.go index 3c247dc..7696013 100644 --- a/pkg/operator/v1/polardbx/steps/instance/object.go +++ b/pkg/operator/v1/polardbx/steps/instance/object.go @@ -18,8 +18,6 @@ package instance import ( "fmt" - "k8s.io/apimachinery/pkg/types" - ctrl "sigs.k8s.io/controller-runtime" "sort" "strconv" "strings" @@ -27,6 +25,10 @@ import ( "sync/atomic" "time" + "github.com/alibaba/polardbx-operator/pkg/meta/core/gms/security" + "k8s.io/apimachinery/pkg/types" + ctrl "sigs.k8s.io/controller-runtime" + xstoremeta "github.com/alibaba/polardbx-operator/pkg/operator/v1/xstore/meta" appsv1 "k8s.io/api/apps/v1" @@ -699,6 +701,57 @@ var CreateOrReconcileColumnars = polardbxv1reconcile.NewStepBinder("CreateOrReco }, ) +var SyncReadonlyDnStorageInfo = polardbxv1reconcile.NewStepBinder("SyncReadonlyDnStorageInfo", + func(rc *polardbxv1reconcile.Context, flow control.Flow) (reconcile.Result, error) { + polardbx := rc.MustGetPolarDBX() + if !polardbx.Spec.Readonly { + return flow.Pass() + } + // check lastest create time of dn readonly pod + dnPods, err := rc.GetPods(polardbxmeta.RoleDN) + if err != nil { + return flow.RetryErr(err, "failed to get dn pods") + } + expectedStorageNodes := make([]gms.StorageNodeInfo, 0, len(dnPods)) + for _, pod := range dnPods { + if pod.DeletionTimestamp.IsZero() && pod.Status.PodIP != "" { + accessPort := k8shelper.MustGetPortFromContainer( + k8shelper.MustGetContainerFromPod(&pod, convention.ContainerEngine), + convention.PortAccess, + ).ContainerPort + polarxPort := k8shelper.MustGetPortFromContainer( + k8shelper.MustGetContainerFromPod(&pod, convention.ContainerEngine), + "polarx", + ).ContainerPort + expectedStorageNodes = append(expectedStorageNodes, gms.StorageNodeInfo{ + ClusterId: pod.Labels[polardbxmeta.LabelName], + Id: pod.Labels[xstoremeta.LabelName], + IsVip: gms.IsNotVip, + Host: pod.Status.PodIP, + Port: accessPort, + XProtocolPort: polarxPort, + }) + } + } + hash, err := security.HashObj(expectedStorageNodes) + if err != nil { + return flow.RetryErr(err, "failed to hash expectedStorageNodes") + } + if polardbx.Status.ReadonlyStorageInfoHash != hash { + gmsManager, err := rc.GetPolarDBXGMSManager() + if err != nil { + return flow.RetryErr(err, "failed to get gms manager") + } + err = gmsManager.UpdateRoStorageNodes(expectedStorageNodes...) + if err != nil { + return flow.RetryErr(err, "failed to update ro storage nodes") + } + polardbx.Status.ReadonlyStorageInfoHash = hash + } + return flow.Continue("SyncReadonlyDnStorageInfo success") + }, +) + func isXStoreReady(xstore *polardbxv1.XStore) bool { return xstore.Status.ObservedGeneration == xstore.Generation && xstore.Status.Phase == polardbxv1xstore.PhaseRunning @@ -875,7 +928,13 @@ var WaitUntilCDCPodsStable = polardbxv1reconcile.NewStepBinder("WaitUntilCDCPods cdcTemplate := polardbx.Status.SpecSnapshot.Topology.Nodes.CDC cdcReplicas := 0 if cdcTemplate != nil { - cdcReplicas = int(cdcTemplate.Replicas + cdcTemplate.XReplicas) + cdcReplicas = int(cdcTemplate.Replicas.IntValue() + cdcTemplate.XReplicas) + } + cdcNodes := polardbx.Spec.Topology.Nodes.CDC + if cdcNodes != nil { + for _, group := range cdcNodes.Groups { + cdcReplicas = cdcReplicas + int(group.Replicas) + } } if len(unFinalizedPodsSize) == cdcReplicas { return flow.Pass() @@ -952,8 +1011,56 @@ var TrySyncCnLabelToPodsDirectly = polardbxv1reconcile.NewStepBinder("TrySyncCnL if err := rc.Client().Update(rc.Context(), &pod); err != nil { return flow.RetryErr(err, "Failed to Update pod for polardbx/enableAuditLog") } + changedCount++ } } return flow.Continue(" CN Deployment labels are synced", "count", changedCount) }, ) + +// add or set label 'enableAuditLog' to all dn pods according to pxc's spec.config.dn +var TrySyncDnLabelToPodsDirectly = polardbxv1reconcile.NewStepBinder("TrySyncDnLabelToPodsDirectly", + func(rc *polardbxv1reconcile.Context, flow control.Flow) (reconcile.Result, error) { + changedCount := 0 + dnPods, err := rc.GetPods(polardbxmeta.RoleDN) + if err != nil { + return flow.Error(err, "Failed to Get Dn Pods") + } + for _, pod := range dnPods { + if pod.Labels[polardbxmeta.LabelAuditLog] != strconv.FormatBool(rc.MustGetPolarDBX().Spec.Config.DN.EnableAuditLog) { + pod.SetLabels(k8shelper.PatchLabels(pod.Labels, map[string]string{ + polardbxmeta.LabelAuditLog: strconv.FormatBool(rc.MustGetPolarDBX().Spec.Config.DN.EnableAuditLog), + })) + if err := rc.Client().Update(rc.Context(), &pod); err != nil { + return flow.RetryErr(err, "Failed to Update pod for polardbx/enableAuditLog") + } + changedCount++ + } + } + return flow.Continue(" DN labels are synced", "count", changedCount) + }, +) + +// GMS actually use DN's config, so this function adds/sets label 'enableAuditLog' to all gms pods according to pxc's spec.config.dn . +// This step is not merged into TrySyncDnLabelToPodsDirectly to make the logic clear. +var TrySyncGMSLabelToPodsDirectly = polardbxv1reconcile.NewStepBinder("TrySyncGMSLabelToPodsDirectly", + func(rc *polardbxv1reconcile.Context, flow control.Flow) (reconcile.Result, error) { + changedCount := 0 + gmsPods, err := rc.GetPods(polardbxmeta.RoleGMS) + if err != nil { + return flow.Error(err, "Failed to Get GMS Pods") + } + for _, pod := range gmsPods { + if pod.Labels[polardbxmeta.LabelAuditLog] != strconv.FormatBool(rc.MustGetPolarDBX().Spec.Config.DN.EnableAuditLog) { + pod.SetLabels(k8shelper.PatchLabels(pod.Labels, map[string]string{ + polardbxmeta.LabelAuditLog: strconv.FormatBool(rc.MustGetPolarDBX().Spec.Config.DN.EnableAuditLog), + })) + if err := rc.Client().Update(rc.Context(), &pod); err != nil { + return flow.RetryErr(err, "Failed to Update pod for polardbx/enableAuditLog") + } + changedCount++ + } + } + return flow.Continue(" GMS labels are synced", "count", changedCount) + }, +) diff --git a/pkg/operator/v1/polardbx/steps/instance/pitr/job.go b/pkg/operator/v1/polardbx/steps/instance/pitr/job.go index d94433d..ef4d5b6 100644 --- a/pkg/operator/v1/polardbx/steps/instance/pitr/job.go +++ b/pkg/operator/v1/polardbx/steps/instance/pitr/job.go @@ -96,7 +96,7 @@ func CreateTaskConfig(rc *polardbxv1reconcile.Context, pxcBackup *polarxv1.Polar xstoreConfigs := generateXStoreTaskConfigs(xstoreBackups.Items) var currentXStores polarxv1.XStoreList - err = rc.Client().List(rc.Context(), ¤tXStores, client.InNamespace(pxcBackup.Namespace), client.MatchingLabels{ + err = rc.Client().List(rc.Context(), ¤tXStores, client.InNamespace(namespace), client.MatchingLabels{ meta.LabelName: pxcBackup.Spec.Cluster.Name, }) if err != nil { @@ -142,6 +142,10 @@ func generateXStoreTaskConfigs(dnBackups []polarxv1.XStoreBackup) map[string]*pi if strings.HasSuffix(xstoreName, "gms") { globalConsistent = false } + podName := backup.Status.TargetPod + if podName == "" { + podName = backup.Spec.XStore.Name + "-cand-0" + } dnConfig := pitr.XStoreConfig{ GlobalConsistent: globalConsistent, XStoreName: xstoreName, @@ -149,8 +153,8 @@ func generateXStoreTaskConfigs(dnBackups []polarxv1.XStoreBackup) map[string]*pi BackupSetStartIndex: uint64(backup.Status.CommitIndex), HeartbeatSname: backupbinlog.Sname, Pods: map[string]*pitr.PodConfig{ - backup.Status.TargetPod: { - PodName: backup.Status.TargetPod, + podName: { + PodName: podName, }, }, } diff --git a/pkg/operator/v1/polardbx/steps/instance/pitr/pitr.go b/pkg/operator/v1/polardbx/steps/instance/pitr/pitr.go index 2581743..d61c1de 100644 --- a/pkg/operator/v1/polardbx/steps/instance/pitr/pitr.go +++ b/pkg/operator/v1/polardbx/steps/instance/pitr/pitr.go @@ -70,7 +70,7 @@ var PreparePitrBinlogs = polardbxv1reconcile.NewStepBinder("PreparePitrBinlogs", job := CreatePrepareBinlogJob(rc, taskConfig) err = rc.SetControllerRefAndCreate(job) if err != nil { - flow.RetryErr(err, "failed to job", "jobName", jobName) + return flow.RetryErr(err, "failed to job", "jobName", jobName) } } else { return flow.Error(err, "failed to job", "jobName", jobName) diff --git a/pkg/operator/v1/polardbx/steps/instance/rebalance/rebalance.go b/pkg/operator/v1/polardbx/steps/instance/rebalance/rebalance.go index 0622713..f5a6e89 100644 --- a/pkg/operator/v1/polardbx/steps/instance/rebalance/rebalance.go +++ b/pkg/operator/v1/polardbx/steps/instance/rebalance/rebalance.go @@ -419,7 +419,7 @@ var EnsureTrailingDNsAreDrainedOrBlock = polardbxv1reconcile.NewStepBinder( polardbx := rc.MustGetPolarDBX() cdcNodeSpec := polardbx.Status.SpecSnapshot.Topology.Nodes.CDC if featuregate.WaitDrainedNodeToBeOffline.Enabled() || - (cdcNodeSpec != nil && (cdcNodeSpec.Replicas+cdcNodeSpec.XReplicas) > 0) { + (cdcNodeSpec != nil && (cdcNodeSpec.Replicas.IntValue()+cdcNodeSpec.XReplicas) > 0) { offline, err := rebalanceTask.areScaleInDrainedNodesOffline(rc) if err != nil { return flow.Error(err, "Unable to determine offline status from GMS.") diff --git a/pkg/operator/v1/polardbx/steps/parameter/parameter.go b/pkg/operator/v1/polardbx/steps/parameter/parameter.go index c473649..f436270 100644 --- a/pkg/operator/v1/polardbx/steps/parameter/parameter.go +++ b/pkg/operator/v1/polardbx/steps/parameter/parameter.go @@ -331,7 +331,7 @@ var GetParametersRoleMap = polardbxv1reconcile.NewStepBinder("GetParametersRoleM // return flow.Continue("No parameter template specified, use default.") //} - pt, err := rc.GetPolarDBXParameterTemplate(parameterTemplateName) + pt, err := rc.GetPolarDBXParameterTemplate("", parameterTemplateName) if pt == nil { return flow.Error(err, "Unable to get parameter template.", "node", parameterTemplateName) } diff --git a/pkg/operator/v1/systemtask/steps/balance_resource.go b/pkg/operator/v1/systemtask/steps/balance_resource.go index ad35299..3e79c46 100644 --- a/pkg/operator/v1/systemtask/steps/balance_resource.go +++ b/pkg/operator/v1/systemtask/steps/balance_resource.go @@ -7,6 +7,7 @@ import ( "github.com/alibaba/polardbx-operator/api/v1/systemtask" "github.com/alibaba/polardbx-operator/api/v1/xstore" "github.com/alibaba/polardbx-operator/pkg/k8s/control" + k8shelper "github.com/alibaba/polardbx-operator/pkg/k8s/helper" "github.com/alibaba/polardbx-operator/pkg/operator/v1/systemtask/common" "github.com/alibaba/polardbx-operator/pkg/operator/v1/xstore/command" "github.com/alibaba/polardbx-operator/pkg/operator/v1/xstore/convention" @@ -364,7 +365,7 @@ func VisitNode(nodes map[string]*MyNode, minLeaderCount int, visitedNodes map[st } func changeLeader(rc *common.Context, leaderPod corev1.Pod, targetPod corev1.Pod, logger logr.Logger) { - cmd := command.NewCanonicalCommandBuilder().Consensus().SetLeader(targetPod.Name).Build() + cmd := command.NewCanonicalCommandBuilder().Consensus().SetLeader(k8shelper.GetPaxosAddr(&targetPod)).Build() rc.ExecuteCommandOn(&leaderPod, convention.ContainerEngine, cmd, control.ExecOptions{ Logger: logger, Timeout: 8 * time.Second, diff --git a/pkg/operator/v1/xstore/change/driver/context/context.go b/pkg/operator/v1/xstore/change/driver/context/context.go index b41035d..ecbe95a 100644 --- a/pkg/operator/v1/xstore/change/driver/context/context.go +++ b/pkg/operator/v1/xstore/change/driver/context/context.go @@ -126,7 +126,7 @@ func (ec *ExecutionContext) SetExtraPodFactory(extraPodFactory factory.ExtraPodF } func (ec *ExecutionContext) NeedRebuildPlan() bool { - return ec.Plan == nil || !plan.CheckPlan(ec.Plan, ec.StepIndex, ec.Running) + return ec.Plan == nil || !plan.CheckPlan(ec.Plan, ec.StepIndex, ec.Running, ec.Generation) } func (ec *ExecutionContext) Completed() bool { diff --git a/pkg/operator/v1/xstore/change/driver/exec/create_executor.go b/pkg/operator/v1/xstore/change/driver/exec/create_executor.go index 2ffe1ae..cb838ec 100644 --- a/pkg/operator/v1/xstore/change/driver/exec/create_executor.go +++ b/pkg/operator/v1/xstore/change/driver/exec/create_executor.go @@ -18,6 +18,7 @@ package exec import ( "bytes" + "fmt" "strconv" "time" @@ -81,7 +82,15 @@ func (exec *CreateExec) Execute(rc *xstorev1reconcile.Context, flow control.Flow } pod.Labels[xstoremeta.LabelGeneration] = strconv.FormatInt(step.TargetGeneration, 10) pod.Spec.NodeName = step.OriginHost - + val, ok := rc.IsPodSvcMeta(pod.Name) + if !ok { + return flow.Error(fmt.Errorf("unkown pod local info"), "unkown pod local info", "podName", pod.Name) + } + if ok { + if !val { + pod.Annotations[xstoremeta.AnnotationFlushLocal] = "true" + } + } if err := rc.SetControllerRefAndCreate(pod); err != nil { return flow.Error(err, "Failed to create pod", "pod", target) } diff --git a/pkg/operator/v1/xstore/change/driver/exec/update_executor.go b/pkg/operator/v1/xstore/change/driver/exec/update_executor.go index 0fe4b22..e88899d 100644 --- a/pkg/operator/v1/xstore/change/driver/exec/update_executor.go +++ b/pkg/operator/v1/xstore/change/driver/exec/update_executor.go @@ -20,14 +20,19 @@ import ( polardbxv1xstore "github.com/alibaba/polardbx-operator/api/v1/xstore" "github.com/alibaba/polardbx-operator/pkg/k8s/control" k8shelper "github.com/alibaba/polardbx-operator/pkg/k8s/helper" + "github.com/alibaba/polardbx-operator/pkg/operator/v1/polardbx/convention" + "github.com/alibaba/polardbx-operator/pkg/operator/v1/xstore/command" xstoreconvention "github.com/alibaba/polardbx-operator/pkg/operator/v1/xstore/convention" "github.com/alibaba/polardbx-operator/pkg/operator/v1/xstore/factory" xstoremeta "github.com/alibaba/polardbx-operator/pkg/operator/v1/xstore/meta" xstorev1reconcile "github.com/alibaba/polardbx-operator/pkg/operator/v1/xstore/reconcile" + xstoreinstance "github.com/alibaba/polardbx-operator/pkg/operator/v1/xstore/steps/instance" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" "strconv" + "strings" + "time" ) type UpdateExec struct { @@ -57,8 +62,47 @@ func (exec *UpdateExec) Execute(rc *xstorev1reconcile.Context, flow control.Flow return flow.Pass() } + //exec.baseExec.ec.Running + // Delete it first. if pod.DeletionTimestamp.IsZero() { + //change leader first + leaderPod, err := rc.TryGetXStoreLeaderPod() + if err != nil || leaderPod == nil { + return flow.RetryErr(err, "failed to get leader pod") + } + + leaderLocalInfo, err := xstoreinstance.ShowThis(rc, leaderPod, flow.Logger(), true) + if err != nil || !strings.EqualFold(leaderLocalInfo.Role, xstoremeta.RoleLeader) { + return flow.RetryAfter(time.Minute, "Failed to query local info on leader pod.", "pod", leaderPod.Name) + } + + globalInfoItems, err := xstoreinstance.ShowGlobalInfo(rc, leaderPod, flow.Logger()) + if err != nil { + return flow.RetryErr(err, "Failed to query global info on leader pod.", "pod", leaderPod.Name) + } + for _, item := range globalInfoItems { + commitIndex, err := strconv.ParseInt(leaderLocalInfo.CommitIndex, 10, 64) + if err != nil { + return flow.RetryErr(err, "failed to parse leaderLocalInfo.CommitIndex", "commitIndex", leaderLocalInfo.CommitIndex) + } + if commitIndex-item.AppliedIndex >= 1000 { + return flow.Retry("too large index lag, commitIndex - AppliedIndex >= 1000", "commitIndex", commitIndex, "appliedIndex", item.AppliedIndex, "addr", item.Addr) + } + } + + if leaderPod.Name == pod.Name { + cmd := command.NewCanonicalCommandBuilder().Consensus().SetLeader(rc.GetMetaFollowerAddr()).Build() + err := rc.ExecuteCommandOn(leaderPod, convention.ContainerEngine, cmd, control.ExecOptions{ + Logger: flow.Logger(), + Timeout: 8 * time.Second, + }) + if err != nil { + return flow.RetryErr(err, "failed to change leader") + } + return flow.Retry("retry until it is not leader", "podName", pod.Name) + } + if err := rc.Client().Delete( rc.Context(), pod, @@ -89,7 +133,10 @@ func (exec *UpdateExec) Execute(rc *xstorev1reconcile.Context, flow control.Flow } pod.Labels[xstoremeta.LabelGeneration] = strconv.FormatInt(step.TargetGeneration, 10) pod.Spec.NodeName = exec.ec.Volumes[pod.Name].Host - + val, ok := rc.IsPodSvcMeta(pod.Name) + if (ok && !val) || !ok { + pod.Annotations[xstoremeta.AnnotationFlushLocal] = "true" + } if err := rc.SetControllerRefAndCreate(pod); err != nil { return flow.Error(err, "Failed to create pod", "pod", target) } diff --git a/pkg/operator/v1/xstore/change/driver/model/node.go b/pkg/operator/v1/xstore/change/driver/model/node.go index 8304c54..6dd29d1 100644 --- a/pkg/operator/v1/xstore/change/driver/model/node.go +++ b/pkg/operator/v1/xstore/change/driver/model/node.go @@ -17,6 +17,7 @@ limitations under the License. package model import ( + k8shelper "github.com/alibaba/polardbx-operator/pkg/k8s/helper" _map "github.com/alibaba/polardbx-operator/pkg/util/map" "strings" @@ -57,11 +58,13 @@ type PaxosNodeStatus struct { Host string `json:"host,omitempty"` Volume string `json:"volume,omitempty"` XStoreRole string `json:"xStoreRole,omitempty"` + Ready bool `json:"status,omitempty"` } func (s *PaxosNodeStatus) FromPod(pod *corev1.Pod) error { s.Pod = pod.Name s.Role = strings.ToLower(pod.Labels[xstoremeta.LabelRole]) + s.Ready = k8shelper.IsPodReady(pod) var err error s.Generation, err = convention.GetGenerationLabelValue(pod) if err != nil { diff --git a/pkg/operator/v1/xstore/change/driver/plan/check.go b/pkg/operator/v1/xstore/change/driver/plan/check.go index 64d4fe1..c7f20fe 100644 --- a/pkg/operator/v1/xstore/change/driver/plan/check.go +++ b/pkg/operator/v1/xstore/change/driver/plan/check.go @@ -95,7 +95,7 @@ func matches(a, b map[string]model.PaxosNode) bool { } // CheckPlan checks if current running nodes sticks to the plan. -func CheckPlan(plan *Plan, curStep int, running map[string]model.PaxosNodeStatus) bool { +func CheckPlan(plan *Plan, curStep int, running map[string]model.PaxosNodeStatus, generation int64) bool { runningNodes := statusMapToNodeMap(running) expectedNodes := nodeSliceToMap(plan.Nodes) @@ -109,6 +109,9 @@ func CheckPlan(plan *Plan, curStep int, running map[string]model.PaxosNodeStatus // Exclude the current step target. if curStep < len(plan.Steps) { + if plan.Steps[curStep].TargetGeneration < generation { + return false + } delete(expectedNodes, plan.Steps[curStep].Target) delete(runningNodes, plan.Steps[curStep].Target) } diff --git a/pkg/operator/v1/xstore/change/driver/plan/plan.go b/pkg/operator/v1/xstore/change/driver/plan/plan.go index 0db917c..4ca114c 100644 --- a/pkg/operator/v1/xstore/change/driver/plan/plan.go +++ b/pkg/operator/v1/xstore/change/driver/plan/plan.go @@ -154,7 +154,7 @@ func (p *Plan) Finish() { sort.Slice(p.Steps, func(i, j int) bool { pi, pj := p.Steps[i].Priority(), p.Steps[j].Priority() if pi == pj { - return p.Steps[i].Target < p.Steps[j].Target + return i < j } return pi < pj }) diff --git a/pkg/operator/v1/xstore/change/driver/planner/planner.go b/pkg/operator/v1/xstore/change/driver/planner/planner.go index a33f1ec..8b76e7d 100644 --- a/pkg/operator/v1/xstore/change/driver/planner/planner.go +++ b/pkg/operator/v1/xstore/change/driver/planner/planner.go @@ -19,6 +19,7 @@ package planner import ( "errors" "fmt" + k8shelper "github.com/alibaba/polardbx-operator/pkg/k8s/helper" "strconv" "strings" @@ -151,6 +152,7 @@ func (p *Planner) buildRunningNodes() (map[string]model.PaxosNodeStatus, error) Host: pod.Spec.NodeName, Volume: podVolume(pod), XStoreRole: pod.Labels[xstoremeta.LabelRole], + Ready: k8shelper.IsPodReady(pod), } } @@ -247,6 +249,7 @@ func (p *Planner) build() (plan.Plan, error) { pl := plan.NewPlan(p.runningNodes) var leaderStep *plan.Step + readyPodSteps := make([]plan.Step, 0) // TODO(fix) volumes // Create, update or replace expected nodes. for _, expectNode := range p.expectedNodes { @@ -282,21 +285,7 @@ func (p *Planner) build() (plan.Plan, error) { stepType = plan.StepTypeReplace } - if runningNode.XStoreRole == xstoremeta.RoleLeader && leaderStep == nil { - leaderStep = &plan.Step{ - Type: stepType, - OriginGeneration: runningNode.Generation, - OriginHost: runningNode.Host, - TargetGeneration: expectNode.Generation, - Target: expectNode.Pod, - TargetRole: expectNode.Role, - NodeSet: expectNode.Set, - Index: expectNode.Index, - } - continue - } - - pl.AppendStep(plan.Step{ + step := plan.Step{ Type: stepType, OriginGeneration: runningNode.Generation, OriginHost: runningNode.Host, @@ -305,9 +294,26 @@ func (p *Planner) build() (plan.Plan, error) { TargetRole: expectNode.Role, NodeSet: expectNode.Set, Index: expectNode.Index, - }) + } + + if runningNode.XStoreRole == xstoremeta.RoleLeader && leaderStep == nil { + leaderStep = &step + continue + } + + if runningNode.Ready { + readyPodSteps = append(readyPodSteps, step) + continue + } + + pl.AppendStep(step) } } + + for _, readPodStep := range readyPodSteps { + pl.AppendStep(readPodStep) + } + if leaderStep != nil { pl.AppendStep(*leaderStep) } diff --git a/pkg/operator/v1/xstore/command/commands.go b/pkg/operator/v1/xstore/command/commands.go index 23e1552..fa764b1 100644 --- a/pkg/operator/v1/xstore/command/commands.go +++ b/pkg/operator/v1/xstore/command/commands.go @@ -182,6 +182,11 @@ func (b *commandConsensusBuilder) ChangeLearnerToFollower(node string) *CommandB return b.end() } +func (b *commandConsensusBuilder) ChangeFollowerToLearner(node string) *CommandBuilder { + b.args = append(b.args, "follower-to-learner", node) + return b.end() +} + func (b *commandConsensusBuilder) ChangeRole(pod, from, to string) *CommandBuilder { b.args = append(b.args, "change", "--node", pod, "--from-role", from, "--to-role", to) return b.end() diff --git a/pkg/operator/v1/xstore/controllers/xstore_controller.go b/pkg/operator/v1/xstore/controllers/xstore_controller.go index 370ce23..fff6791 100644 --- a/pkg/operator/v1/xstore/controllers/xstore_controller.go +++ b/pkg/operator/v1/xstore/controllers/xstore_controller.go @@ -18,7 +18,9 @@ package controllers import ( "context" + "errors" "github.com/alibaba/polardbx-operator/pkg/operator/hint" + polarxJson "github.com/alibaba/polardbx-operator/pkg/util/json" "time" "github.com/go-logr/logr" @@ -51,7 +53,12 @@ type XStoreReconciler struct { func (r *XStoreReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) { log := r.Logger.WithValues("namespace", request.Namespace, "xstore", request.Name) - + defer func() { + err := recover() + if err != nil { + log.Error(errors.New(polarxJson.Convert2JsonString(err)), "") + } + }() if hint.IsNamespacePaused(request.Namespace) { log.Info("Reconciling is paused, skip") return reconcile.Result{}, nil diff --git a/pkg/operator/v1/xstore/controllers/xstore_follower_controller.go b/pkg/operator/v1/xstore/controllers/xstore_follower_controller.go index afe59ee..32018de 100644 --- a/pkg/operator/v1/xstore/controllers/xstore_follower_controller.go +++ b/pkg/operator/v1/xstore/controllers/xstore_follower_controller.go @@ -97,7 +97,6 @@ func (r *XStoreFollowerReconciler) newReconcileTask(rc *xstorev1reconcile.Follow followersteps.TryCreateTmpPodIfRemote(task) followersteps.TryWaitForTmpPodScheduledIfRemote(task) followersteps.CheckIfTargetPodNotLeader(task) - followersteps.ClearAndMarkElectionWeight(task) followersteps.UpdatePhaseTemplate(xstore.FollowerPhaseCheck)(task) case xstore.FollowerPhaseCheck: control.When(!followersteps.IsNotLogger(xstoreFollower), followersteps.UpdatePhaseTemplate(xstore.FollowerPhaseBeforeRestore))(task) @@ -138,7 +137,6 @@ func (r *XStoreFollowerReconciler) newReconcileTask(rc *xstorev1reconcile.Follow followersteps.TryDeleteTmpPodIfRemote(task) followersteps.WaitForTargetPodReady(task) followersteps.EnableFromPodPurgeLog(task) - followersteps.RecoverElectionWeight(task) followersteps.TryCleanHostPathVolumeIfRemote(task) followersteps.UpdatePhaseTemplate(xstore.FollowerPhaseSuccess)(task) case xstore.FollowerPhaseLoggerRebuild: @@ -152,11 +150,10 @@ func (r *XStoreFollowerReconciler) newReconcileTask(rc *xstorev1reconcile.Follow followersteps.TryExchangeTargetPod(task) followersteps.TryDeleteTmpPodIfRemote(task) followersteps.WaitForTargetPodReady(task) - followersteps.RecoverElectionWeight(task) followersteps.TryCleanHostPathVolumeIfRemote(task) followersteps.UpdatePhaseTemplate(xstore.FollowerPhaseSuccess)(task) case xstore.FollowerPhaseDeleting: - followersteps.RecoverElectionWeight(task) + followersteps.EnableFromPodPurgeLog(task) followersteps.TryCleanHostPathVolumeIfRemote(task) followersteps.RemoveFinalizer(task) case xstore.FollowerPhaseSuccess: diff --git a/pkg/operator/v1/xstore/factory/configmap.go b/pkg/operator/v1/xstore/factory/configmap.go index 18ef5aa..cf34459 100644 --- a/pkg/operator/v1/xstore/factory/configmap.go +++ b/pkg/operator/v1/xstore/factory/configmap.go @@ -162,12 +162,13 @@ func syncParameterToConfigMap(rc *reconcile.Context, xstore *polardbxv1.XStore, cmRole := xstore.Labels[polardbxmeta.LabelRole] parameterTemplateName := rc.GetPolarDBXTemplateName() + parameterTemplateNameSpace := rc.GetPolarDBXTemplateNameSpace() if parameterTemplateName == "" { return overrideVal, nil } - pt, err := rc.GetPolarDBXParameterTemplate(parameterTemplateName) + pt, err := rc.GetPolarDBXParameterTemplate(parameterTemplateNameSpace, parameterTemplateName) if pt == nil { return "", err } diff --git a/pkg/operator/v1/xstore/meta/annotations.go b/pkg/operator/v1/xstore/meta/annotations.go index 26fc4d2..5448395 100644 --- a/pkg/operator/v1/xstore/meta/annotations.go +++ b/pkg/operator/v1/xstore/meta/annotations.go @@ -60,4 +60,5 @@ const ( const ( AnnotationAutoRebuild = "xstore/auto-rebuild" + AnnotationFlushLocal = "xstore/flushlocal" ) diff --git a/pkg/operator/v1/xstore/plugin/galaxy/reconcilers/galaxy_reconciler.go b/pkg/operator/v1/xstore/plugin/galaxy/reconcilers/galaxy_reconciler.go index 22142ad..8a2c534 100644 --- a/pkg/operator/v1/xstore/plugin/galaxy/reconcilers/galaxy_reconciler.go +++ b/pkg/operator/v1/xstore/plugin/galaxy/reconcilers/galaxy_reconciler.go @@ -303,6 +303,11 @@ func (r *GalaxyReconciler) newReconcileTask(rc *xstorev1reconcile.Context, xstor case polardbxv1xstore.PhaseUpgrading, polardbxv1xstore.PhaseRepairing: selfHeal := xstore.Status.Phase == polardbxv1xstore.PhaseRepairing instancesteps.PrepareHostPathVolumes(task) + control.Block( + instancesteps.ReconcileConsensusRoleLabels, + instancesteps.WaitUntilLeaderElected, + instancesteps.SyncPaxosMeta, + )(task) switch xstore.Status.Stage { case polardbxv1xstore.StageEmpty: ec, err := instancesteps.LoadExecutionContext(rc) @@ -350,6 +355,12 @@ func (r *GalaxyReconciler) newReconcileTask(rc *xstorev1reconcile.Context, xstor )(task) } case polardbxv1xstore.StageClean: + control.Block( + instancesteps.ReconcileConsensusRoleLabels, + instancesteps.WaitUntilLeaderElected, + instancesteps.SyncPaxosMeta, + )(task) + instancesteps.CleanFlushLocalAnnotation(task) instancesteps.DeleteExecutionContext(task) instancesteps.UpdatePhaseTemplate(polardbxv1xstore.PhaseRunning, true)(task) case polardbxv1xstore.StageUpdate: diff --git a/pkg/operator/v1/xstore/reconcile/backup_context.go b/pkg/operator/v1/xstore/reconcile/backup_context.go index da24484..860f074 100644 --- a/pkg/operator/v1/xstore/reconcile/backup_context.go +++ b/pkg/operator/v1/xstore/reconcile/backup_context.go @@ -502,14 +502,11 @@ func (rc *BackupContext) NewSecretFromXStore(secret *corev1.Secret) (*corev1.Sec } func (rc *BackupContext) GetXstoreGroupManagerByPod(pod *corev1.Pod) (group.GroupManager, error) { - podService, err := rc.xStoreContext.GetXStoreServiceForPod(pod.Name) - if err != nil { - return nil, err - } - host, port, err := k8shelper.GetClusterIpPortFromService(podService, convention.PortAccess) - if err != nil { - return nil, err - } + host := pod.Status.PodIP + port := k8shelper.MustGetPortFromContainer( + k8shelper.MustGetContainerFromPod(pod, convention.ContainerEngine), + convention.PortAccess, + ).ContainerPort secret, err := rc.GetSecret(pod.Labels[xstoremeta.LabelName]) if err != nil { return nil, err diff --git a/pkg/operator/v1/xstore/reconcile/context.go b/pkg/operator/v1/xstore/reconcile/context.go index 1492c0a..e86fa4c 100644 --- a/pkg/operator/v1/xstore/reconcile/context.go +++ b/pkg/operator/v1/xstore/reconcile/context.go @@ -85,6 +85,28 @@ type Context struct { polardbxParameter *polardbxv1.PolarDBXParameter polardbxParameterKey types.NamespacedName polardbxParameterStatus *polardbxv1.PolarDBXParameterStatus + metaFollowerAddr string + svcMetaMap map[string]bool +} + +func (rc *Context) SetSvcMetaMap(svcMetaMap map[string]bool) { + rc.svcMetaMap = svcMetaMap +} + +func (rc *Context) IsPodSvcMeta(pod string) (bool, bool) { + if rc.svcMetaMap != nil { + value, ok := rc.svcMetaMap[pod] + return value, ok + } + return false, false +} + +func (rc *Context) SetMetaFollowerAddr(addr string) { + rc.metaFollowerAddr = addr +} + +func (rc *Context) GetMetaFollowerAddr() string { + return rc.metaFollowerAddr } func (rc *Context) Debug() bool { @@ -143,6 +165,79 @@ func (rc *Context) CountCreatingLearners() (int, error) { return creatingCnt, nil } +func (rc *Context) GetReadonlyPods() ([]corev1.Pod, error) { + xstores, err := rc.GetReadonlyXStores() + if err != nil { + return nil, err + } + pods := make([]corev1.Pod, 0, len(xstores)) + for _, xstore := range xstores { + var podList corev1.PodList + err = rc.Client().List(rc.Context(), &podList, client.InNamespace(xstore.GetNamespace()), client.MatchingLabels{ + xstoremeta.LabelName: xstore.Name, + xstoremeta.LabelNodeRole: xstoremeta.RoleLearner, + }) + if err != nil { + return nil, err + } + for _, pod := range podList.Items { + pods = append(pods, pod) + } + } + return pods, nil +} + +func (rc *Context) GetReadonlyXStores() ([]polardbxv1.XStore, error) { + xstore := rc.MustGetXStore() + primaryXStoreName := xstore.Name + if xstore.Spec.Readonly { + primaryXStoreName = xstore.Spec.PrimaryXStore + } + var readonlyXstoreList polardbxv1.XStoreList + err := rc.Client().List( + rc.Context(), + &readonlyXstoreList, + client.MatchingLabels( + k8shelper.PatchLabels( + map[string]string{ + xstoremeta.LabelPrimaryName: primaryXStoreName, + }, + ), + ), + ) + if err != nil { + return nil, err + } + return readonlyXstoreList.Items, nil +} + +func (rc *Context) GetReadonlyPodServices() (map[string]corev1.Service, error) { + readonlyXStores, err := rc.GetReadonlyXStores() + if err != nil { + return nil, err + } + podServices := map[string]corev1.Service{} + services := make([]corev1.Service, 0) + for _, xstore := range readonlyXStores { + var svcs corev1.ServiceList + err := rc.Client().List(rc.Context(), &svcs, client.InNamespace(xstore.GetNamespace()), client.MatchingLabels{ + xstoremeta.LabelName: xstore.Name, + }) + if err != nil { + return nil, err + } + for _, item := range svcs.Items { + services = append(services, item) + } + } + for _, svc := range services { + if podName, ok := svc.Labels[xstoremeta.LabelPod]; ok { + podServices[podName] = svc + } + } + return podServices, nil +} + func (rc *Context) GetPrimaryXStore() (*polardbxv1.XStore, error) { xstore := rc.MustGetXStore() @@ -489,6 +584,32 @@ func (rc *Context) getXStorePods(xstore *polardbxv1.XStore) ([]corev1.Pod, error return pods, nil } +func (rc *Context) GetPodServices(xstore *polardbxv1.XStore) (map[string]corev1.Service, error) { + svcLabels := convention.ConstLabels(xstore) + var svcList corev1.ServiceList + err := rc.Client().List(rc.Context(), &svcList, + client.InNamespace(rc.Namespace()), + client.MatchingLabels(svcLabels)) + if err != nil { + return nil, err + } + podServices := make(map[string]corev1.Service) + for _, svc := range svcList.Items { + // Ignore not owned + if err := k8shelper.CheckControllerReference(&svc, xstore); err != nil { + continue + } + + pod, ok := svc.Labels[xstoremeta.LabelPod] + // Ignore without labels. + if !ok { + continue + } + podServices[pod] = svc + } + return podServices, nil +} + func (rc *Context) GetXStorePods() ([]corev1.Pod, error) { if rc.pods == nil { xstore := rc.MustGetXStore() @@ -504,15 +625,14 @@ func (rc *Context) GetXStorePods() ([]corev1.Pod, error) { } func (rc *Context) GetPrimaryXStorePods() ([]corev1.Pod, error) { - xstore, err := rc.GetPrimaryXStore() - if err != nil { - return nil, err + xstore := rc.MustGetXStore() + if xstore.Spec.Readonly { + xstore = rc.MustGetPrimaryXStore() } pods, err := rc.getXStorePods(xstore) if err != nil { return nil, err } - return pods, nil } @@ -530,38 +650,23 @@ func (rc *Context) GetXStoreServiceForPod(pod string) (*corev1.Service, error) { func (rc *Context) GetXStorePodServices() (map[string]corev1.Service, error) { if rc.podServices == nil { - svcLabels := convention.ConstLabels(rc.MustGetXStore()) - svcLabels = k8shelper.PatchLabels(svcLabels, map[string]string{ - xstoremeta.LabelServiceType: string(convention.ServiceTypeClusterIp), - }) - - var svcList corev1.ServiceList - err := rc.Client().List(rc.Context(), &svcList, - client.InNamespace(rc.Namespace()), - client.MatchingLabels(svcLabels)) + podServices, err := rc.GetPodServices(rc.MustGetXStore()) if err != nil { return nil, err } - - podServices := make(map[string]corev1.Service) - for _, svc := range svcList.Items { - // Ignore not owned - if err := k8shelper.CheckControllerReference(&svc, rc.MustGetXStore()); err != nil { - continue - } - - pod, ok := svc.Labels[xstoremeta.LabelPod] - // Ignore without labels. - if !ok { - continue - } - podServices[pod] = svc - } rc.podServices = podServices } return rc.podServices, nil } +func (rc *Context) GetPrimaryXStorePodServices() (map[string]corev1.Service, error) { + xstore := rc.MustGetXStore() + if xstore.Spec.Readonly { + xstore = rc.MustGetPrimaryXStore() + } + return rc.GetPodServices(xstore) +} + func (rc *Context) TryGetXStoreLeaderPod() (*corev1.Pod, error) { xstore := rc.MustGetXStore() readonly := xstore.Spec.Readonly @@ -813,9 +918,17 @@ func (rc *Context) GetPolarDBXTemplateName() (parameterTemplateName string) { return xStore.Spec.ParameterTemplate.Name } -func (rc *Context) GetPolarDBXParameterTemplate(name string) (*polardbxv1.PolarDBXParameterTemplate, error) { +func (rc *Context) GetPolarDBXTemplateNameSpace() (parameterTemplateNameSpace string) { + xStore := rc.MustGetXStore() + return xStore.Spec.ParameterTemplate.Namespace +} + +func (rc *Context) GetPolarDBXParameterTemplate(namespace, name string) (*polardbxv1.PolarDBXParameterTemplate, error) { + if namespace == "" { + namespace = rc.xstoreKey.Namespace + } tmKey := types.NamespacedName{ - Namespace: rc.xstoreKey.Namespace, + Namespace: namespace, Name: name, } if rc.polardbxParameterTemplate == nil { diff --git a/pkg/operator/v1/xstore/reconcile/follower_context.go b/pkg/operator/v1/xstore/reconcile/follower_context.go index 1f7ff3b..27323a7 100644 --- a/pkg/operator/v1/xstore/reconcile/follower_context.go +++ b/pkg/operator/v1/xstore/reconcile/follower_context.go @@ -203,6 +203,16 @@ func CreateTmpPod(podTemplate *corev1.Pod, nodeName string, label map[string]str pod.SetLabels(k8shelper.PatchLabels(pod.Labels, label, map[string]string{ xstoremeta.LabelOriginName: pod.Labels[xstoremeta.LabelName], })) + pod.SetAnnotations(k8shelper.PatchAnnotations(pod.Annotations, map[string]string{ + "runmode": "debug", + })) + for i := range pod.Spec.Containers { + if pod.Spec.Containers[i].Name == "engine" { + pod.Spec.Containers[i].Command = []string{"/bin/bash", "-c"} + pod.Spec.Containers[i].Args = []string{`sleep 36000000`} + break + } + } podAntiAffinity := pod.Spec.Affinity.PodAntiAffinity if podAntiAffinity != nil { if podAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution == nil { diff --git a/pkg/operator/v1/xstore/steps/follower/job.go b/pkg/operator/v1/xstore/steps/follower/job.go index 84e34e1..9f34087 100644 --- a/pkg/operator/v1/xstore/steps/follower/job.go +++ b/pkg/operator/v1/xstore/steps/follower/job.go @@ -40,7 +40,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "strconv" "strings" - "time" ) type JobContext struct { @@ -171,7 +170,7 @@ func JobArgFlushConsensusFunc(ctx JobContext) []string { learnerFlag = "--learner" } return []string{"-c", - "chown -R mysql:mysql /data/mysql && rm -fR /data/mysql/log/mysql_bin.* && /tools/xstore/current/venv/bin/python3 /tools/xstore/current/cli.py engine reset_meta --recover-index-filepath=" + backupBinlogInfoFilepath + " " + learnerFlag, + "chown -R mysql:mysql /data/mysql && rm -fR /data/mysql/log/mysql_bin.* && /tools/xstore/current/venv/bin/python3 /tools/xstore/current/cli.py engine reset_meta --learner --recover-index-filepath=" + backupBinlogInfoFilepath + " " + learnerFlag, } } @@ -189,16 +188,20 @@ func GetFileStreamDir(pod *corev1.Pod) string { return filepath.Join(FileStreamRootDir, GetFileStreamInstanceId(pod), FileStreamBackupFilename) } -func newJobName(task JobTask, targetPod *corev1.Pod) string { - hashStr := strconv.FormatUint(security.Hash(targetPod.Name), 16) +func newJobName(task JobTask, targetPod *corev1.Pod, xfName string) string { + hashStr := strconv.FormatUint(security.Hash(targetPod.Name+xfName), 16) suffix := "" if val, ok := targetPod.Labels[polarxmeta.LabelRole]; ok { - suffix = suffix + "-" + val + suffix = suffix + val } if val, ok := targetPod.Labels[polarxmeta.LabelDNIndex]; ok { - suffix += suffix + "-" + val + suffix = suffix + val } - return fmt.Sprintf("job-%s-%s-%d-%s%s", string(task), hashStr, time.Now().Unix(), targetPod.Labels[xstoremeta.LabelNodeSet], suffix) + jobName := fmt.Sprintf("job%s%s%s", string(task), hashStr, suffix) + if len(jobName) > 63 { + jobName = jobName[:62] + "0" + } + return jobName } func newJob(ctx JobContext) *batchv1.Job { @@ -341,7 +344,7 @@ var StartBackupJob = NewStepBinder("StartBackupJob", func(rc *xstorev1reconcile. if err != nil { return flow.RetryErr(err, "GetXStorePod Failed") } - jobName := newJobName(JobTaskBackup, fromPod) + jobName := newJobName(JobTaskBackup, fromPod, rc.MustGetXStoreFollower().GetName()) jobContext := JobContext{ jobName: jobName, jobTask: JobTaskBackup, @@ -407,7 +410,7 @@ func CreateJob(rc *xstorev1reconcile.FollowerContext, jobTask JobTask) (string, if err != nil { return "", err } - jobName := newJobName(jobTask, targetPod) + jobName := newJobName(jobTask, targetPod, rc.MustGetXStoreFollower().GetName()) jobContext := JobContext{ jobName: jobName, jobTask: jobTask, diff --git a/pkg/operator/v1/xstore/steps/follower/pod.go b/pkg/operator/v1/xstore/steps/follower/pod.go index c3de0d1..e1176c1 100644 --- a/pkg/operator/v1/xstore/steps/follower/pod.go +++ b/pkg/operator/v1/xstore/steps/follower/pod.go @@ -32,6 +32,7 @@ import ( "github.com/alibaba/polardbx-operator/pkg/util/json" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/reconcile" "strconv" @@ -208,7 +209,10 @@ var EnableFromPodPurgeLog = NewStepBinder("EnableFromPodPurgeLog", func(rc *xsto xstoreContext := rc.XStoreContext() fromPod, err := xstoreContext.GetXStorePod(rc.MustGetXStoreFollower().Spec.FromPodName) if err != nil { - return flow.RetryErr(err, "DisableFromPodPurgeLog Failed") + if apierrors.IsNotFound(err) { + return flow.Pass() + } + return flow.RetryErr(err, "EnableFromPodPurgeLog Failed") } annotation := fromPod.Annotations delete(annotation, xstoremeta.AnnotationRebuildFromPod) @@ -294,51 +298,6 @@ var LoadLeaderLogPosition = NewStepBinder("LoadLeaderLogPosition", func(rc *xsto return flow.Continue("LoadLeaderLogPosition Success.") }) -var ClearAndMarkElectionWeight = NewStepBinder("ClearAndMarkElectionWeight", func(rc *xstorev1reconcile.FollowerContext, flow control.Flow) (reconcile.Result, error) { - xstoreContext := rc.XStoreContext() - xStoreFollower := rc.MustGetXStoreFollower() - if xStoreFollower.Spec.Role == xstorev1.FollowerRoleLearner { - return flow.Pass() - } - targetPodName := xStoreFollower.Spec.TargetPodName - leaderPod, err := getLeaderPod(xstoreContext, flow.Logger()) - if err != nil { - return flow.RetryErr(err, "") - } - oldWeights, err := xstoreinstance.SetPodElectionWeight(xstoreContext, leaderPod, flow.Logger(), 0, []string{targetPodName}) - if err != nil { - flow.Logger().Error(err, "ClearAndMarkElectionWeight skip") - return flow.Continue("ClearAndMarkElectionWeight Skip.") - } - xStoreFollower.Status.ElectionWeight = oldWeights[0] - rc.MarkChanged() - return flow.Continue("ClearAndMarkElectionWeight Success.") -}) - -var RecoverElectionWeight = NewStepBinder("RecoverElectionWeight", func(rc *xstorev1reconcile.FollowerContext, flow control.Flow) (reconcile.Result, error) { - xstoreContext := rc.XStoreContext() - xStoreFollower := rc.MustGetXStoreFollower() - if xStoreFollower.Status.ElectionWeight == 0 { - //Election weight has not been changed - return flow.Pass() - } - if xStoreFollower.Spec.Role == xstorev1.FollowerRoleLearner { - return flow.Pass() - } - targetPodName := xStoreFollower.Spec.TargetPodName - leaderPod, err := getLeaderPod(xstoreContext, flow.Logger()) - if err != nil { - return flow.RetryErr(err, "") - } - _, err = xstoreinstance.SetPodElectionWeight(xstoreContext, leaderPod, flow.Logger(), xStoreFollower.Status.ElectionWeight, []string{targetPodName}) - if err != nil { - return flow.RetryErr(err, "") - } - xStoreFollower.Status.ElectionWeight = 0 - rc.MarkChanged() - return flow.Continue("RecoverElectionWeight Success.") -}) - func getLeaderPod(xStoreContext *xstorev1reconcile.Context, logger logr.Logger) (*corev1.Pod, error) { pods, err := xStoreContext.GetXStorePods() if err != nil { diff --git a/pkg/operator/v1/xstore/steps/instance/common.go b/pkg/operator/v1/xstore/steps/instance/common.go index 3fd6959..1c4a2b7 100644 --- a/pkg/operator/v1/xstore/steps/instance/common.go +++ b/pkg/operator/v1/xstore/steps/instance/common.go @@ -348,13 +348,14 @@ var InitializeParameterTemplate = xstorev1reconcile.NewStepBinder("InitializePar func(rc *xstorev1reconcile.Context, flow control.Flow) (reconcile.Result, error) { paramMap := rc.GetPolarDBXParams() parameterTemplateName := rc.GetPolarDBXTemplateName() + parameterTemplateNameSpace := rc.GetPolarDBXTemplateNameSpace() templateParams := rc.GetPolarDBXTemplateParams() if parameterTemplateName == "" { return flow.Continue("No parameter template specified, use default.") } - pt, err := rc.GetPolarDBXParameterTemplate(parameterTemplateName) + pt, err := rc.GetPolarDBXParameterTemplate(parameterTemplateNameSpace, parameterTemplateName) if pt == nil { return flow.Error(err, "Unable to get parameter template.", "node", parameterTemplateName) } @@ -414,7 +415,7 @@ var GetParametersRoleMap = xstorev1reconcile.NewStepBinder("GetParametersRoleMap templateParams := rc.GetPolarDBXTemplateParams() xstore := rc.MustGetXStore() - pt, err := rc.GetPolarDBXParameterTemplate(xstore.Spec.ParameterTemplate.Name) + pt, err := rc.GetPolarDBXParameterTemplate(xstore.Spec.ParameterTemplate.Namespace, xstore.Spec.ParameterTemplate.Name) if pt == nil { return flow.Error(err, "Unable to get parameter template.") } diff --git a/pkg/operator/v1/xstore/steps/instance/consensus.go b/pkg/operator/v1/xstore/steps/instance/consensus.go index c99049d..4e32b87 100644 --- a/pkg/operator/v1/xstore/steps/instance/consensus.go +++ b/pkg/operator/v1/xstore/steps/instance/consensus.go @@ -18,9 +18,13 @@ package instance import ( "bytes" + "encoding/json" "fmt" polarxv1 "github.com/alibaba/polardbx-operator/api/v1" + "github.com/alibaba/polardbx-operator/api/v1/common" + "github.com/alibaba/polardbx-operator/pkg/featuregate" "github.com/alibaba/polardbx-operator/pkg/operator/v1/xstore/plugin/common/channel" + "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "strconv" @@ -47,6 +51,76 @@ const ( ReplicationDelaySeconds float64 = 1800 //half an hour ) +type ConsensusGlobalInfoItem struct { + ServerId int64 `json:"serverId,omitempty"` + Addr string `json:"addr,omitempty"` + Role string `json:"role,omitempty"` + MatchIndex int64 `json:"matchIndex,omitempty"` + NextIndex int64 `json:"nextIndex,omitempty"` + AppliedIndex int64 `json:"appliedIndex,omitempty"` + ElectionWeight int64 `json:"electionWeight,omitempty"` + ForceSync bool `json:"forceSync,omitempty"` + LearnerSource int64 `json:"learnerSource,omitempty"` + IsLogger *bool `json:"isLogger,omitempty"` + Local bool `json:"local,omitempty"` + Pod string `json:"pod,omitempty"` +} + +func ShowGlobalInfo(rc *xstorev1reconcile.Context, pod *corev1.Pod, logger logr.Logger) ([]ConsensusGlobalInfoItem, error) { + cmd := xstoreexec.NewCanonicalCommandBuilder().Consensus().List(true).Build() + stdout := &bytes.Buffer{} + err := rc.ExecuteCommandOn(pod, "engine", cmd, control.ExecOptions{ + Logger: logger, + Stdout: stdout, + Timeout: 10 * time.Second, + }) + if err != nil { + return nil, err + } + commandResult := stdout.String() + logger.Info(fmt.Sprintf("show global info result = %s", commandResult)) + parsedResult, err := xstoreexec.ParseCommandResultGenerally(commandResult) + if err != nil { + return nil, err + } + if len(parsedResult) == 0 { + return nil, fmt.Errorf("failed to get global info") + } + result := make([]ConsensusGlobalInfoItem, 0, len(parsedResult)) + for _, oneParsedResult := range parsedResult { + item := ConsensusGlobalInfoItem{} + item.ServerId, err = strconv.ParseInt(strings.TrimSpace(oneParsedResult["server_id"].(string)), 10, 64) + if err != nil { + return nil, errors.Wrap(err, "failed to parse server_id") + } + item.Addr = strings.TrimSpace(oneParsedResult["addr"].(string)) + item.Role = strings.TrimSpace(oneParsedResult["role"].(string)) + item.MatchIndex, err = strconv.ParseInt(strings.TrimSpace(oneParsedResult["match_index"].(string)), 10, 64) + if err != nil { + return nil, errors.Wrap(err, "failed to parse match_index") + } + item.NextIndex, err = strconv.ParseInt(strings.TrimSpace(oneParsedResult["next_index"].(string)), 10, 64) + if err != nil { + return nil, errors.Wrap(err, "failed to parse next_index") + } + item.AppliedIndex, err = strconv.ParseInt(strings.TrimSpace(oneParsedResult["applied_index"].(string)), 10, 64) + if err != nil { + return nil, errors.Wrap(err, "failed to parse applied_index") + } + item.ElectionWeight, err = strconv.ParseInt(strings.TrimSpace(oneParsedResult["election_weight"].(string)), 10, 64) + if err != nil { + return nil, errors.Wrap(err, "failed to parse election_weight") + } + item.ForceSync = "Yes" == strings.TrimSpace(oneParsedResult["force_sync"].(string)) + item.LearnerSource, err = strconv.ParseInt(strings.TrimSpace(oneParsedResult["learner_source"].(string)), 10, 64) + if err != nil { + return nil, errors.Wrap(err, "failed to parse learner_source") + } + result = append(result, item) + } + return result, nil +} + type ShowSlaveStatusResult struct { RelayLogFile string RelayLogPos int64 @@ -257,15 +331,13 @@ func TryDetectLeaderChange(rc *xstorev1reconcile.Context, pods []corev1.Pod, log // Detect current leader, first let's see if leader isn't changed. if previousLeader != "" { - role, leader, err := ReportRoleAndCurrentLeader(rc, previousLeaderPod, logger) + role, _, err := ReportRoleAndCurrentLeader(rc, previousLeaderPod, logger) podsVisited[previousLeader] = struct{}{} if err != nil { logger.Error(err, "Unable to report role and current leader on previous leader.", "pod", previousLeader) } else { if role == xstoremeta.RoleLeader { return previousLeader, false - } else if leader != "" { - return leader, true } } } @@ -290,21 +362,12 @@ func TryDetectLeaderChange(rc *xstorev1reconcile.Context, pods []corev1.Pod, log continue } - role, leader, err := ReportRoleAndCurrentLeader(rc, pod, logger) + role, _, err := ReportRoleAndCurrentLeader(rc, pod, logger) if err != nil { logger.Error(err, "Unable to report role and current leader on pod.", "pod", pod.Name) } else { if role == xstoremeta.RoleLeader { return pod.Name, pod.Name != previousLeader - } else if leader != "" { - // Do not trust followers, as they can cache the status. Just make sure again. - if _, visited := podsVisited[leader]; !visited { - role, _, err := ReportRoleAndCurrentLeader(rc, podMap[leader], logger) - if err == nil && role == xstoremeta.RoleLeader { - return leader, true - } - podsVisited[leader] = struct{}{} - } } } @@ -411,31 +474,12 @@ var AddLearnerNodesToClusterOnLeader = xstorev1reconcile.NewStepBinder("AddLearn if leaderPod == nil { return flow.RetryAfter(10*time.Second, "Leader not found, keep waiting...") } - sharedCm, err := rc.GetXStoreConfigMap(convention.ConfigMapTypeShared) - if err != nil { - return flow.Error(err, "Unable to get shared config map.") - } - - sharedChannel, err := commonsteps.ParseChannelFromConfigMap(sharedCm) - if err != nil { - return flow.Error(err, "Unable to parse shared channel from config map.") - } - nodeMap := map[string]channel.Node{} - for _, node := range sharedChannel.Nodes { - nodeMap[node.Pod] = node - } for _, learnerNode := range learnerNodes { - node, ok := nodeMap[learnerNode.Pod] - if !ok { - return flow.RetryErr(fmt.Errorf("%s", "failed to get node in the shared channel"), "PodName", learnerNode.Pod) - } - cmd := xstoreexec.NewCanonicalCommandBuilder().Consensus().AddLearner(fmt.Sprintf("%s:%d", node.Host, node.Port)).Build() - + cmd := xstoreexec.NewCanonicalCommandBuilder().Consensus().AddLearner(fmt.Sprintf("%s:%d", learnerNode.Host, learnerNode.Port)).Build() err := rc.ExecuteCommandOn(leaderPod, convention.ContainerEngine, cmd, control.ExecOptions{ Logger: flow.Logger(), Timeout: 2 * time.Second, }) - if err != nil { return flow.RetryErr(err, "Unable to add learner node.", "pod", learnerNode.Pod, "leader", leaderPod.Name) } @@ -451,6 +495,11 @@ func newXStoreFollowerName(xStoreName string) string { var RestoreToLearner = xstorev1reconcile.NewStepBinder("RestoreToLearner", func(rc *xstorev1reconcile.Context, flow control.Flow) (reconcile.Result, error) { + if featuregate.EnableLabMode.Enabled() { + if rc.MustGetXStore().Spec.Engine != "xcluster" { + return flow.Pass() + } + } //check xStore follower task exists xfName := newXStoreFollowerName(rc.Name()) objKey := types.NamespacedName{ @@ -626,3 +675,257 @@ var EnableElection = xstorev1reconcile.NewStepBinder("EnableElection", return flow.Continue("Enable Election Success.") }, ) + +var CleanFlushLocalAnnotation = xstorev1reconcile.NewStepBinder("CleanFlushLocalAnnotation", + func(rc *xstorev1reconcile.Context, flow control.Flow) (reconcile.Result, error) { + pods, err := rc.GetXStorePods() + if err != nil { + return flow.RetryErr(err, "failed to get xstore pods") + } + for _, pod := range pods { + podAnnotations := k8shelper.PatchAnnotations(pod.Annotations, map[string]string{ + xstoremeta.AnnotationFlushLocal: "false", + }) + pod.SetAnnotations(podAnnotations) + err := rc.Client().Update(rc.Context(), &pod) + if err != nil { + return flow.RetryErr(err, "failed to update pod annotation") + } + } + return flow.Continue("CleanFlushLocalAnnotation Success.") + }, +) + +var SyncPaxosMeta = xstorev1reconcile.NewStepBinder("SyncPaxosMeta", + func(rc *xstorev1reconcile.Context, flow control.Flow) (reconcile.Result, error) { + leaderPod, err := rc.TryGetXStoreLeaderPod() + if err != nil || leaderPod == nil { + return flow.RetryErr(err, "Failed to get xstore leader pod") + } + globalInfo, err := ShowGlobalInfo(rc, leaderPod, flow.Logger()) + if err != nil { + return flow.RetryErr(err, "failed to show global info") + } + globalInfoMap := map[string]*ConsensusGlobalInfoItem{} + for i, oneGlobalInfo := range globalInfo { + globalInfoMap[oneGlobalInfo.Addr] = &globalInfo[i] + } + globalInfoItems, svcMetaMap, err := GenerateExpectedGlobalInfo(rc) + if err != nil { + return flow.RetryErr(err, "failed to generate expected global info") + } + if bytes, err := json.Marshal(globalInfoItems); err == nil { + flow.Logger().Info(fmt.Sprintf("globalInfoItems = %s", string(bytes))) + } + for _, item := range globalInfoItems { + svcMetaMap[item.Pod] = !item.Local + } + rc.SetSvcMetaMap(svcMetaMap) + + var leaderMatchIndex int64 = -1 + for _, globalInfoItem := range globalInfo { + if strings.EqualFold(globalInfoItem.Role, string(polardbxv1xstore.RoleLeader)) { + leaderMatchIndex = globalInfoItem.MatchIndex + break + } + } + if leaderMatchIndex == -1 { + return flow.Retry("failed to find match index of leader") + } + + var retry bool + accessMap := map[string]bool{} + for _, globalInfoItem := range globalInfoItems { + accessMap[globalInfoItem.Addr] = true + if actualItem, ok := globalInfoMap[globalInfoItem.Addr]; ok { + + if strings.EqualFold(actualItem.Role, string(polardbxv1xstore.RoleFollower)) && !(globalInfoItem.IsLogger != nil && *globalInfoItem.IsLogger) { + if rc.GetMetaFollowerAddr() == "" { + rc.SetMetaFollowerAddr(globalInfoItem.Addr) + } + } + + if strings.EqualFold(actualItem.Role, string(polardbxv1xstore.RoleLearner)) { + if leaderMatchIndex-actualItem.AppliedIndex > 2000 || actualItem.AppliedIndex == 0 { + retry = true + flow.Logger().Info(fmt.Sprintf("addr = %s , leaderMatchIndex-actualItem.AppliedIndex = %d", actualItem.Addr, leaderMatchIndex-actualItem.AppliedIndex)) + continue + } + if strings.EqualFold(globalInfoItem.Role, string(polardbxv1xstore.RoleFollower)) { + cmd := xstoreexec.NewCanonicalCommandBuilder().Consensus().ChangeLearnerToFollower(actualItem.Addr).Build() + err := rc.ExecuteCommandOn(leaderPod, "engine", cmd, control.ExecOptions{ + Logger: flow.Logger(), + }) + if err != nil { + return flow.RetryErr(err, fmt.Sprintf("failed to change learner to follower addr: %s", actualItem.Addr)) + } + if globalInfoItem.IsLogger != nil && *globalInfoItem.IsLogger { + // change weight to 1 + _, err := SetPodElectionWeight(rc, leaderPod, flow.Logger(), 1, []string{globalInfoItem.Addr}) + if err != nil { + return flow.RetryErr(err, fmt.Sprintf("failed to set weight of %s to 1", globalInfoItem.Addr)) + } + } + } + } + } else { + cmd := xstoreexec.NewCanonicalCommandBuilder().Consensus().AddLearner(globalInfoItem.Addr).Build() + err := rc.ExecuteCommandOn(leaderPod, "engine", cmd, control.ExecOptions{ + Logger: flow.Logger(), + }) + if err != nil { + return flow.RetryErr(err, fmt.Sprintf("failed to add learner addr: %s", actualItem.Addr)) + } + retry = true + } + } + for _, globalInfoItem := range globalInfo { + if !accessMap[globalInfoItem.Addr] { + serverId := globalInfoItem.Addr + host := strings.Split(globalInfoItem.Addr, ":")[0] + if _, err := strconv.ParseInt(strings.Split(host, ".")[0], 10, 64); err != nil { + serverId = strconv.FormatInt(globalInfoItem.ServerId, 10) + } + if strings.EqualFold(globalInfoItem.Role, string(polardbxv1xstore.RoleFollower)) { + cmd := xstoreexec.NewCanonicalCommandBuilder().Consensus().ChangeFollowerToLearner(serverId).Build() + err := rc.ExecuteCommandOn(leaderPod, "engine", cmd, control.ExecOptions{ + Logger: flow.Logger(), + }) + if err != nil { + return flow.RetryErr(err, fmt.Sprintf("failed to change follower to learner: %s", globalInfoItem.Addr)) + } + globalInfoItem.Role = string(polardbxv1xstore.RoleLearner) + } + if strings.EqualFold(globalInfoItem.Role, string(polardbxv1xstore.RoleLearner)) { + cmd := xstoreexec.NewCanonicalCommandBuilder().Consensus().DropLearner(serverId).Build() + err := rc.ExecuteCommandOn(leaderPod, "engine", cmd, control.ExecOptions{ + Logger: flow.Logger(), + }) + if err != nil { + return flow.RetryErr(err, fmt.Sprintf("failed to drop learner: %s", globalInfoItem.Addr)) + } + } + } + } + + if retry { + return flow.Retry("to retry") + } + + return flow.Continue("SyncPaxosMeta Success.") + }, +) + +func GenerateExpectedGlobalInfo(rc *xstorev1reconcile.Context) ([]ConsensusGlobalInfoItem, map[string]bool, error) { + pods, err := rc.GetPrimaryXStorePods() + if err != nil { + return nil, nil, errors.Wrap(err, "failed to get xstore podsĀ¬") + } + readOnlyPods, err := rc.GetReadonlyPods() + if err != nil { + return nil, nil, errors.Wrap(err, "failed to get readonly pods") + } + if len(readOnlyPods) > 0 { + pods = append(pods, readOnlyPods...) + } + podMap := make(map[string]corev1.Pod, 0) + for _, pod := range pods { + podMap[pod.Name] = pod + } + + podServices, err := rc.GetPrimaryXStorePodServices() + if err != nil { + return nil, nil, errors.Wrap(err, "failed to get xstore pod") + } + readonlyPodServices, err := rc.GetReadonlyPodServices() + if err != nil { + return nil, nil, errors.Wrap(err, "failed to get readonly pod services") + } + if len(readonlyPodServices) > 0 { + for k, v := range readonlyPodServices { + podServices[k] = v + } + } + carePodService := featuregate.EnableXStoreWithPodService.Enabled() + xstore := rc.MustGetXStore() + if xstore.Annotations[common.AnnotationOperatorCreateVersion] == "" { + carePodService = true + } + if xstore.Spec.Readonly { + primaryXStore := rc.MustGetPrimaryXStore() + if primaryXStore.Annotations[common.AnnotationOperatorCreateVersion] == "" { + carePodService = true + } + } + globalInfo := make([]ConsensusGlobalInfoItem, 0) + markMap := map[string]bool{} + svcMetaMap := map[string]bool{} + if carePodService { + for _, podService := range podServices { + podName := podService.Labels[xstoremeta.LabelPod] + svcMetaMap[podName] = true + pod, ok := podMap[podName] + if !ok { + return nil, nil, fmt.Errorf("failed to get pod by pod name %s podService %s", podName, podService.Name) + } + nodeRole := pod.Labels[xstoremeta.LabelNodeRole] + role := polardbxv1xstore.RoleFollower + if nodeRole == xstoremeta.RoleLearner { + role = polardbxv1xstore.RoleLearner + } + isLogger := xstoremeta.IsPodRoleVoter(&pod) + host := podService.Spec.ClusterIP + var addr string + if strings.EqualFold(host, "None") { + host = podService.Name + paxosPort := k8shelper.MustGetPortFromContainer( + k8shelper.MustGetContainerFromPod(&pod, convention.ContainerEngine), + "paxos", + ).ContainerPort + addr = fmt.Sprintf("%s:%d", host, paxosPort) + } else { + for _, svcPort := range podService.Spec.Ports { + if svcPort.Name == "paxos" { + addr = fmt.Sprintf("%s:%d", host, svcPort.Port) + break + } + } + } + if addr != "" { + globalInfo = append(globalInfo, ConsensusGlobalInfoItem{ + Addr: addr, + Role: string(role), + IsLogger: &isLogger, + Pod: podName, + }) + markMap[podName] = true + } + } + } + for podName, pod := range podMap { + if !markMap[podName] { + nodeRole := pod.Labels[xstoremeta.LabelNodeRole] + role := polardbxv1xstore.RoleFollower + if nodeRole == xstoremeta.RoleLearner { + role = polardbxv1xstore.RoleLearner + } + if pod.Status.PodIP != "" { + paxosPort := k8shelper.MustGetPortFromContainer( + k8shelper.MustGetContainerFromPod(&pod, convention.ContainerEngine), + "paxos", + ).ContainerPort + addr := fmt.Sprintf("%s:%d", pod.Status.PodIP, paxosPort) + isLogger := xstoremeta.IsPodRoleVoter(&pod) + globalInfo = append(globalInfo, ConsensusGlobalInfoItem{ + Addr: addr, + Role: string(role), + IsLogger: &isLogger, + Local: true, + Pod: pod.Name, + }) + markMap[podName] = true + } + } + } + return globalInfo, svcMetaMap, nil +} diff --git a/pkg/operator/v1/xstore/steps/instance/recoverjob.go b/pkg/operator/v1/xstore/steps/instance/recoverjob.go index b43c2d5..c5dc89e 100644 --- a/pkg/operator/v1/xstore/steps/instance/recoverjob.go +++ b/pkg/operator/v1/xstore/steps/instance/recoverjob.go @@ -40,7 +40,7 @@ func newRecoverDataJob(xstore *xstorev1.XStore, targetPod *corev1.Pod, secret st } podSpec.Containers[0].Name = "recoverjob" - podSpec.Containers[0].Command = command.NewCanonicalCommandBuilder().Recover().StartRecover("/restore/restore", targetPod.Name, secret).Build() + podSpec.Containers[0].Command = command.NewCanonicalCommandBuilder().Recover().StartRecover("/restore/restore", targetPod.Status.PodIP, secret).Build() podSpec.Containers[0].Resources.Limits = nil podSpec.Containers[0].Resources.Requests = nil podSpec.Containers[0].Ports = nil diff --git a/pkg/operator/v1/xstore/steps/instance/support_legacy.go b/pkg/operator/v1/xstore/steps/instance/support_legacy.go index 72b2fe6..6e0e046 100644 --- a/pkg/operator/v1/xstore/steps/instance/support_legacy.go +++ b/pkg/operator/v1/xstore/steps/instance/support_legacy.go @@ -103,7 +103,7 @@ func GetLeaderPod(rc *xstorev1reconcile.Context, logger logr.Logger, force bool) if leaderPod == nil && force { var maxAppliedIndex int64 = -1 for _, pod := range pods { - if pod.Labels[xstoremeta.LabelNodeSet] == "log" { + if xstoremeta.IsPodRoleVoter(&pod) { continue } localInfo, err := ShowThis(rc, &pod, logger, true) diff --git a/pkg/pitr/restore_binlog_test.go b/pkg/pitr/restore_binlog_test.go index 58691e8..93b9eb6 100644 --- a/pkg/pitr/restore_binlog_test.go +++ b/pkg/pitr/restore_binlog_test.go @@ -89,3 +89,21 @@ func TestTimeZone(t *testing.T) { fmt.Println(time.Time{}.Unix()) fmt.Println(err) } + +func TestMinioAliyunTest(t *testing.T) { + config.ConfigFilepath = "/Users/wkf/hpfs/config.yaml" + config.InitConfig() + _, params, auth, fileServiceName, _ := hpfs.GetFileServiceParam("default", "s3") + fileService, _ := remote.GetFileService(fileServiceName) + resultFiles := make([]string, 0) + resultFilesPtr := &resultFiles + ctx := context.WithValue(context.Background(), common.AffectedFiles, resultFilesPtr) + //xstoreBinlogDir := config.GetXStorePodBinlogStorageDirectory("default", "", request.GetPxcUid(), request.GetXStoreName(), request.GetXStoreUid(), request.GetPodName()) + params["deadline"] = strconv.FormatInt(time.Now().Unix(), 10) + ft, err := fileService.ListAllFiles(ctx, "busuhhhh", auth, params) + if err == nil { + err = ft.Wait() + } + fmt.Printf("resultFiles:%v\n", resultFiles) + fmt.Sprintf("sd") +} diff --git a/pkg/pitr/workflow.go b/pkg/pitr/workflow.go index edc32ed..5d1ecfc 100644 --- a/pkg/pitr/workflow.go +++ b/pkg/pitr/workflow.go @@ -1,8 +1,10 @@ package pitr import ( + "bytes" "compress/gzip" "context" + "encoding/binary" "encoding/json" "errors" "fmt" @@ -58,41 +60,39 @@ func LoadAllBinlog(pCtx *Context) error { pCtx.ConsistentXStoreCount += 1 } for _, pod := range xStore.Pods { - if pod.Host == "" { - continue - } var binlogSources []BinlogSource - pCtx.Logger.Info("list local binlog list", "pod", pod.PodName, "host", pod.Host, "logDir", pod.LogDir) - resp, err := hpfsClient.ListLocalBinlogList(context.Background(), &hpfs.ListLocalBinlogListRequest{ - Host: &hpfs.Host{NodeName: pod.Host}, - LogDir: pod.LogDir, - }) - if err != nil { - pCtx.Logger.Error(err, "failed to list local binlog list", "pod", pod.PodName, "host", pod.Host, "logDir", pod.LogDir) - return err - } - if resp.Version != "" { - for _, binlogFile := range resp.GetBinlogFiles() { - binlogFilename := filepath.Base(binlogFile) - absoluteFilepath := filepath.Join(pod.LogDir, binlogFilename) - binlogSources = append(binlogSources, BinlogSource{ - Filename: binlogFilename, - LSource: &LocalSource{ - FsIp: filestreamIp, - FsPort: filestreamPort, - NodeName: pod.Host, - DataFilepath: absoluteFilepath, - }, - BinlogChecksum: taskConfig.BinlogChecksum, - Version: resp.Version, - Timestamp: taskConfig.Timestamp, - StartIndex: xStore.BackupSetStartIndex, - }) + if pod.Host != "" { + pCtx.Logger.Info("list local binlog list", "pod", pod.PodName, "host", pod.Host, "logDir", pod.LogDir) + resp, err := hpfsClient.ListLocalBinlogList(context.Background(), &hpfs.ListLocalBinlogListRequest{ + Host: &hpfs.Host{NodeName: pod.Host}, + LogDir: pod.LogDir, + }) + if err != nil { + pCtx.Logger.Error(err, "failed to list local binlog list", "pod", pod.PodName, "host", pod.Host, "logDir", pod.LogDir) + return err } + if resp.Version != "" { + for _, binlogFile := range resp.GetBinlogFiles() { + binlogFilename := filepath.Base(binlogFile) + absoluteFilepath := filepath.Join(pod.LogDir, binlogFilename) + binlogSources = append(binlogSources, BinlogSource{ + Filename: binlogFilename, + LSource: &LocalSource{ + FsIp: filestreamIp, + FsPort: filestreamPort, + NodeName: pod.Host, + DataFilepath: absoluteFilepath, + }, + BinlogChecksum: taskConfig.BinlogChecksum, + Version: resp.Version, + Timestamp: taskConfig.Timestamp, + StartIndex: xStore.BackupSetStartIndex, + }) + } + } + pCtx.Logger.Info("finish list local binlog list", "pod", pod.PodName, "host", pod.Host, "logDir", pod.LogDir, "response", MustMarshalJSON(resp)) } - pCtx.Logger.Info("finish list local binlog list", "pod", pod.PodName, "host", pod.Host, "logDir", pod.LogDir, "response", MustMarshalJSON(resp)) - pCtx.Logger.Info("remote binlog list", "pod", pod.PodName, "host", pod.Host, "logDir", pod.LogDir) remoteResp, err := hpfsClient.ListRemoteBinlogList(context.Background(), &hpfs.ListRemoteBinlogListRequest{ Namespace: taskConfig.Namespace, @@ -378,6 +378,10 @@ func Checkpoint(pCtx *Context) error { pCtx.Logger.Info("Checkpoint...") if !pCtx.NeedConsistentPoint() { pCtx.Logger.Info("Skip Checkpoint...") + byteBuf := &bytes.Buffer{} + binary.Write(byteBuf, binary.LittleEndian, uint32(0)) + pCtx.RecoverTxsBytes = byteBuf.Bytes() + pCtx.Logger.Info(fmt.Sprintf("Write Empty RecoverTxsBytes Length = %d", len(pCtx.RecoverTxsBytes))) return nil } txParsers := map[string]tx.TransactionEventParser{} diff --git a/pkg/probe/xstore_ext/plugin/xstore_galaxy.go b/pkg/probe/xstore_ext/plugin/xstore_galaxy.go index acf0c73..e73ab97 100644 --- a/pkg/probe/xstore_ext/plugin/xstore_galaxy.go +++ b/pkg/probe/xstore_ext/plugin/xstore_galaxy.go @@ -20,6 +20,7 @@ import ( "context" "database/sql" "errors" + "github.com/alibaba/polardbx-operator/pkg/util/database" "strings" "github.com/alibaba/polardbx-operator/pkg/featuregate" @@ -65,6 +66,26 @@ func init() { } } } + + rows, err := db.Query("show slave status") + if err != nil { + return err + } + defer rows.Close() + for rows.Next() { + queryMap := map[string]interface{}{ + "Last_SQL_Error": &sql.NullString{}, + } + err = database.Scan(rows, queryMap, database.ScanOpt{CaseInsensitive: true}) + if err != nil { + return err + } + val := queryMap["Last_SQL_Error"].(*sql.NullString) + if !(val.Valid && val.String == "") { + return errors.New("Last_SQL_Error is not null") + } + } + return nil })) } diff --git a/pkg/webhook/polardbxcluster/configs.go b/pkg/webhook/polardbxcluster/configs.go index 9bf9d12..23f731f 100644 --- a/pkg/webhook/polardbxcluster/configs.go +++ b/pkg/webhook/polardbxcluster/configs.go @@ -34,6 +34,7 @@ type DefaulterConfig struct { StorageEngine string `json:"storage_engine,omitempty"` ServiceType string `json:"service_type,omitempty"` UpgradeStrategy string `json:"upgrade_strategy,omitempty"` + OperatorVersion string `json:"operator_version,omitempty"` } type ValidatorConfig struct { diff --git a/pkg/webhook/polardbxcluster/defaulter.go b/pkg/webhook/polardbxcluster/defaulter.go index a413978..f50246a 100644 --- a/pkg/webhook/polardbxcluster/defaulter.go +++ b/pkg/webhook/polardbxcluster/defaulter.go @@ -18,6 +18,7 @@ package polardbxcluster import ( "context" + "github.com/alibaba/polardbx-operator/api/v1/common" "k8s.io/apimachinery/pkg/util/rand" corev1 "k8s.io/api/core/v1" @@ -48,6 +49,12 @@ func (d *PolarDBXClusterV1Defaulter) Default(ctx context.Context, obj runtime.Ob if polardbx.Spec.ProtocolVersion.String() == "8" { polardbx.Spec.ProtocolVersion = intstr.FromString("8.0") } + if polardbx.Annotations == nil { + polardbx.Annotations = map[string]string{} + } + if _, ok := polardbx.Annotations[common.AnnotationOperatorCreateVersion]; !ok { + polardbx.Annotations[common.AnnotationOperatorCreateVersion] = d.configLoader().OperatorVersion + } if polardbx.Spec.Config.CN.Static != nil { if polardbx.Spec.Config.CN.Static.RPCProtocolVersion.String() == "" { @@ -79,6 +86,13 @@ func (d *PolarDBXClusterV1Defaulter) Default(ctx context.Context, obj runtime.Ob if nodes.DN.Template.Engine == "" { nodes.DN.Template.Engine = d.configLoader().StorageEngine } + if nodes.CDC != nil { + for _, group := range nodes.CDC.Groups { + if group.Template == nil { + group.Template = &polardbx.Spec.Topology.Nodes.CDC.Template + } + } + } // Readonly cluster initialization list if polardbx.Spec.InitReadonly != nil { diff --git a/pkg/webhook/polardbxcluster/validator.go b/pkg/webhook/polardbxcluster/validator.go index d1a003f..5461455 100644 --- a/pkg/webhook/polardbxcluster/validator.go +++ b/pkg/webhook/polardbxcluster/validator.go @@ -513,7 +513,7 @@ func (v *PolarDBXClusterV1Validator) validateReplicas(ctx context.Context, topol // Skip if CDC nodes is nil. if cdcNodes != nil { errList = append(errList, v.validateReplicasOnStatelessComponent(ctx, cdcRules, - field.NewPath("spec", "topology", "rules", "cdc"), int(cdcNodes.Replicas+cdcNodes.XReplicas))...) + field.NewPath("spec", "topology", "rules", "cdc"), int(cdcNodes.Replicas.IntValue()+cdcNodes.XReplicas))...) } columnarRules := topology.Rules.Components.Columnar @@ -680,6 +680,20 @@ func (v *PolarDBXClusterV1Validator) validate(ctx context.Context, polardbx *pol })) } + if spec.Topology.Nodes.CDC != nil { + cdcGroups := spec.Topology.Nodes.CDC.Groups + if cdcGroups != nil { + uniqueMap := map[string]bool{} + for _, cdcGroup := range cdcGroups { + if _, ok := uniqueMap[cdcGroup.Name]; ok { + errList = append(errList, field.Duplicate(field.NewPath("spec.Topology.Nodes.CDC.Groups[].name"), cdcGroup.Name)) + break + } + uniqueMap[cdcGroup.Name] = true + } + } + } + if len(errList) > 0 { return apierrors.NewInvalid( polardbx.GroupVersionKind().GroupKind(), diff --git a/test/e2e/polardbxcluster/lifecycle/creation.go b/test/e2e/polardbxcluster/lifecycle/creation.go index f414ba2..6c68da7 100644 --- a/test/e2e/polardbxcluster/lifecycle/creation.go +++ b/test/e2e/polardbxcluster/lifecycle/creation.go @@ -18,6 +18,10 @@ package lifecycle import ( polardbxv1 "github.com/alibaba/polardbx-operator/api/v1" + "github.com/alibaba/polardbx-operator/pkg/operator/v1/xstore/convention" + "github.com/onsi/gomega" + v1 "k8s.io/api/apps/v1" + "sigs.k8s.io/controller-runtime/pkg/client" "time" polardbxv1polardbx "github.com/alibaba/polardbx-operator/api/v1/polardbx" @@ -286,4 +290,56 @@ var _ = ginkgo.Describe("[PolarDBXCluster] [Lifecycle:Create]", func() { pxcframework.NewExpectation(f, obj).ExpectAllOk(true) pxcframework.NewExpectation(f, readonlyObj).ExpectAllOk(true) }) + + ginkgo.It("cdc group pxc should be created as expected", func() { + resources := corev1.ResourceRequirements{ + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("2"), + corev1.ResourceMemory: resource.MustParse("2Gi"), + }, + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("100m"), + corev1.ResourceMemory: resource.MustParse("100Mi"), + }, + } + obj := pxcframework.NewPolarDBXCluster( + "e2e-test-create-cdc-group-1", + f.Namespace, + pxcframework.ProtocolVersion(5), + pxcframework.TopologyNode("cn", 1, "", "", false, resources), + pxcframework.TopologyNode("dn", 1, "", "", false, resources), + pxcframework.TopologyNode("cdc", 1, "", "", false, resources), + ) + cdcGroup := pxcframework.CdcGroup("cdcgroup1", 1, "testenvk", "testenvv") + obj.Spec.Topology.Nodes.CDC.Groups = []*polardbxv1polardbx.CdcGroup{ + &cdcGroup, + } + // Always run clean up to make sure objects are cleaned. + defer DeletePolarDBXClusterAndWaitUntilItDisappear(f, obj, 1*time.Minute) + + // Do create and verify. + CreatePolarDBXClusterAndWaitUntilRunningOrFail(f, obj, 10*time.Minute) + + var depoyList v1.DeploymentList + framework.ExpectNoError(f.Client.List(f.Ctx, &depoyList, client.MatchingLabels{ + "polardbx/name": "e2e-test-create-cdc-group-1", + "polardbx/group": "cdcgroup1", + }), obj) + gomega.Expect(len(depoyList.Items)).Should(gomega.BeEquivalentTo(1)) + deploy := depoyList.Items[0] + var hasTargetEnv bool + for _, container := range deploy.Spec.Template.Spec.Containers { + if container.Name == convention.ContainerEngine { + for _, envKv := range container.Env { + if envKv.Name == "testenvk" && envKv.Value == "testenvv" { + hasTargetEnv = true + break + } + } + break + } + } + gomega.Expect(hasTargetEnv).Should(gomega.BeEquivalentTo(true)) + }) + }) diff --git a/test/e2e/polardbxcluster/lifecycle/upgrade.go b/test/e2e/polardbxcluster/lifecycle/upgrade.go index 3a1a582..70b2aef 100644 --- a/test/e2e/polardbxcluster/lifecycle/upgrade.go +++ b/test/e2e/polardbxcluster/lifecycle/upgrade.go @@ -21,6 +21,7 @@ import ( "database/sql" "errors" "fmt" + "k8s.io/apimachinery/pkg/util/intstr" "time" "github.com/onsi/ginkgo" @@ -175,7 +176,7 @@ var _ = ginkgo.Describe("[PolarDBXCluster] [Lifecycle:Upgrade]", func() { exp.ExpectDeploymentsOk() exp.ExpectXStoresOk() - obj.Spec.Topology.Nodes.CDC.Replicas = 2 + obj.Spec.Topology.Nodes.CDC.Replicas = intstr.FromInt(2) err := f.Client.Update(f.Ctx, obj) framework.ExpectNoError(err) @@ -226,7 +227,7 @@ var _ = ginkgo.Describe("[PolarDBXCluster] [Lifecycle:Upgrade]", func() { exp.ExpectXStoresOk() obj.Spec.Topology.Nodes.CDC = &polardbxv1polardbx.TopologyNodeCDC{ - Replicas: 1, + Replicas: intstr.FromInt(1), } obj.Spec.Topology.Nodes.CDC.Template.Resources = resources err := f.Client.Update(f.Ctx, obj) diff --git a/test/framework/polardbxcluster/expect.go b/test/framework/polardbxcluster/expect.go index 4a4d6c4..5c44d00 100644 --- a/test/framework/polardbxcluster/expect.go +++ b/test/framework/polardbxcluster/expect.go @@ -541,7 +541,7 @@ func (e *Expectation) ExpectCDCDeploymentsOk() { e.ExpectOwnerReferenceCorrect(common.GetObjectList(deployments)...) cdcNode := e.obj.Spec.Topology.Nodes.CDC - if cdcNode == nil || cdcNode.Replicas == 0 { + if cdcNode == nil || cdcNode.Replicas.IntValue() == 0 { gomega.Expect(deployments).To(gomega.BeEmpty(), "cdc not defined or replicas is 0, should be empty") return } @@ -550,7 +550,7 @@ func (e *Expectation) ExpectCDCDeploymentsOk() { nodeSelectors := e.obj.Spec.Topology.Rules.Selectors cdcRules := e.obj.Spec.Topology.Rules.Components.CDC - replicas := cdcNode.Replicas + replicas := cdcNode.Replicas.IntValue() template := cdcNode.Template e.expectDeploymentsMatchesRulesAndReplicas(deployments, nodeSelectors, cdcRules, int(replicas), "cdc") @@ -882,13 +882,14 @@ func (e *Expectation) ExpectServiceMonitorsOK() { gomega.Expect(items).NotTo(gomega.BeEmpty(), "no ServiceMonitor found") monitorsByRole := common.MapObjectsFromObjectListByLabel(items, "polardbx/role") - gomega.Expect(monitorsByRole).To(gomega.HaveLen(4), "must be 4 servicemonitors for all role") + gomega.Expect(monitorsByRole).To(gomega.HaveLen(5), "must be 5 servicemonitors for all role") - framework.ExpectHaveKeys(monitorsByRole, "cn", "dn", "gms", "cdc") + framework.ExpectHaveKeys(monitorsByRole, "cn", "dn", "gms", "cdc", "columnar") gomega.Expect(monitorsByRole["cn"]).To(gomega.HaveLen(1), "must be 1 cn servicemonitor") gomega.Expect(monitorsByRole["cdc"]).To(gomega.HaveLen(1), "must be 1 cdc servicemonitor") gomega.Expect(monitorsByRole["dn"]).To(gomega.HaveLen(1), "must be 1 dn servicemonitor") gomega.Expect(monitorsByRole["gms"]).To(gomega.HaveLen(1), "must be 1 gms servicemonitor") + gomega.Expect(monitorsByRole["columnar"]).To(gomega.HaveLen(1), "must be 1 columnar servicemonitor") monitorInterval := fmt.Sprintf("%.0fs", monitor.Spec.MonitorInterval.Seconds()) scrapeTimeout := fmt.Sprintf("%.0fs", monitor.Spec.ScrapeTimeout.Seconds()) diff --git a/test/framework/polardbxcluster/factory.go b/test/framework/polardbxcluster/factory.go index c6f8862..02e51ef 100644 --- a/test/framework/polardbxcluster/factory.go +++ b/test/framework/polardbxcluster/factory.go @@ -75,6 +75,20 @@ func EncodeKeySecret(name, key string) FactoryOption { } } +func CdcGroup(name string, replicas int, envKvs ...string) polardbxv1polardbx.CdcGroup { + envs := map[string]intstr.IntOrString{} + for i := 0; i < len(envKvs); i += 2 { + envs[envKvs[i]] = intstr.FromString(envKvs[i+1]) + } + return polardbxv1polardbx.CdcGroup{ + Name: name, + Replicas: int32(replicas), + Config: polardbxv1polardbx.CDCConfig{ + Envs: envs, + }, + } +} + func TopologyNode(role string, replicas int, engine, image string, hostNetwork bool, resources corev1.ResourceRequirements) FactoryOption { switch role { case polardbxmeta.RoleCN: @@ -106,7 +120,7 @@ func TopologyNode(role string, replicas int, engine, image string, hostNetwork b case polardbxmeta.RoleCDC: return func(polardbxcluster *polardbxv1.PolarDBXCluster) { polardbxcluster.Spec.Topology.Nodes.CDC = &polardbxv1polardbx.TopologyNodeCDC{ - Replicas: int32(replicas), + Replicas: intstr.FromInt(replicas), Template: polardbxv1polardbx.CDCTemplate{ Image: image, HostNetwork: hostNetwork, diff --git a/tools/logstash-filter-polardbx/README.md b/tools/logstash-filter-polardbx/README.md index 36304ea..e94219e 100644 --- a/tools/logstash-filter-polardbx/README.md +++ b/tools/logstash-filter-polardbx/README.md @@ -22,7 +22,7 @@ Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/log #### Code - To get started, you'll need JRuby with the Bundler gem installed. -- Create a new plugin or clone and existing from the GitHub [logstash-plugins](https://github.com/logstash-plugins) organization. We also provide [example plugins](https://github.com/logstash-plugins?query=example). +- Create a new plugin or clone an existing one from the GitHub [logstash-plugins](https://github.com/logstash-plugins) organization. We also provide [example plugins](https://github.com/logstash-plugins?query=example). - Install dependencies ```sh diff --git a/tools/xstore/audit_controller.py b/tools/xstore/audit_controller.py new file mode 100644 index 0000000..a7ca8dd --- /dev/null +++ b/tools/xstore/audit_controller.py @@ -0,0 +1,248 @@ +#!/usr/bin/env python3 + + +# Copyright 2021 Alibaba Group Holding Limited. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import logging +import subprocess +import threading +import time +import os + +from core import Manager, Context +from core.context.k8s import PodInfo + +from mysql.connector.pooling import MySQLConnectionPool +from mysql.connector.errors import Error, DatabaseError, PoolError, InterfaceError + +SECOND = 1 +LABEL_CHECK_INTERVAL = 10 * SECOND +LOG_CHECK_INTERVAL = 1 * SECOND +MAX_AUDIT_LOG_FILE_NUM = 50 +MAX_SLOW_LOG_FILE_NUM = 50 +POOL_SIZE = 3 + +AUDIT_DIR = "/data/mysql/tmp" +SLOW_LOG_DIR = "/data/mysql/data/mysql" +PYTHON_PATH = "/tools/xstore/current/venv/bin/python3" + +AUDIT_ENABLED_VAR_MYSQL80 = "rds_audit_log_enabled" +AUDIT_ENABLED_VAR_MYSQL57 = "opt_rds_audit_log_enabled" +AUDIT_FLUSH_CMD_MYSQL80 = "SET GLOBAL rds_audit_log_flush = ON" +AUDIT_FLUSH_CMD_MYSQL57 = "flush rds_audit logs" +SQL_BINLOG = "sql_log_bin" +SQL_INTERNAL_MARK = "/* rds internal mark */ " + +LOG_OUTPUT_VAR = "log_output" # option: FILE, TABLE, NONE +LOG_ROTATE_CMD = "set session rotate_log_table = on;" +SLOW_LOG_FLUSH_CMD = "flush slow logs;" +SLOW_LOG_ENABELD_VAR = "slow_query_log" + +AUDIT_LABEL_KEY = "polardbx/enableAuditLog" + + +class AuditController: + """ Audit Controller enables pxc operator to switch on/off dn audit log. + It sets mysql's variables according to pod label 'AUDIT_LABEL_KEY'. + It will rotate dn audit log and slow query log periodically if they are enabeld. + + A audit controller has two threads to do two things periodically. + - sql_checker: + - Reading mysql's audit log enabled variables and setting it to the same as pod's label 'AUDIT_LABEL_KEY'. + - Reading mysql's slow log enabled variables. + - log_flusher: + - When audit log enabled, log_flusher executes mysql commands to rotate log file every LOG_CHECK_INTERVAL to prevent single file growing too large. + - When slow log enabled, log_flusher rotates log file every LOG_CHECK_INTERVAL. + - log_flusher deletes old files to keep file number <= MAX_XXXX_LOG_FILE_NUM + + Audit Controller has a mysql connection pool with size POOL_SIZE. + + """ + def __init__(self) -> None: + self.mgr = Manager(Context()) + self._setup_logger() + self.port = self.mgr.context().port_access() + self.mysql_pool_config = { + "pool_name": "mysql_pool", + "pool_size": POOL_SIZE, + "host": "localhost", + "port": self.port, + "user": "root", + } + self.pool: MySQLConnectionPool = None # type: ignore + self.audit_enbaled = False + self.slow_enabled = False + + def _setup_logger(self): + self.logger = logging.getLogger(type(self).__name__) + self.logger.propagate = False + formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') + ch = logging.StreamHandler() + ch.setLevel(logging.INFO) + ch.setFormatter(formatter) + self.logger.addHandler(ch) + + # mysql connector logger + logger = logging.getLogger("mysql.connector") + logger.setLevel(logging.INFO) + formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s- %(message)s") + stream_handler = logging.StreamHandler() + stream_handler.setFormatter(formatter) + logger.addHandler(stream_handler) + + # a wrapper to handle exceptions + def _sql_check_wrapper(self): + self.logger.info("Starting a Label Check Thread to listen k8s' audit label every %d second."%LABEL_CHECK_INTERVAL) + desp = "SQL Checker" + while True: + try: + self._check_sql() + except DatabaseError as e: + self.logger.error(f"{desp} met database error: {e}") + except Error as e: + self.logger.error(f"{desp} met mysql/connector/pool error: {e}") + except Exception as e: + self.logger.error(f"{desp} met error: {e}") + time.sleep(LABEL_CHECK_INTERVAL - int(time.time())%LABEL_CHECK_INTERVAL) + + + # a wrapper to handle exceptions + def _log_flush_wrapper(self): + self.logger.info("Starting a Log Flush Thread to flush audit log every %d second."%LOG_CHECK_INTERVAL) + desp = "Log Flusher" + while True: + try: + self._flush_log() + except DatabaseError as e: + self.logger.error(f"{desp} met database error: {e}") + except Error as e: + self.logger.error(f"{desp} met mysql/connector/pool error: {e}") + except Exception as e: + self.logger.error(f"{desp} met error: {e}") + time.sleep(LOG_CHECK_INTERVAL) + + def _check_sql(self): + audit_label = PodInfo().label(AUDIT_LABEL_KEY) + audit_label = False if (audit_label is None or audit_label.lower()=="false") else True + + audit_enabled_var = AUDIT_ENABLED_VAR_MYSQL80 if self.mgr.context().is_galaxy80() else AUDIT_ENABLED_VAR_MYSQL57 + slow_enabled_var = SLOW_LOG_ENABELD_VAR + + with self.pool.get_connection() as conn: + cursor = conn.cursor() + execute = lambda cmd : cursor.execute(SQL_INTERNAL_MARK + cmd) + execute(f"set {SQL_BINLOG} = 0") + + execute(f"SELECT @@{audit_enabled_var}, @@{slow_enabled_var}") + results = cursor.fetchone() + audit_enabled = bool(results[0]) + slow_enabled = bool(results[1]) + + # set audit enabled according to audit label + if audit_enabled != audit_label: + self.logger.info(f"Label {AUDIT_LABEL_KEY}({audit_label}) != SQL {audit_enabled_var}({audit_enabled}). Trying to change {audit_enabled_var} from {audit_enabled} to {audit_label}.") + execute(f"SET GLOBAL {audit_enabled_var} = {audit_label}") + audit_enabled = audit_label + self.audit_enbaled = audit_label + + # set general,slow log output type to TABLE + self.slow_enabled = slow_enabled + + conn.commit() + + # body of log_flusher thread + def _flush_log(self): + + if self.audit_enbaled==False and self.slow_enabled==False: + return + + audit_flush_cmd = None + if self.audit_enbaled: + if self.mgr.context().is_galaxy80(): + audit_flush_cmd = AUDIT_FLUSH_CMD_MYSQL80 + elif self.mgr.context().is_xcluster57(): + audit_flush_cmd = AUDIT_FLUSH_CMD_MYSQL57 + + with self.pool.get_connection() as conn: + cursor = conn.cursor() + execute = lambda cmd : cursor.execute(SQL_INTERNAL_MARK + cmd) + execute(f"set {SQL_BINLOG} = 0") + + if self.audit_enbaled: + execute(audit_flush_cmd) + if self.slow_enabled: + execute(LOG_ROTATE_CMD) + execute(SLOW_LOG_FLUSH_CMD) + + conn.commit() + + if self.audit_enbaled: + # *.alog + audit_log_files = [os.path.join(AUDIT_DIR, f) for f in os.listdir(AUDIT_DIR) if f.endswith('.alog')] + self._maintain_file_num(audit_log_files, MAX_AUDIT_LOG_FILE_NUM) + + if self.slow_enabled: + # slow_log_*.csv + slow_log_files = [os.path.join(SLOW_LOG_DIR, f) for f in os.listdir(SLOW_LOG_DIR) if f.startswith('slow_log_')] + self._maintain_file_num(slow_log_files, MAX_SLOW_LOG_FILE_NUM) + + def _maintain_file_num(self, files, max_num): + file_nums = len(files) + if file_nums > max_num: + file_time_tuples = [(f, os.stat(f).st_mtime) for f in files] + file_time_tuples = sorted(file_time_tuples, key=lambda x: x[1]) + old_num = file_nums - max_num + for i in range(old_num): + os.remove(file_time_tuples[i][0]) + + def _create_connection_pool(self): + self.logger.info("Creating mysql connection pool...") + pool = None + while True: + try: + pool = MySQLConnectionPool(**self.mysql_pool_config) + break + except Error as e: + self.logger.error("Creating mysql connection pool failed: %s"%e) + time.sleep(5) + + self.logger.info("Created a mysql connection pool with size = %d."%POOL_SIZE) + return pool + + def start(self): + """ Start a Audit Controller in current process. + """ + self.pool = self._create_connection_pool() + sql_checker = threading.Thread(target=self._sql_check_wrapper) + log_flusher = threading.Thread(target=self._log_flush_wrapper) + + sql_checker.start() + log_flusher.start() + + def start_process(self): + """ Start a Audit Controller in a new process. + + AuditController will be run in a process. So we can manually start a new controller when it's down. + """ + module_path = os.path.abspath(__file__) + cmd = [PYTHON_PATH, module_path] + self.logger.info("Start Audit Controller Process: %s"%cmd) + subprocess.Popen(cmd) + + +if __name__ == '__main__': + logging.basicConfig(level=logging.INFO,format='%(asctime)s - AuditController - %(levelname)s - %(message)s') + audit_controller = AuditController() + audit_controller.start() + diff --git a/tools/xstore/cli/consensus.py b/tools/xstore/cli/consensus.py index b79dd19..5a7a873 100644 --- a/tools/xstore/cli/consensus.py +++ b/tools/xstore/cli/consensus.py @@ -44,8 +44,7 @@ def report_role(report_leader): else: leader_addr = current_node.local_info.current_leader if leader_addr != '': - channel = global_mgr.shared_channel() - print(channel.get_node_by_addr(leader_addr).pod) + print(leader_addr) else: print('') @@ -134,22 +133,22 @@ def get_role(consensus_node: ConsensusNode, node_info: channel.Node): all_nodes = mgr.list_consensus_nodes() def to_print_tuple(consensus_node: ConsensusNode): - node_info = chan.get_node_by_addr(consensus_node.addr) if full: - return node_info.pod, consensus_node.server_id, consensus_node.addr, \ - get_role(consensus_node, node_info), consensus_node.global_info.match_index, \ + return consensus_node.server_id, consensus_node.addr, \ + consensus_node.role.value, consensus_node.global_info.match_index, \ + consensus_node.global_info.next_index, \ consensus_node.global_info.applied_index, consensus_node.global_info.election_weight, \ consensus_node.global_info.force_sync, consensus_node.global_info.learner_source else: - return node_info.pod, consensus_node.addr, get_role(consensus_node, node_info) + return consensus_node.addr, consensus_node.role if full: print_rows(sep=' | ', header=( - 'pod', 'server_id', 'addr', 'role', 'match_index', + 'next_index', 'applied_index', 'election_weight', 'force_sync', @@ -157,7 +156,7 @@ def to_print_tuple(consensus_node: ConsensusNode): ), rows=[to_print_tuple(n) for n in all_nodes]) else: print_rows(sep=' | ', header=( - 'pod', 'addr', 'role' + 'addr', 'role' ), rows=[to_print_tuple(n) for n in all_nodes]) @@ -166,7 +165,7 @@ def to_print_tuple(consensus_node: ConsensusNode): def _get_addr_from_argument(arg: str, shared_channel: channel.SharedFileChannel) -> str: # If in the format of "IP:port", return arg. - if re.match('\\d+\\.\\d+\\.\\d+\\.\\d+:\\d+', arg): + if re.match('\\d+\\.\\d+\\.\\d+\\.\\d+:\\d+', arg) or arg.isdigit(): return arg # Otherwise query the shared channel. @@ -241,12 +240,7 @@ def drop_learner(node): addr = _get_addr_from_argument(node, shared_channel) with global_mgr.consensus_manager() as mgr: - consensus_nodes = mgr.list_consensus_nodes() - # check if the leaner node exists - for consensus_node in consensus_nodes: - if consensus_node.role == ConsensusRole.LEARNER and consensus_node.addr == addr: - mgr.drop_learner(addr) - return + mgr.drop_learner(addr) consensus_group.add_command(drop_learner) @@ -254,14 +248,26 @@ def drop_learner(node): @click.command(name='learner-to-follower') @click.argument('node') -def chanage_to_follower_from_learner(node): +def change_to_follower_from_learner(node): shared_channel = global_mgr.shared_channel() addr = _get_addr_from_argument(node, shared_channel) with global_mgr.consensus_manager() as mgr: mgr.upgrade_learner_to_follower(addr) -consensus_group.add_command(chanage_to_follower_from_learner) +consensus_group.add_command(change_to_follower_from_learner) + + +@click.command(name='follower-to-learner') +@click.argument('node') +def change_to_learner_from_follower(node): + shared_channel = global_mgr.shared_channel() + addr = _get_addr_from_argument(node, shared_channel) + with global_mgr.consensus_manager() as mgr: + mgr.downgrade_follower_to_learner(addr) + + +consensus_group.add_command(change_to_learner_from_follower) @click.command(name='enable-election') diff --git a/tools/xstore/cli/log.py b/tools/xstore/cli/log.py index 944430d..6df8b13 100644 --- a/tools/xstore/cli/log.py +++ b/tools/xstore/cli/log.py @@ -64,7 +64,7 @@ def purge_binary_logs(left): :param left: :return: """ - if can_purge_logs(): + if not can_purge_logs(): print('purge log is disabled now. please refer rebuild task') return with global_mgr.new_connection() as conn: diff --git a/tools/xstore/cli/recover.py b/tools/xstore/cli/recover.py index 01d23d7..752f436 100644 --- a/tools/xstore/cli/recover.py +++ b/tools/xstore/cli/recover.py @@ -23,7 +23,6 @@ from core.backup_restore.storage.filestream_client import BackupStorage, FileStreamClient from core.backup_restore.utils import check_run_process - CONN_TIMEOUT = 30 INTERNAL_MARK = '/* rds internal mark */ ' RESTORE_TEMP_DIR = "/data/mysql/restore" @@ -58,7 +57,7 @@ def start(restore_context, target_pod, password): recover_cmd = [context.bb_home, 'recover', '-f', local_cp_path, - '-h', target_pod + "-service", # TODO(dengli): more elegant way + '-h', target_pod, # TODO(dengli): more elegant way '-P', str(context.port_access()), '-u', 'admin', '-p', password] diff --git a/tools/xstore/core/backup_restore/storage/filestream_client.py b/tools/xstore/core/backup_restore/storage/filestream_client.py index 78713a4..35cddc5 100644 --- a/tools/xstore/core/backup_restore/storage/filestream_client.py +++ b/tools/xstore/core/backup_restore/storage/filestream_client.py @@ -25,6 +25,7 @@ class BackupStorage(Enum): """ OSS = "OSS" SFTP = "SFTP" + S3 = "S3" class ClientAction(Enum): @@ -35,6 +36,8 @@ class ClientAction(Enum): UploadOss = "uploadOss" DownloadSsh = "DownloadSsh" UploadSsh = "uploadSsh" + DownloadMinio = "downloadMinio" + UploadMinio = "uploadMinio" class FileStreamClient: @@ -61,6 +64,8 @@ def upload_from_stdin(self, remote_path, stdin, stderr=sys.stderr, logger=None, ] if is_string_input and self._storage == BackupStorage.OSS: upload_cmd.append("--meta.ossBufferSize=102400") + if is_string_input and self._storage == BackupStorage.S3: + upload_cmd.append("--meta.minioBufferSize=102400") if logger: logger.info("Upload command: %s" % upload_cmd) with subprocess.Popen(upload_cmd, stdin=stdin, stderr=stderr, close_fds=True) as up: @@ -122,5 +127,8 @@ def init_action(self): elif self._storage == BackupStorage.SFTP: self._download_action = ClientAction.DownloadSsh self._upload_action = ClientAction.UploadSsh + elif self._storage == BackupStorage.S3: + self._download_action = ClientAction.DownloadMinio + self._upload_action = ClientAction.UploadMinio else: raise NotImplementedError diff --git a/tools/xstore/core/consensus/manager_impl.py b/tools/xstore/core/consensus/manager_impl.py index 9af8fd7..84f4096 100644 --- a/tools/xstore/core/consensus/manager_impl.py +++ b/tools/xstore/core/consensus/manager_impl.py @@ -200,7 +200,10 @@ def drop_learner(self, target_addr: str): self.check_current_role(ConsensusRole.LEADER) with self._conn.cursor() as cur: - cur.execute('drop consensus_learner "%s"' % target_addr) + if target_addr.isdigit(): + cur.execute('drop consensus_learner %s' % target_addr) + else: + cur.execute('drop consensus_learner "%s"' % target_addr) def add_follower(self, target_addr: str) -> ConsensusNode: self.check_current_role(ConsensusRole.LEADER) @@ -229,7 +232,10 @@ def downgrade_follower_to_learner(self, addr) -> ConsensusNode: self.check_current_role(ConsensusRole.LEADER) with self._conn.cursor() as cur: - cur.execute('change consensus_follower "%s" to consensus_learner' % addr) + if addr.isdigit(): + cur.execute('change consensus_follower %s to consensus_learner' % addr) + else: + cur.execute('change consensus_follower "%s" to consensus_learner' % addr) return self.get_consensus_node(addr) @@ -477,7 +483,10 @@ def drop_learner(self, target_addr: str): self.check_current_role(ConsensusRole.LEADER) with self._conn.cursor() as cur: - cur.execute('call dbms_consensus.drop_learner("%s")' % target_addr) + if target_addr.isdigit(): + cur.execute('call dbms_consensus.drop_learner(%s)' % target_addr) + else: + cur.execute('call dbms_consensus.drop_learner("%s")' % target_addr) def add_follower(self, target_addr: str) -> ConsensusNode: node = self.add_learner(target_addr) @@ -510,7 +519,10 @@ def downgrade_follower_to_learner(self, addr) -> ConsensusNode: self.check_current_role(ConsensusRole.LEADER) with self._conn.cursor() as cur: - cur.execute('call dbms_consensus.downgrade_follower("%s")' % addr) + if addr.isdigit(): + cur.execute('call dbms_consensus.downgrade_follower(%s)' % addr) + else: + cur.execute('call dbms_consensus.downgrade_follower("%s")' % addr) return self.get_consensus_node(addr) @@ -603,7 +615,6 @@ def purge_consensus_log_to(self, target_log_index: int, *, local: bool = False, else: cur.execute('call dbms_consensus.local_purge_log(%d)' % to_purge_logs[-1].start_log_index) - def show_slave_status(self) -> SlaveStatus: with self._conn.cursor() as cur: cur.execute('show slave status') diff --git a/tools/xstore/core/context/context.py b/tools/xstore/core/context/context.py index 2c9da39..1455ecb 100644 --- a/tools/xstore/core/context/context.py +++ b/tools/xstore/core/context/context.py @@ -446,8 +446,9 @@ def get_galaxy_xtrabackup_home(self) -> str: lines = res.readlines() if res.close() is None and len(lines) > 1: version = lines[1].strip().split()[-1] - version0 = int(version.split(".")[0]) - if version0 > 1: - return "/tools/xstore/current/xtrabackup/8.0-2/xcluster_xtrabackup80/bin" + if version.split(".")[0].isdigit(): + version0 = int(version.split(".")[0]) + if version0 > 1: + return "/tools/xstore/current/xtrabackup/8.0-2/xcluster_xtrabackup80/bin" return "/tools/xstore/current/xcluster_xtrabackup80/bin" raise Exception("failed to get xtrabackup home by `mysqld -V`") diff --git a/tools/xstore/core/convention.py b/tools/xstore/core/convention.py index 221ffdf..d183fb5 100644 --- a/tools/xstore/core/convention.py +++ b/tools/xstore/core/convention.py @@ -49,6 +49,7 @@ ANNOTATION_XSTORE_INDICATE = 'xstore/indicate' ANNOTATION_RUNMODE = 'runmode' +ANNOTATION_FLUSH_LOCAL = 'xstore/flushlocal' # Node roles. diff --git a/tools/xstore/core/engine/engine.py b/tools/xstore/core/engine/engine.py index b6cb095..498d1ca 100644 --- a/tools/xstore/core/engine/engine.py +++ b/tools/xstore/core/engine/engine.py @@ -20,7 +20,7 @@ import time from abc import ABC, abstractmethod from core import consensus, convention -from core.consensus import AbstractConsensusManager +from core.consensus import AbstractConsensusManager, ConsensusRole from core.context import Context, PodInfo from typing import ClassVar, Sequence, AnyStr @@ -192,6 +192,12 @@ def try_handle_indicate(self): try to handle indicate """ + @abstractmethod + def try_flush_meta_when_start(self): + """ + flush cluster info meta + """ + class Mock(Engine): """ @@ -274,6 +280,9 @@ def prepare_handle_indicate(self, action): def try_handle_indicate(self): return + def try_flush_meta_when_start(self): + return + class EngineCommon(Engine, ABC): def __init__(self, context: Context): @@ -348,6 +357,12 @@ def exec_cmd(self, cmd: Sequence[AnyStr], *, cwd=None, stdout=None, stderr=None, raise def shutdown(self): + current_node = self.consensus_manager().current_node() + if current_node.role == ConsensusRole.LEADER: + for node in self.consensus_manager().list_consensus_nodes(): + if node.role == ConsensusRole.FOLLOWER and node.global_info.election_weight != 1: + self.consensus_manager().change_leader(node.addr) + break self.exec_cmd( cmd=convention.SHELL_CMD['SHUTDOWN_MYSQL']("--socket=" + os.path.join(self.path_run, 'mysql.sock'))) @@ -530,8 +545,8 @@ def wait_for_enable(self, interval=5): return def clean_data_log(self): - self.exec_cmd(cmd=convention.SHELL_CMD['RM_DIRECTORY_CONTENT']('/data/mysql/data')) - self.exec_cmd(cmd=convention.SHELL_CMD['RM_DIRECTORY_CONTENT']('/data/mysql/log')) + self.exec_cmd(cmd=convention.SHELL_CMD['RM_DIRECTORY_CONTENT']('/data/mysql/data'), interval=1800) + self.exec_cmd(cmd=convention.SHELL_CMD['RM_DIRECTORY_CONTENT']('/data/mysql/log'), interval=1800) def set_recover_index_filepath(self, filepath): self.recover_index_filepath = filepath @@ -555,5 +570,18 @@ def try_handle_indicate(self): if os.path.exists(indicate_file): with open(indicate_file, "r") as f: action = f.readline() - self.handle_indicate(action) + self.handle_indicate(action.strip()) os.remove(indicate_file) + + def try_flush_meta_when_start(self): + local_ipport = self.context.volume_path(convention.VOLUME_DATA, 'polarx_local_ipport') + if self.context.pod_info().annotation(convention.ANNOTATION_FLUSH_LOCAL) == "true": + ip_port = '%s:%s' % (self.context.env().get("POD_IP"), self.context.env().get("PORT_PAXOS")) + if os.path.exists(local_ipport): + with open(local_ipport, 'r') as f: + content = f.readline() + if content == ip_port: + return + with open(local_ipport, 'w') as f: + f.write(ip_port) + self.prepare_handle_indicate("reset-cluster-info-to-learner") diff --git a/tools/xstore/core/engine/galaxy/engine.py b/tools/xstore/core/engine/galaxy/engine.py index df56762..e9441fb 100644 --- a/tools/xstore/core/engine/galaxy/engine.py +++ b/tools/xstore/core/engine/galaxy/engine.py @@ -219,7 +219,7 @@ def _default_dynamic_config(self) -> configparser.ConfigParser: 'loose_rds_audit_log_buffer_size': dynamic_config["loose_rds_audit_log_buffer_size"], 'max_connections': dynamic_config["max_connections"], 'max_user_connections': dynamic_config["max_user_connections"], - 'mysqlx_max_connections': dynamic_config["mysqlx_max_connections"], + 'loose_mysqlx_max_connections': dynamic_config["mysqlx_max_connections"], 'loose_galaxy_max_connections': dynamic_config["loose_galaxy_max_connections"], 'default_time_zone': '+08:00', 'loose_new_rpc': self.new_rpc_enabled, @@ -252,9 +252,16 @@ def check_health(self, check_leader_readiness) -> bool: return True def _reset_cluster_info(self, learner, local=False): + cluster_info = self._get_cluster_info(learner=learner, local=local) + pod_info = self.context.pod_info() + if pod_info.annotation(convention.ANNOTATION_FLUSH_LOCAL) == "true": + if learner: + cluster_info = '%s:%s' % (self.context.env().get("POD_IP"), self.context.env().get("PORT_PAXOS")) + if local: + cluster_info = '%s:%s@1' % (self.context.env().get("POD_IP"), self.context.env().get("PORT_PAXOS")) args = { 'cluster-force-change-meta': 'ON', - 'loose-cluster-info': self._get_cluster_info(learner=learner, local=local), + 'loose-cluster-info': cluster_info, 'user': 'mysql', } if learner: diff --git a/tools/xstore/core/engine/galaxy/templates/my.cnf b/tools/xstore/core/engine/galaxy/templates/my.cnf index 43be0ee..c7a9c9a 100644 --- a/tools/xstore/core/engine/galaxy/templates/my.cnf +++ b/tools/xstore/core/engine/galaxy/templates/my.cnf @@ -193,3 +193,7 @@ innodb_doublewrite=1 # XProtocol related params loose_new_rpc=off + +log_output = "TABLE" + +loose_rds_audit_log_version = "MYSQL_V1" \ No newline at end of file diff --git a/tools/xstore/core/engine/util/config_util.py b/tools/xstore/core/engine/util/config_util.py index b129c32..d6a542f 100644 --- a/tools/xstore/core/engine/util/config_util.py +++ b/tools/xstore/core/engine/util/config_util.py @@ -36,6 +36,8 @@ def get_dynamic_mysql_cnf_by_spec(cpu, mem): result["loose_rds_reserved_connections"] = str(maintain_max_connections) result["loose_maintain_max_connections"] = str(maintain_max_connections) max_user_connections = int(cpu) + if max_user_connections < 8000: + max_user_connections = 8000 result["max_user_connections"] = str(max_user_connections) max_connections = loose_rds_kill_connections + maintain_max_connections + max_user_connections result["max_connections"] = str(max_connections) diff --git a/tools/xstore/entrypoint.py b/tools/xstore/entrypoint.py index 296f259..944dc86 100755 --- a/tools/xstore/entrypoint.py +++ b/tools/xstore/entrypoint.py @@ -22,6 +22,7 @@ import jsons from core import Context, Manager +from audit_controller import AuditController logging.basicConfig() logging.root.setLevel(logging.NOTSET) @@ -79,13 +80,14 @@ def _start(initialize, restore_prepare, debug, ignore_indicates, cluster_start_i mgr.wait_for_unblock() + # Go bootstrap or just initialize. + engine = mgr.engine() + engine.try_flush_meta_when_start() + # Handle indicates including pod block. if not ignore_indicates: mgr.handle_indicates() - # Go bootstrap or just initialize. - engine = mgr.engine() - _write_convenient_access_script(context) if cluster_start_index is not None: @@ -103,6 +105,9 @@ def _start(initialize, restore_prepare, debug, ignore_indicates, cluster_start_i engine.set_restore_prepare(True) engine.clean_data_log() + # create a process to enable audit log + audit_controller = AuditController() + audit_controller.start_process() # Bootstrap when not only initialize. if not initialize: diff --git a/tools/xstore/hack/update.sh b/tools/xstore/hack/update.sh index a26b1a5..6939cfe 100755 --- a/tools/xstore/hack/update.sh +++ b/tools/xstore/hack/update.sh @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +## Periodically copy tools/xstore to /target + set -e if [[ $# -lt 1 ]]; then diff --git a/tools/xstore/requirements.txt b/tools/xstore/requirements.txt index ed6b91f..005a2bd 100644 --- a/tools/xstore/requirements.txt +++ b/tools/xstore/requirements.txt @@ -3,4 +3,5 @@ jsons==1.4.0 PyMySQL==1.0.2 typish==1.9.1 oss2==2.15.0 -wget==3.2 \ No newline at end of file +wget==3.2 +mysql-connector-python==8.0.29 \ No newline at end of file