From 5255adfd81d701535087b24c8543b39fd024c836 Mon Sep 17 00:00:00 2001 From: MegaByte875 Date: Sat, 2 Dec 2023 17:33:17 +0800 Subject: [PATCH 1/2] update docs --- FAQ.md | 12 -- README.md | 4 +- config/samples/local-pv-storage.yaml | 2 +- doc/user/add-ons.md | 2 +- doc/user/br_guide.md | 2 +- doc/user/client_service.md | 4 +- doc/user/custom_config.md | 6 +- doc/user/intra_zone.md | 4 +- doc/user/local_pv_failover.md | 40 +++++ doc/user/log_guide.md | 8 +- doc/user/nebula_autoscaler.md | 2 +- doc/user/nebula_cluster_guide.md | 167 ++++++++++++++++++ doc/user/nebula_cluster_helm_guide.md | 158 ----------------- doc/user/nebula_console.md | 2 +- doc/user/nebula_port.md | 2 +- doc/user/ngctl_guide.md | 14 +- .../{install_guide.md => operator_guide.md} | 2 +- doc/user/pv_expansion.md | 2 +- doc/user/pv_reclaim.md | 2 +- doc/user/restart_cluster.md | 73 ++++++++ doc/user/security_context.md | 2 +- doc/user/ssl_guide.md | 2 +- doc/user/suspend_cluster.md | 66 +++++++ doc/user/webhook.md | 2 +- pkg/controller/provisioner/provisioner.go | 22 ++- 25 files changed, 392 insertions(+), 210 deletions(-) delete mode 100644 FAQ.md create mode 100644 doc/user/local_pv_failover.md create mode 100644 doc/user/nebula_cluster_guide.md delete mode 100644 doc/user/nebula_cluster_helm_guide.md rename doc/user/{install_guide.md => operator_guide.md} (99%) create mode 100644 doc/user/restart_cluster.md create mode 100644 doc/user/suspend_cluster.md diff --git a/FAQ.md b/FAQ.md deleted file mode 100644 index 7f5a46f4..00000000 --- a/FAQ.md +++ /dev/null @@ -1,12 +0,0 @@ -- Does Nebula Operator support v1.x ? - -v1.x does not support DNS and Nebula Operator requires this feature, it's not compatible. - -- Whether guarantees cluster stability if using local storage ? - -There is no guarantee that using local storage, it means that the POD is bound to a particular node. Operators do not currently have the ability to failover when the bound node goes down. This is not an issue with network storage. - -- How to ensure the stable availability of scaling cluster ? - -It is recommended to backup data in advance, so as you can go back if failed. - diff --git a/README.md b/README.md index ac40f0e1..f939e417 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ database. ### install nebula operator -See [install/uninstall nebula operator](doc/user/install_guide.md) . +See [install/uninstall nebula operator](doc/user/operator_guide.md) . ### Create and destroy a nebula cluster @@ -140,7 +140,7 @@ nebula-storaged-1 1/1 Running 0 10m nebula-storaged-2 1/1 Running 0 10m ``` -In addition, you can [Install Nebula Cluster with helm](doc/user/nebula_cluster_helm_guide.md). +In addition, you can [Install Nebula Cluster with helm](doc/user/nebula_cluster_guide.md). ### Upgrade a nebula cluster diff --git a/config/samples/local-pv-storage.yaml b/config/samples/local-pv-storage.yaml index 6935d5e8..e7fd9bd7 100644 --- a/config/samples/local-pv-storage.yaml +++ b/config/samples/local-pv-storage.yaml @@ -88,7 +88,7 @@ spec: serviceAccountName: local-pv-provisioner-sa containers: - name: local-pv-provisioner - image: reg.vesoft-inc.com/cloud-dev/local-pv-provisioner + image: vesoft/local-pv-provisioner imagePullPolicy: IfNotPresent command: - local-pv-provisioner diff --git a/doc/user/add-ons.md b/doc/user/add-ons.md index 2b2d7d07..e9b9a28e 100644 --- a/doc/user/add-ons.md +++ b/doc/user/add-ons.md @@ -1,4 +1,4 @@ -# Installing Add-ons +## Installing Add-ons **Caution:** This section links to third party projects that provide functionality required by nebula-operator. The nebula-operator diff --git a/doc/user/br_guide.md b/doc/user/br_guide.md index f941192b..4aae060a 100644 --- a/doc/user/br_guide.md +++ b/doc/user/br_guide.md @@ -1,4 +1,4 @@ -# Backup & Restore +## Backup & Restore ### Requirements diff --git a/doc/user/client_service.md b/doc/user/client_service.md index 55de879a..edd93022 100644 --- a/doc/user/client_service.md +++ b/doc/user/client_service.md @@ -1,4 +1,4 @@ -# nebula client service +## nebula client service For every nebula cluster created, the nebula operator will create a graphd service in the same namespace with the name `-graphd-svc`. @@ -15,7 +15,7 @@ The client service is of type `ClusterIP` and accessible only from within the Ku For example, access the service from a pod in the cluster: ```shell script -$ kubectl run --rm -ti --image vesoft/nebula-console:v3.5.0 --restart=Never -- /bin/sh +$ kubectl run --rm -ti --image vesoft/nebula-console:v3.6.0 --restart=Never -- /bin/sh / # nebula-console -u user -p password --address=nebula-graphd-svc --port=9669 2021/04/12 08:16:30 [INFO] connection pool is initialized successfully diff --git a/doc/user/custom_config.md b/doc/user/custom_config.md index 3456c149..23999737 100644 --- a/doc/user/custom_config.md +++ b/doc/user/custom_config.md @@ -1,4 +1,4 @@ -# Configure custom flags +## Configure custom flags ### Apply custom flags @@ -27,7 +27,7 @@ spec: memory: "1Gi" replicas: 1 image: vesoft/nebula-graphd - version: v3.5.0 + version: v3.6.0 storageClaim: resources: requests: @@ -73,5 +73,3 @@ This a dynamic runtime flags table, the pod rolling update will not be triggered | `rebuild_index_part_rate_limit` | The rate limit in bytes when leader synchronizes rebuilding index | `4194304` | | `prioritize_intra_zone_reading` | Prioritize to send read queries to storaged in the same zone | `false` | | `stick_to_intra_zone_on_failure` | Stick to intra zone routing if unable to find the storaged hosting the requested part in the same zone. | `false` | -| `sync_meta_when_use_space` | Whether to sync session to meta when use space | `false` | -| `validate_session_timestamp` | whether validate the timestamp when update session | `true` | diff --git a/doc/user/intra_zone.md b/doc/user/intra_zone.md index 5e0d9d6d..905ece30 100644 --- a/doc/user/intra_zone.md +++ b/doc/user/intra_zone.md @@ -38,7 +38,7 @@ spec: storageClassName: local-path replicas: 1 image: reg.vesoft-inc.com/nebula-graphd-ent - version: v3.5.0 + version: v3.6.0 metad: config: # A list of zones (e.g., AZ) split by comma @@ -53,7 +53,7 @@ spec: memory: "1Gi" replicas: 1 image: reg.vesoft-inc.com/nebula-metad-ent - version: v3.5.0 + version: v3.6.0 dataVolumeClaim: resources: requests: diff --git a/doc/user/local_pv_failover.md b/doc/user/local_pv_failover.md new file mode 100644 index 00000000..0dbb44d2 --- /dev/null +++ b/doc/user/local_pv_failover.md @@ -0,0 +1,40 @@ +## local PV failover + +Compared to network block storage, local storage is physically mounted to the virtual machine instance, providing superior +I/O operations per second (IOPS), and very low read-write latency due to this tight coupling. While using local storage +can enhance performance, it also requires certain trade-offs in terms of service availability, data persistence, and flexibility. +Because of these factors, local storage does not automatically replicate, so all data on local storage may be lost if the +virtual machine stops or is terminated for any reason. Nebula-graph's storage service itself has data redundancy capabilities, +storing three replicas for each partition. If a node fails, the partition associated with this node will re-elect a leader, +and the read-write operations will automatically shift to the healthy node. When using network block storage, if a machine fails, +the Pod can be rescheduled to a new machine and mount the original storage volume. But for local storage, due to node affinity +constraints, the Pod can only be in a Pending state affecting the overall availability of the cluster without unbinding the storage volume. + +### Solution +- nebula cluster status check is divided into two parts: the status of nebula service and k8s Node status. The nebula service will periodically +report heartbeat to the Meta service, so you can check the status of each service in the current cluster through the interface +exposed by the Meta service. +- When the host status of the Storage service is found to be "OFFLINE", update the host with the status of "OFFLINE" +to the status field of the resource object NebulaCluster for later fault transfer. +- In order to prevent misjudgment of the check, it is allowed to set the tolerance OFFLINE time, and the fault transfer +process will be executed after exceeding this period. + +The controller will perform the following operations while executing automatic failover: +- Attempt to restart the offline Storage Pod +- Verify if the offline Storage host has returned to its normal state. If it has, the subsequent steps will be skipped +- Submit balance data job to remove offline Storage host +- Delete the offline storage Pod and its associated PVC, which will schedule the Pod on other nodes +- Submit balance data job to balance partitions to the newly created Pod + + +Here is the configuration file for NebulaCluster, which enables automatic failover in local PV scenarios. +```yaml +spec: + # Enable failover + enableAutoFailover: true + # Duration for automatic failover after the storage host is offline + # default 5m + failoverPeriod: "2m" +``` + + diff --git a/doc/user/log_guide.md b/doc/user/log_guide.md index 4607c75b..06e1366b 100644 --- a/doc/user/log_guide.md +++ b/doc/user/log_guide.md @@ -1,4 +1,4 @@ -### Log rotation +## Log rotation We use the sidecar container to clean NebulaGraph logs and run logs archiving tasks every hour. @@ -53,7 +53,7 @@ spec: service: externalTrafficPolicy: Local type: NodePort - version: v3.5.0 + version: v3.6.0 imagePullPolicy: Always metad: config: @@ -71,7 +71,7 @@ spec: requests: cpu: 500m memory: 500Mi - version: v3.5.0 + version: v3.6.0 reference: name: statefulsets.apps version: v1 @@ -94,6 +94,6 @@ spec: requests: cpu: 500m memory: 500Mi - version: v3.5.0 + version: v3.6.0 unsatisfiableAction: ScheduleAnyway ``` diff --git a/doc/user/nebula_autoscaler.md b/doc/user/nebula_autoscaler.md index 25cee5fa..7bb29df0 100644 --- a/doc/user/nebula_autoscaler.md +++ b/doc/user/nebula_autoscaler.md @@ -1,4 +1,4 @@ -# nebula-autoscaler +## nebula-autoscaler The nebula-autoscaler is fully compatible with K8S HPA, and you can use it according to the operating mechanism of HPA. Currently, the nebula-autoscaler only supports automatic scaling of Graphd. diff --git a/doc/user/nebula_cluster_guide.md b/doc/user/nebula_cluster_guide.md new file mode 100644 index 00000000..f72485c3 --- /dev/null +++ b/doc/user/nebula_cluster_guide.md @@ -0,0 +1,167 @@ +## Install NebulaGraph cluster with helm + +Please install [nebula-operator](operator_guide.md) before installing NebulaGraph cluster. + +### Get repo Info + +```shell script +# If you have already added it, please skip. +$ helm repo add nebula-operator https://vesoft-inc.github.io/nebula-operator/charts +$ helm repo update +``` + +_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ + +### Install with helm + +```shell script +export NEBULA_CLUSTER_NAME=nebula # the name for nebula cluster +export NEBULA_CLUSTER_NAMESPACE=nebula # the namespace you want to install the nebula cluster +export STORAGE_CLASS_NAME=gp2 # the storage class for the nebula cluster + +$ kubectl create namespace "${NEBULA_CLUSTER_NAMESPACE}" # If you have already created it, please skip. +$ helm install "${NEBULA_CLUSTER_NAME}" nebula-operator/nebula-cluster \ + --namespace="${NEBULA_CLUSTER_NAMESPACE}" \ + --set nameOverride=${NEBULA_CLUSTER_NAME} \ + --set nebula.storageClassName="${STORAGE_CLASS_NAME}" + +# Please wait a while for the cluster to be ready. +$ kubectl -n "${NEBULA_CLUSTER_NAMESPACE}" get pod -l "app.kubernetes.io/cluster=${NEBULA_CLUSTER_NAME}" +NAME READY STATUS RESTARTS AGE +nebula-graphd-0 1/1 Running 0 5m34s +nebula-graphd-1 1/1 Running 0 5m34s +nebula-metad-0 1/1 Running 0 5m34s +nebula-metad-1 1/1 Running 0 5m34s +nebula-metad-2 1/1 Running 0 5m34s +nebula-storaged-0 1/1 Running 0 5m34s +nebula-storaged-1 1/1 Running 0 5m34s +nebula-storaged-2 1/1 Running 0 5m34s +``` + +### Upgrade with helm + +```shell +$ helm upgrade "${NEBULA_CLUSTER_NAME}" nebula-operator/nebula-cluster \ + --namespace="${NEBULA_CLUSTER_NAMESPACE}" \ + --set nameOverride=${NEBULA_CLUSTER_NAME} \ + --set nebula.storageClassName="${STORAGE_CLASS_NAME}" \ + --set nebula.storaged.replicas=5 + +# Please wait a while for the cluster to be ready. +$ kubectl -n "${NEBULA_CLUSTER_NAMESPACE}" get pod -l "app.kubernetes.io/cluster=${NEBULA_CLUSTER_NAME}" +NAME READY STATUS RESTARTS AGE +nebula-graphd-0 1/1 Running 0 10m +nebula-graphd-1 1/1 Running 0 10m +nebula-metad-0 1/1 Running 0 10m +nebula-metad-1 1/1 Running 0 10m +nebula-metad-2 1/1 Running 0 10m +nebula-storaged-0 1/1 Running 0 10m +nebula-storaged-1 1/1 Running 0 10m +nebula-storaged-2 1/1 Running 0 10m +nebula-storaged-3 1/1 Running 0 56s +nebula-storaged-4 1/1 Running 0 56s +``` + +### Uninstall with helm + +```shell +$ helm uninstall "${NEBULA_CLUSTER_NAME}" --namespace="${NEBULA_CLUSTER_NAMESPACE}" +``` + +### Optional: chart parameters + +The following table lists is the configurable parameters of the chart and their default values. + +| Parameter | Description | Default | +|:------------------------------------|:------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------| +| `nameOverride` | Override the name of the chart | `nil` | +| `nebula.version` | Nebula image tag | `v3.6.0` | +| `nebula.imagePullPolicy` | Nebula image pull policy | `Always` | +| `enablePVReclaim` | Flag to enable/disable PV reclaim while the Nebula cluster deleted | `false` | +| `enableBR` | Flag to enable/disable sidecar container nebula-agent injection | `false` | +| `enableForUpdate` | Flag to enable/disable rolling update without leader state transition | `false` | +| `nebula.storageClassName` | StorageClass object name | `""` | +| `nebula.schedulerName` | Scheduler for nebula component | `default-scheduler` | +| `nebula.topologySpreadConstraints` | Topology spread constraints to control how Pods are spread across failure-domains | `[]` | +| `nebula.reference` | Reference for nebula component | `{"name": "statefulsets.apps", "version": "v1"}` | +| `nebula.graphd.image` | Graphd container image without tag, and use `nebula.version` as tag | `vesoft/nebula-graphd` | +| `nebula.graphd.replicas` | Graphd replica number | `2` | +| `nebula.graphd.env` | Graphd container environment variables | `[]` | +| `nebula.graphd.resources` | Graphd resources | `{"resources":{"requests":{"cpu":"500m","memory":"500Mi"},"limits":{"cpu":"1","memory":"1Gi"}}}` | +| `nebula.graphd.logVolume` | Graphd log volume | `{"enable":true,"storage":"500Mi"}` | +| `nebula.graphd.podLabels` | Graphd pod labels | `{}` | +| `nebula.graphd.podAnnotations` | Graphd pod annotations | `{}` | +| `nebula.graphd.SecurityContext` | Graphd security context | `{}` | +| `nebula.graphd.nodeSelector` | Graphd nodeSelector | `{}` | +| `nebula.graphd.tolerations` | Graphd pod tolerations | `[]` | +| `nebula.graphd.affinity` | Graphd affinity | `{}` | +| `nebula.graphd.readinessProbe` | Graphd pod readinessProbe | `{}` | +| `nebula.graphd.livenessProbe` | Graphd pod livenessProbe | `{}` | +| `nebula.graphd.initContainers` | Graphd pod init containers | `[]` | +| `nebula.graphd.sidecarContainers` | Graphd pod sidecar containers | `[]` | +| `nebula.graphd.volumes` | Graphd pod volumes | `[]` | +| `nebula.graphd.volumeMounts` | Graphd pod volume mounts | `[]` | +| `nebula.metad.image` | Metad container image without tag, and use `nebula.version` as tag | `vesoft/nebula-metad` | +| `nebula.metad.replicas` | Metad replica number | `3` | +| `nebula.metad.env` | Metad container environment variables | `[]` | +| `nebula.metad.resources` | Metad resources | `{"resources":{"requests":{"cpu":"500m","memory":"500Mi"},"limits":{"cpu":"1","memory":"1Gi"}}}` | +| `nebula.metad.logVolume` | Metad log volum | `{"enable":true,"storage":"500Mi"}` | +| `nebula.metad.dataVolume` | Metad data volume | `[]` | +| `nebula.metad.podLabels` | Metad pod labels | `{}` | +| `nebula.metad.podAnnotations` | Metad pod annotations | `{}` | +| `nebula.metad.SecurityContext` | Metad security context | `{}` | +| `nebula.metad.nodeSelector` | Metad nodeSelector | `{}` | +| `nebula.metad.tolerations` | Metad pod tolerations | `[]` | +| `nebula.metad.affinity` | Metad affinity | `{}` | +| `nebula.metad.readinessProbe` | Metad pod readinessProbe | `{}` | +| `nebula.metad.livenessProbe` | Metad pod livenessProbe | `{}` | +| `nebula.metad.initContainers` | Metad pod init containers | `[]` | +| `nebula.metad.sidecarContainers` | Metad pod sidecar containers | `[]` | +| `nebula.metad.volumes` | Metad pod volumes | `[]` | +| `nebula.metad.volumeMounts` | Metad pod volume mounts | `[]` | +| `nebula.storaged.image` | Storaged container image without tag, and use `nebula.version` as tag | `vesoft/nebula-storaged` | +| `nebula.storaged.replicas` | Storaged replica number | `3` | +| `nebula.storaged.env` | Storaged container environment variables | `[]` | +| `nebula.storaged.resources` | Storaged resources | `{"resources":{"requests":{"cpu":"500m","memory":"500Mi"},"limits":{"cpu":"1","memory":"1Gi"}}}` | +| `nebula.storaged.logVolume` | Storaged log volume | `{"enable":true,"storage":"500Mi"}` | +| `nebula.storaged.dataVolumes` | Storaged data volumes | `[]` | +| `nebula.storaged.podLabels` | Storaged pod labels | `{}` | +| `nebula.storaged.podAnnotations` | Storaged pod annotations | `{}` | +| `nebula.storaged.SecurityContext` | Storaged security context | `{}` | +| `nebula.storaged.nodeSelector` | Storaged nodeSelector | `{}` | +| `nebula.storaged.tolerations` | Storaged pod tolerations | `[]` | +| `nebula.storaged.affinity` | Storaged affinity | `{}` | +| `nebula.storaged.readinessProbe` | Storaged pod readinessProbe | `{}` | +| `nebula.storaged.livenessProbe` | Storaged pod livenessProbe | `{}` | +| `nebula.storaged.initContainers` | Stroaged pod init containers | `[]` | +| `nebula.storaged.sidecarContainers` | Storaged pod sidecar containers | `[]` | +| `nebula.storaged.volumes` | Storaged pod volumes | `[]` | +| `nebula.storaged.volumeMounts` | Storaged pod volume mounts | `[]` | +| `nebula.exporter.image` | Exporter container image without tag | `vesoft/nebula-stats-exporter` | +| `nebula.exporter.version` | Exporter container image tag | `v3.3.0` | +| `nebula.exporter.replicas` | Exporter replica number | `1` | +| `nebula.exporter.env` | Exporter container environment variables | `[]` | +| `nebula.exporter.resources` | Exporter resources | `{"resources":{"requests":{"cpu":"100m","memory":"128Mi"},"limits":{"cpu":"200m","memory":"256Mi"}}}` | +| `nebula.exporter.podLabels` | Exporter pod labels | `{}` | +| `nebula.exporter.podAnnotations` | Exporter pod annotations | `{}` | +| `nebula.exporter.nodeSelector` | Exporter nodeSelector | `{}` | +| `nebula.exporter.tolerations` | Exporter pod tolerations | `[]` | +| `nebula.exporter.affinity` | Exporter affinity | `{}` | +| `nebula.exporter.readinessProbe` | Exporter pod readinessProbe | `{}` | +| `nebula.exporter.livenessProbe` | Exporter pod livenessProbe | `{}` | +| `nebula.exporter.initContainers` | Exporter pod init containers | `[]` | +| `nebula.exporter.sidecarContainers` | Exporter pod sidecar containers | `[]` | +| `nebula.exporter.volumes` | Exporter pod volumes | `[]` | +| `nebula.exporter.volumeMounts` | Exporter pod volume mounts | `[]` | +| `nebula.exporter.maxRequests` | Maximum number of parallel scrape requests. Use 0 to disable. | `20` | +| `nebula.agent.image` | Agent container image without tag | `vesoft/nebula-agent` | +| `nebula.agent.version` | Agent container image tag | `latest` | +| `nebula.agent.resources` | Agent resources | `{"resources":{"requests":{"cpu":"100m","memory":"128Mi"},"limits":{"cpu":"200m","memory":"256Mi"}}}` | +| `nebula.console.image` | nebula console container image without tag | `vesoft/nebula-console` | +| `nebula.console.version` | nebula console container image tag | `latest` | +| `nebula.console.username` | nebula cluster username | `root` | +| `nebula.console.password` | nebula cluster password | `nebula` | +| `nebula.console.nodeSelector` | nebula console nodeSelector | `{}` | +| `imagePullSecrets` | The secret to use for pulling the images | `[]` | +| `logRotate` | The nebula pod log rotate configuration | `{}` | +| `alpineImage` | Nebula alpine image | `""` | \ No newline at end of file diff --git a/doc/user/nebula_cluster_helm_guide.md b/doc/user/nebula_cluster_helm_guide.md deleted file mode 100644 index b0000de0..00000000 --- a/doc/user/nebula_cluster_helm_guide.md +++ /dev/null @@ -1,158 +0,0 @@ -# Install NebulaGraph cluster with helm - -Please install [nebula-operator](install_guide.md) before installing NebulaGraph cluster. - -### Get repo Info - -```shell script -# If you have already added it, please skip. -$ helm repo add nebula-operator https://vesoft-inc.github.io/nebula-operator/charts -$ helm repo update -``` - -_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ - -### Install with helm - -```shell script -export NEBULA_CLUSTER_NAME=nebula # the name for nebula cluster -export NEBULA_CLUSTER_NAMESPACE=nebula # the namespace you want to install the nebula cluster -export STORAGE_CLASS_NAME=gp2 # the storage class for the nebula cluster - -$ kubectl create namespace "${NEBULA_CLUSTER_NAMESPACE}" # If you have already created it, please skip. -$ helm install "${NEBULA_CLUSTER_NAME}" nebula-operator/nebula-cluster \ - --namespace="${NEBULA_CLUSTER_NAMESPACE}" \ - --set nameOverride=${NEBULA_CLUSTER_NAME} \ - --set nebula.storageClassName="${STORAGE_CLASS_NAME}" - -# Please wait a while for the cluster to be ready. -$ kubectl -n "${NEBULA_CLUSTER_NAMESPACE}" get pod -l "app.kubernetes.io/cluster=${NEBULA_CLUSTER_NAME}" -NAME READY STATUS RESTARTS AGE -nebula-graphd-0 1/1 Running 0 5m34s -nebula-graphd-1 1/1 Running 0 5m34s -nebula-metad-0 1/1 Running 0 5m34s -nebula-metad-1 1/1 Running 0 5m34s -nebula-metad-2 1/1 Running 0 5m34s -nebula-storaged-0 1/1 Running 0 5m34s -nebula-storaged-1 1/1 Running 0 5m34s -nebula-storaged-2 1/1 Running 0 5m34s -``` - -### Upgrade with helm - -```shell -$ helm upgrade "${NEBULA_CLUSTER_NAME}" nebula-operator/nebula-cluster \ - --namespace="${NEBULA_CLUSTER_NAMESPACE}" \ - --set nameOverride=${NEBULA_CLUSTER_NAME} \ - --set nebula.storageClassName="${STORAGE_CLASS_NAME}" \ - --set nebula.storaged.replicas=5 - -# Please wait a while for the cluster to be ready. -$ kubectl -n "${NEBULA_CLUSTER_NAMESPACE}" get pod -l "app.kubernetes.io/cluster=${NEBULA_CLUSTER_NAME}" -NAME READY STATUS RESTARTS AGE -nebula-graphd-0 1/1 Running 0 10m -nebula-graphd-1 1/1 Running 0 10m -nebula-metad-0 1/1 Running 0 10m -nebula-metad-1 1/1 Running 0 10m -nebula-metad-2 1/1 Running 0 10m -nebula-storaged-0 1/1 Running 0 10m -nebula-storaged-1 1/1 Running 0 10m -nebula-storaged-2 1/1 Running 0 10m -nebula-storaged-3 1/1 Running 0 56s -nebula-storaged-4 1/1 Running 0 56s -``` - -### Uninstall with helm - -```shell -$ helm uninstall "${NEBULA_CLUSTER_NAME}" --namespace="${NEBULA_CLUSTER_NAMESPACE}" -``` - -### Optional: chart parameters - -The following table lists is the configurable parameters of the chart and their default values. - -| Parameter | Description | Default | -|:-------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------| -| `nameOverride` | Override the name of the chart | `nil` | -| `nebula.version` | Nebula image tag | `v3.6.0` | -| `nebula.imagePullPolicy` | Nebula image pull policy | `Always` | -| `enablePVReclaim` | Flag to enable/disable PV reclaim while the Nebula cluster deleted | `false` | -| `enableBR` | Flag to enable/disable sidecar container nebula-agent injection | `false` | -| `enableForUpdate` | Flag to enable/disable rolling update without leader state transition | `false` | -| `nebula.storageClassName` | StorageClass object name | `""` | -| `nebula.schedulerName` | Scheduler for nebula component | `default-scheduler` | -| `nebula.topologySpreadConstraints` | Topology spread constraints to control how Pods are spread across failure-domains | `[]` | -| `nebula.reference` | Reference for nebula component | `{"name": "statefulsets.apps", "version": "v1"}` | -| `nebula.graphd.image` | Graphd container image without tag, and use `nebula.version` as tag | `vesoft/nebula-graphd` | -| `nebula.graphd.replicas` | Graphd replica number | `2` | -| `nebula.graphd.env` | Graphd container environment variables | `[]` | -| `nebula.graphd.resources` | Graphd resources | `{"resources":{"requests":{"cpu":"500m","memory":"500Mi"},"limits":{"cpu":"1","memory":"1Gi"}}}` | -| `nebula.graphd.logStorage` | Graphd log volume size | `1Gi` | -| `nebula.graphd.podLabels` | Graphd pod labels | `{}` | -| `nebula.graphd.podAnnotations` | Graphd pod annotations | `{}` | -| `nebula.graphd.nodeSelector` | Graphd nodeSelector | `{}` | -| `nebula.graphd.tolerations` | Graphd pod tolerations | `[]` | -| `nebula.graphd.affinity` | Graphd affinity | `{}` | -| `nebula.graphd.readinessProbe` | Graphd pod readinessProbe | `{}` | -| `nebula.graphd.livenessProbe` | Graphd pod livenessProbe | `{}` | -| `nebula.graphd.initContainers` | Graphd pod init containers | `[]` | -| `nebula.graphd.sidecarContainers` | Graphd pod sidecar containers | `[]` | -| `nebula.graphd.volumes` | Graphd pod volumes | `[]` | -| `nebula.graphd.volumeMounts` | Graphd pod volume mounts | `[]` | -| `nebula.metad.image` | Metad container image without tag, and use `nebula.version` as tag | `vesoft/nebula-metad` | -| `nebula.metad.replicas` | Metad replica number | `3` | -| `nebula.metad.env` | Metad container environment variables | `[]` | -| `nebula.metad.resources` | Metad resources | `{"resources":{"requests":{"cpu":"500m","memory":"500Mi"},"limits":{"cpu":"1","memory":"1Gi"}}}` | -| `nebula.metad.logStorage` | Metad log volume size | `1Gi` | -| `nebula.metad.dataStorage` | Metad data volume size | `5Gi` | -| `nebula.metad.podLabels` | Metad pod labels | `{}` | -| `nebula.metad.podAnnotations` | Metad pod annotations | `{}` | -| `nebula.metad.nodeSelector` | Metad nodeSelector | `{}` | -| `nebula.metad.tolerations` | Metad pod tolerations | `[]` | -| `nebula.metad.affinity` | Metad affinity | `{}` | -| `nebula.metad.readinessProbe` | Metad pod readinessProbe | `{}` | -| `nebula.metad.livenessProbe` | Metad pod livenessProbe | `{}` | -| `nebula.metad.initContainers` | Metad pod init containers | `[]` | -| `nebula.metad.sidecarContainers` | Metad pod sidecar containers | `[]` | -| `nebula.metad.volumes` | Metad pod volumes | `[]` | -| `nebula.metad.volumeMounts` | Metad pod volume mounts | `[]` | -| `nebula.storaged.image` | Storaged container image without tag, and use `nebula.version` as tag | `vesoft/nebula-storaged` | -| `nebula.storaged.replicas` | Storaged replica number | `3` | -| `nebula.storaged.env` | Storaged container environment variables | `[]` | -| `nebula.storaged.resources` | Storaged resources | `{"resources":{"requests":{"cpu":"500m","memory":"500Mi"},"limits":{"cpu":"1","memory":"1Gi"}}}` | -| `nebula.storaged.logStorage` | Storaged log volume size | `1Gi` | -| `nebula.storaged.dataStorage` | Storaged data volume size | `10Gi` | -| `nebula.storaged.podLabels` | Storaged pod labels | `{}` | -| `nebula.storaged.podAnnotations` | Storaged pod annotations | `{}` | -| `nebula.storaged.nodeSelector` | Storaged nodeSelector | `{}` | -| `nebula.storaged.tolerations` | Storaged pod tolerations | `[]` | -| `nebula.storaged.affinity` | Storaged affinity | `{}` | -| `nebula.storaged.readinessProbe` | Storaged pod readinessProbe | `{}` | -| `nebula.storaged.livenessProbe` | Storaged pod livenessProbe | `{}` | -| `nebula.storaged.initContainers` | Stroaged pod init containers | `[]` | -| `nebula.storaged.sidecarContainers` | Storaged pod sidecar containers | `[]` | -| `nebula.storaged.volumes` | Storaged pod volumes | `[]` | -| `nebula.storaged.volumeMounts` | Storaged pod volume mounts | `[]` | -| `nebula.exporter.image` | Exporter container image without tag | `vesoft/nebula-stats-exporter` | -| `nebula.exporter.version` | Exporter container image tag | `v3.3.0` | -| `nebula.exporter.replicas` | Exporter replica number | `1` | -| `nebula.exporter.env` | Exporter container environment variables | `[]` | -| `nebula.exporter.resources` | Exporter resources | `{"resources":{"requests":{"cpu":"100m","memory":"128Mi"},"limits":{"cpu":"200m","memory":"256Mi"}}}` | -| `nebula.exporter.podLabels` | Exporter pod labels | `{}` | -| `nebula.exporter.podAnnotations` | Exporter pod annotations | `{}` | -| `nebula.exporter.nodeSelector` | Exporter nodeSelector | `{}` | -| `nebula.exporter.tolerations` | Exporter pod tolerations | `[]` | -| `nebula.exporter.affinity` | Exporter affinity | `{}` | -| `nebula.exporter.readinessProbe` | Exporter pod readinessProbe | `{}` | -| `nebula.exporter.livenessProbe` | Exporter pod livenessProbe | `{}` | -| `nebula.exporter.initContainers` | Exporter pod init containers | `[]` | -| `nebula.exporter.sidecarContainers` | Exporter pod sidecar containers | `[]` | -| `nebula.exporter.volumes` | Exporter pod volumes | `[]` | -| `nebula.exporter.volumeMounts` | Exporter pod volume mounts | `[]` | -| `nebula.exporter.maxRequests` | Maximum number of parallel scrape requests. Use 0 to disable. | `20` | -| `nebula.agent.image` | Agent container image without tag | `vesoft/nebula-agent` | -| `nebula.agent.version` | Agent container image tag | `latest` | -| `nebula.agent.resources` | Agent resources | `{"resources":{"requests":{"cpu":"100m","memory":"128Mi"},"limits":{"cpu":"200m","memory":"256Mi"}}}` | -| `imagePullSecrets` | The secret to use for pulling the images | `[]` | -| `logRotate` | The nebula pod log rotate configuration | `{}` | diff --git a/doc/user/nebula_console.md b/doc/user/nebula_console.md index 9b07ea03..44e71be5 100644 --- a/doc/user/nebula_console.md +++ b/doc/user/nebula_console.md @@ -14,7 +14,7 @@ spec: console: image: vesoft/nebula-console version: nightly - user: "demo" + username: "demo" password: "test" ``` diff --git a/doc/user/nebula_port.md b/doc/user/nebula_port.md index 6ffa0b17..10241527 100644 --- a/doc/user/nebula_port.md +++ b/doc/user/nebula_port.md @@ -1,4 +1,4 @@ -### Nebula port configurable +## Nebula port configurable We provide the fields `config` in CRD to define the port settings for each component in NebulaGraph. Here is the configuration file for NebulaCluster which have a custom port and http port: diff --git a/doc/user/ngctl_guide.md b/doc/user/ngctl_guide.md index a004fe59..64bbb8cc 100644 --- a/doc/user/ngctl_guide.md +++ b/doc/user/ngctl_guide.md @@ -1,5 +1,5 @@ +## ngctl -# Overview ngctl is a terminal cmd tool for NebulaGraph managed by nebula-operator, it has the following commands: - [ngctl use](#ngctl-use) - [ngctl console](#ngctl-console) @@ -7,7 +7,7 @@ ngctl is a terminal cmd tool for NebulaGraph managed by nebula-operator, it has - [ngctl check](#ngctl-check) - [ngctl info](#ngctl-info) -## ngctl use +### ngctl use `ngctl use` specify a nebula cluster to use. By using a certain cluster, you may omit --nebulacluster option in many control commands. ``` @@ -18,7 +18,7 @@ Examples: # specify the cluster name and namespace ngctl use demo-cluster -n test-system ``` -## ngctl console +### ngctl console `ngctl console` create a nebula-console pod and connect to the specified nebula cluster. ``` @@ -29,7 +29,7 @@ Examples: # Open console to the specified nebula cluster ngctl console --nebulacluster=nebula ``` -## ngctl list +### ngctl list `ngctl list` list nebula clusters or there sub resources. Its usage is the same as `kubectl get`, but only resources related to nbuela cluster are displayed. ``` Examples: @@ -52,7 +52,7 @@ Examples: ngctl list -o custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,IMAGE:.spec.graphd.image ``` -## ngctl check +### ngctl check `ngctl check` check whether the specified nebula cluster resources are ready. Command will print the error message from nebula cluster resource conditions, help you locate the reason quickly. ``` @@ -64,7 +64,7 @@ Examples: ngctl check pods --nebulacluster=nebula ``` -## ngctl info +### ngctl info `ngctl info` get current nebula cluster information, the cluster is set by 'ngctl use' command or use `--nebulacluster` flag. ```Examples: @@ -74,7 +74,7 @@ Examples: # get current nebula cluster information, which is set by '--nebulacluster' flag ngctl info --nebulacluster=nebula ``` -## ngctl version +### ngctl version `nfgctl version` print the cli and nebula operator version ```bash diff --git a/doc/user/install_guide.md b/doc/user/operator_guide.md similarity index 99% rename from doc/user/install_guide.md rename to doc/user/operator_guide.md index 40b1d78d..f752f2e3 100644 --- a/doc/user/install_guide.md +++ b/doc/user/operator_guide.md @@ -1,4 +1,4 @@ -# Install Guide +## Install Guide Instead of manually installing, scaling, upgrading, and uninstalling NebulaGraph in a production environment, you can use the Nebula [operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) to manage NebulaGraph automatically. diff --git a/doc/user/pv_expansion.md b/doc/user/pv_expansion.md index 2c312791..0ac37907 100644 --- a/doc/user/pv_expansion.md +++ b/doc/user/pv_expansion.md @@ -1,4 +1,4 @@ -# PV Expansion +## PV Expansion Volume expansion was introduced as an alpha feature in Kubernetes 1.8, and it went beta in 1.11 and with Kubernetes 1.24 we are excited to announce general availability(GA) of volume expansion. diff --git a/doc/user/pv_reclaim.md b/doc/user/pv_reclaim.md index fbc019a1..d2e576d6 100644 --- a/doc/user/pv_reclaim.md +++ b/doc/user/pv_reclaim.md @@ -1,4 +1,4 @@ -# PV Reclaim +## PV Reclaim Nebula Operator uses [PV (Persistent Volume)](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) to store persistent data. If you accidentally delete a NebulaGraph cluster, the PV objects and data are still retained to ensure diff --git a/doc/user/restart_cluster.md b/doc/user/restart_cluster.md new file mode 100644 index 00000000..f56a403f --- /dev/null +++ b/doc/user/restart_cluster.md @@ -0,0 +1,73 @@ +## Restart cluster + +The essence of Pod restarting is to reboot the service process. In daily maintenance, for various reasons, it may be necessary +to restart a certain service of the Nebula cluster, such as abnormal Pod status or the execution of forced restart logic. +Nebula-operator provides the ability to elegantly roll-restart all Pods within a certain service of the cluster, or elegantly +restart a single Storage Pod. + +Cluster restart is triggered through Annotation, providing two operations: +- Restart all Pods of the component, `nebula-graph.io/restart-timestamp` +- Restart the specified Pod of the component, `nebula-graph.io/restart-ordinal`, Storage supports graceful restart, +Meta and Graph service can directly delete Pod. + +```shell +# Get timestamp +$ date -u +%s +1699770225 + +# Triggers a rolling restart of the component +$ kubectl annotate sts nebula-graphd nebula-graph.io/restart-timestamp="1699770225" --overwrite +statefulset.apps/nebula-graphd annotate + +# Watch restart event +$ kubectl get pods -l app.kubernetes.io/cluster=nebula,app.kubernetes.io/component=graphd -w +NAME READY STATUS RESTARTS AGE +nebula-graphd-0 1/1 Running 0 4m24s + + +------------------ +# Triggers storaged-1 restart +$ kubectl annotate sts nebula-storaged nebula-graph.io/restart-ordinal="1" +statefulset.apps/nebula-storaged annotate + +# Watch logs +I1112 14:39:37.934046 3170806 storage_client.go:86] start transfer leader spaceID 5 partitionID 45 +I1112 14:39:42.938781 3170806 storaged_updater.go:389] storaged cluster [default/nebula-storaged] transfer leader spaceID 5 partitionID 45 to host nebula-storaged-3.nebula-storaged-headless.default.svc.cluster.local successfully +I1112 14:39:42.938839 3170806 storage_client.go:86] start transfer leader spaceID 5 partitionID 42 +I1112 14:39:47.941335 3170806 storaged_updater.go:389] storaged cluster [default/nebula-storaged] transfer leader spaceID 5 partitionID 42 to host nebula-storaged-0.nebula-storaged-headless.default.svc.cluster.local successfully +I1112 14:39:47.941390 3170806 storage_client.go:86] start transfer leader spaceID 5 partitionID 40 +I1112 14:39:52.943926 3170806 storaged_updater.go:389] storaged cluster [default/nebula-storaged] transfer leader spaceID 5 partitionID 40 to host nebula-storaged-0.nebula-storaged-headless.default.svc.cluster.local successfully +I1112 14:39:52.943971 3170806 storage_client.go:86] start transfer leader spaceID 5 partitionID 34 +I1112 14:39:57.946534 3170806 storaged_updater.go:389] storaged cluster [default/nebula-storaged] transfer leader spaceID 5 partitionID 34 to host nebula-storaged-4.nebula-storaged-headless.default.svc.cluster.local successfully +I1112 14:39:57.946576 3170806 storage_client.go:86] start transfer leader spaceID 5 partitionID 31 +I1112 14:40:02.949196 3170806 storaged_updater.go:389] storaged cluster [default/nebula-storaged] transfer leader spaceID 5 partitionID 31 to host nebula-storaged-0.nebula-storaged-headless.default.svc.cluster.local successfully + +# Watch restart event +$ kubectl get pods -l app.kubernetes.io/cluster=nebula,app.kubernetes.io/component=storaged -w +NAME READY STATUS RESTARTS AGE +nebula-storaged-0 1/1 Running 0 13h +nebula-storaged-1 1/1 Running 0 13h +nebula-storaged-2 1/1 Running 0 13h +nebula-storaged-3 1/1 Running 0 13h +nebula-storaged-4 1/1 Running 0 13h +nebula-storaged-5 1/1 Running 0 12h +nebula-storaged-6 1/1 Running 0 12h +nebula-storaged-7 1/1 Running 0 12h +nebula-storaged-8 1/1 Running 0 12h + + +nebula-storaged-1 1/1 Running 0 13h +nebula-storaged-1 1/1 Terminating 0 13h +nebula-storaged-1 0/1 Terminating 0 13h +nebula-storaged-1 0/1 Terminating 0 13h +nebula-storaged-1 0/1 Terminating 0 13h +nebula-storaged-1 0/1 Terminating 0 13h +nebula-storaged-1 0/1 Pending 0 0s +nebula-storaged-1 0/1 Pending 0 0s +nebula-storaged-1 0/1 ContainerCreating 0 0s +nebula-storaged-1 0/1 Running 0 1s +nebula-storaged-1 1/1 Running 0 10s + + + +``` \ No newline at end of file diff --git a/doc/user/security_context.md b/doc/user/security_context.md index b5a2e0e9..e393fabc 100644 --- a/doc/user/security_context.md +++ b/doc/user/security_context.md @@ -30,5 +30,5 @@ spec: storageClassName: local-path replicas: 1 image: vesoft/nebula-graphd - version: v3.5.0 + version: v3.6.0 ``` diff --git a/doc/user/ssl_guide.md b/doc/user/ssl_guide.md index a8e67a54..7738c56d 100644 --- a/doc/user/ssl_guide.md +++ b/doc/user/ssl_guide.md @@ -1,4 +1,4 @@ -### SSL encryption +## SSL encryption NebulaGraph supports data transmission with SSL encryption between clients, the Graph service, the Meta service, and the Storage service. This topic describes how to enable SSL encryption. diff --git a/doc/user/suspend_cluster.md b/doc/user/suspend_cluster.md new file mode 100644 index 00000000..5466a82d --- /dev/null +++ b/doc/user/suspend_cluster.md @@ -0,0 +1,66 @@ +## Suspend cluster + +After suspend the cluster, cluster configuration and storage volumes are reserved, resources occupied by the nebula cluster +will be released. + +```shell +$ kubectl patch nc nebula --type='merge' --patch '{"spec": {"suspend":true}}' +nebulacluster.apps.nebula-graph.io/nebula patched + +# Check the status +$ kubectl get nc nebula +NAME READY GRAPHD-DESIRED GRAPHD-READY METAD-DESIRED METAD-READY STORAGED-DESIRED STORAGED-READY AGE +nebula False 1 1 9 15h + +# phase is Suspend +status: + conditions: + - lastTransitionTime: "2023-11-12T06:54:13Z" + lastUpdateTime: "2023-11-12T06:54:13Z" + message: Workload is in progress + reason: WorkloadNotUpToDate + status: "False" + type: Ready + graphd: + phase: Suspend + version: v3.6.0 + metad: + phase: Suspend + version: v3.6.0 + observedGeneration: 8 + storaged: + balancedAfterFailover: true + phase: Suspend + version: v3.6.0 + version: 3.6.0 + +------------------- +# Recovery cluster +$ kubectl patch nc nebula --type='merge' --patch '{"spec": {"suspend":null}}' +nebulacluster.apps.nebula-graph.io/nebula patched + +# Watch the status +$ kubectl get nc nebula -w +NAME READY GRAPHD-DESIRED GRAPHD-READY METAD-DESIRED METAD-READY STORAGED-DESIRED STORAGED-READY AGE +nebula False 1 1 9 16h +nebula False 1 1 9 16h +nebula False 1 1 1 9 16h +nebula False 1 1 1 9 16h +nebula False 1 1 1 9 16h +nebula False 1 1 1 9 16h +nebula False 1 1 1 9 3 16h +nebula False 1 1 1 9 4 16h + +nebula False 1 1 1 9 5 16h +nebula False 1 1 1 9 6 16h +nebula False 1 1 1 9 8 16h +nebula False 1 1 1 1 9 8 16h +nebula False 1 1 1 1 9 8 16h +nebula False 1 1 1 1 9 8 16h +nebula False 1 1 1 9 8 16h +nebula False 1 1 1 9 8 16h +nebula False 1 1 1 9 8 16h +nebula False 1 1 1 9 8 16h +nebula False 1 1 1 9 9 16h +nebula True 1 1 1 1 9 9 16h +``` diff --git a/doc/user/webhook.md b/doc/user/webhook.md index f5bc34df..f3bec3d0 100644 --- a/doc/user/webhook.md +++ b/doc/user/webhook.md @@ -1,4 +1,4 @@ -# Admission webhook +## Admission webhook Admission webhooks are HTTP callbacks that receive admission requests and do something with them. There are two types of admission webhooks, validating admission webhook and mutating admission webhook. Mutating admission webhooks are invoked first, and can modify objects sent to the API server diff --git a/pkg/controller/provisioner/provisioner.go b/pkg/controller/provisioner/provisioner.go index f3504912..f99c10ad 100644 --- a/pkg/controller/provisioner/provisioner.go +++ b/pkg/controller/provisioner/provisioner.go @@ -366,18 +366,16 @@ func saveHelperPodLogs(c clientset.Interface, pod *corev1.Pod) error { if err != nil { return fmt.Errorf("faild to open stream: %v", err) } + defer readCloser.Close() - buf := new(bytes.Buffer) - _, err = io.Copy(buf, readCloser) + logs, err := flushStream(readCloser) if err != nil { - return fmt.Errorf("failed to copy buffer: %v", err) + return err } - readCloser.Close() klog.Infof("Start of %s logs", pod.Name) - bufferStr := buf.String() - if len(bufferStr) > 0 { - podLogs := strings.Split(strings.Trim(bufferStr, "\n"), "\n") + if len(logs) > 0 { + podLogs := strings.Split(strings.Trim(logs, "\n"), "\n") for _, log := range podLogs { klog.Info(log) } @@ -386,6 +384,16 @@ func saveHelperPodLogs(c clientset.Interface, pod *corev1.Pod) error { return nil } +func flushStream(rc io.ReadCloser) (string, error) { + var buf = &bytes.Buffer{} + _, err := io.Copy(buf, rc) + if err != nil { + return "", fmt.Errorf("failed to copy buffer: %v", err) + } + logContent := buf.String() + return logContent, nil +} + func getHelperPodName(action ActionType, pvName string) string { return "helper-pod" + "-" + string(action) + "-" + pvName } From 6c79567882f7160e1fa6e53a1d7acc1aff022f25 Mon Sep 17 00:00:00 2001 From: MegaByte875 Date: Sat, 2 Dec 2023 17:43:34 +0800 Subject: [PATCH 2/2] use proper noun --- doc/user/local_pv_failover.md | 12 ++++++------ doc/user/storage_guide.md | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/user/local_pv_failover.md b/doc/user/local_pv_failover.md index 0dbb44d2..0951a32c 100644 --- a/doc/user/local_pv_failover.md +++ b/doc/user/local_pv_failover.md @@ -14,16 +14,16 @@ constraints, the Pod can only be in a Pending state affecting the overall availa - nebula cluster status check is divided into two parts: the status of nebula service and k8s Node status. The nebula service will periodically report heartbeat to the Meta service, so you can check the status of each service in the current cluster through the interface exposed by the Meta service. -- When the host status of the Storage service is found to be "OFFLINE", update the host with the status of "OFFLINE" +- When the host status of the Storaged service is found to be "OFFLINE", update the host with the status of "OFFLINE" to the status field of the resource object NebulaCluster for later fault transfer. - In order to prevent misjudgment of the check, it is allowed to set the tolerance OFFLINE time, and the fault transfer process will be executed after exceeding this period. The controller will perform the following operations while executing automatic failover: -- Attempt to restart the offline Storage Pod -- Verify if the offline Storage host has returned to its normal state. If it has, the subsequent steps will be skipped -- Submit balance data job to remove offline Storage host -- Delete the offline storage Pod and its associated PVC, which will schedule the Pod on other nodes +- Attempt to restart the offline Storaged Pod +- Verify if the offline Storaged host has returned to its normal state. If it has, the subsequent steps will be skipped +- Submit balance data job to remove offline Storaged host +- Delete the offline Storaged Pod and its associated PVC, which will schedule the Pod on other nodes - Submit balance data job to balance partitions to the newly created Pod @@ -32,7 +32,7 @@ Here is the configuration file for NebulaCluster, which enables automatic failov spec: # Enable failover enableAutoFailover: true - # Duration for automatic failover after the storage host is offline + # Duration for automatic failover after the storaged host is offline # default 5m failoverPeriod: "2m" ``` diff --git a/doc/user/storage_guide.md b/doc/user/storage_guide.md index e7f0f364..68e1199f 100644 --- a/doc/user/storage_guide.md +++ b/doc/user/storage_guide.md @@ -1,6 +1,6 @@ ## Scale storage nodes and balance -Scaling out Storage is divided into two stages. +Scaling out Storaged is divided into two stages. * In the first stage, you need to wait for the status of all newly created Pods to be Ready. @@ -12,10 +12,10 @@ Such an implementation can effectively reduce the impact of data migration on on ## Storage leaders transfer -When NebulaGraph starts to provide services, there will be multiple partition leaders on each storage node, +When NebulaGraph starts to provide services, there will be multiple partition leaders on each Storaged node, in the rolling update scenario, in order to minimize the impact on client reads and writes, so it is necessary to transfer the leader to other nodes until the number of leaders on a storage node is 0, this process is relatively long. -To make rolling updates more convenient for DBA, we provide a field `enableForceUpdate` for storage service, +To make rolling updates more convenient for DBA, we provide a field `enableForceUpdate` for Storaged service, which can directly roll update storage when it is determined that there is no external access traffic, without waiting for the partition leader to be transferred before it can operate. \ No newline at end of file