Compare commits

...

80 Commits

Author SHA1 Message Date
renovate[bot] b9cabb2e09 fix(deps): update longhorn branch repo dependencies to v1.9.1 2025-07-27 06:27:34 +00:00
David Ko 979b8d559b release: update version file for v1.9.1
Signed-off-by: David Ko <dko@suse.com>
2025-07-22 22:00:40 +00:00
renovate[bot] 82510b717b fix(deps): update patch digest dependencies 2025-07-20 06:21:22 +00:00
Derek Su e4f4736028 fix: revert "fix: check backup target status before backup creation"
This reverts commit 0ac64f1d1a.

The backport should be in v1.9.2 instead.

Longhorn 10085

Signed-off-by: Derek Su <derek.su@suse.com>
2025-07-18 19:01:37 +08:00
nina zhan 0ac64f1d1a fix: check backup target status before backup creation
check if the backup target is available before creating a backup,
backup backing image, and system backup.

ref #10085

Signed-off-by: nina zhan <ninazhan666@gmail.com>
(cherry picked from commit 00fb7c6e65)
2025-07-17 16:42:05 -07:00
David Ko 1477720686 release: update version file for v1.9.1-rc1
Signed-off-by: David Ko <dko@suse.com>
2025-07-16 00:23:19 +00:00
renovate[bot] 47b135df6e fix(deps): update github.com/longhorn/go-iscsi-helper digest to 69ce6f3 2025-07-13 14:42:40 +00:00
renovate[bot] 768e06189a fix(deps): update patch digest dependencies 2025-07-13 06:27:52 +00:00
Derek Su bb02bf8c48 chore(workflow): replace tibdex/github-app-token with actions/create-github-app-token
Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit 7234295e83)
2025-07-11 19:30:28 +08:00
Derek Su da623fa463 chore(workflow): add workflow_dispatch for create-crd-update-pr-in-longhorn-repo.yml
Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit 4ddb6cb733)

# Conflicts:
#	.github/workflows/create-crd-update-pr-in-longhorn-repo.yml
2025-07-11 19:30:28 +08:00
Derek Su 6ab392b0ad chore(workflow): generate longhorn-github-bot token for create-crd-update-pr-in-longhorn-repo.yml
Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit e4e7f35a8e)

# Conflicts:
#	.github/workflows/create-crd-update-pr-in-longhorn-repo.yml
2025-07-11 19:30:28 +08:00
Derek Su c59345fa55 feat(crd): remove preserveUnknownFields patch
- Kubernetes enforces the rule: If `preserveUnknownFields: true`, then `conversion.Strategy`
  must be `None`, because
    - When `preserveUnknownFields: true` is set, Kubernetes skips strict
      schema validation and structural typing.
    - Webhook conversion requires a well-defined schema and structural CRs,
      so the two settings are incompatible.
  Starting from Longhorn v1.10, the v1beta1 API has been removed, and the
  conversion webhook is no longer used.

- In addition, preserveUnknownFields is deprecated in `apiextensions.k8s.io/v1`
  since Kubernetes v1.22, and the default value is false.

Longhorn 11263

Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit 57b1f20ff8)
2025-07-11 18:53:48 +08:00
Chin-Ya Huang 56c10da942 chore(cve): update bci-base image verion to 15.7
longhorn/longhorn-11239

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
2025-07-09 14:20:45 +08:00
James Lu f4c9114830 fix(backup): add backup volume validator
ref: longhorn/longhorn 11154

Signed-off-by: James Lu <james.lu@suse.com>
(cherry picked from commit 115f8c18b4)
2025-07-08 15:06:32 +08:00
James Lu eeeada5cac fix(backup): delete duplicated backup volumes
ref: longhorn/longhorn 11154

Signed-off-by: James Lu <james.lu@suse.com>
(cherry picked from commit ec2a5a23b8)
2025-07-08 15:06:32 +08:00
Chin-Ya Huang 14a7f43322 fix(system-backup): failed when volume backup policy is if-not-present
longhorn/longhorn-11232

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
(cherry picked from commit 596d573021)
2025-07-07 08:49:21 +00:00
Chin-Ya Huang 2504bbb27f test(system-backup): volume backup if-not-present with invalid snapshot creationTime
longhorn/longhorn-11232

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
(cherry picked from commit 7c8ddac721)
2025-07-07 08:49:21 +00:00
Phan Le 99d452b80e fix: do not silent the error returned by ReconcileBackupVolumeState
User would have no idea of why the volume is stuck if we silent the
error

longhorn-11152

Signed-off-by: Phan Le <phan.le@suse.com>
(cherry picked from commit 9cbb80614f)
2025-07-04 14:18:46 +08:00
David Cheng 831664ac3a feat(scheduler): add detailed error messages for disk schedulability checks
Signed-off-by: David Cheng <davidcheng0922@gmail.com>
(cherry picked from commit 16f796214e)
2025-07-02 21:02:20 +08:00
David Cheng 79db7946c1 feat(scheduler): add detailed error messages for disk schedulability checks
- Refactor IsSchedulableToDisk to return detailed error reason alongside result
- Improve logging in node controller and replica scheduler for unschedulable conditions
- Replace ambiguous messages with actionable suggestions
- Update related unit tests to match new error message format

Signed-off-by: David Cheng <davidcheng0922@gmail.com>
(cherry picked from commit 982b21fd3a)
2025-07-02 21:02:20 +08:00
Derek Su 2d6125b1dc feat: add error in the engine image condition
To improve troubleshooting, add error in the engine image condition.

Longhorn 9845

Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit c65035e669)
2025-06-30 16:35:23 +08:00
renovate[bot] 60901be843 fix(deps): update patch digest dependencies 2025-06-29 05:21:02 +00:00
James Lu d33884d10d fix(snapshot): enqueue snapshots when a volume CR is updated
ref: longhorn/longhorn 10874

Signed-off-by: James Lu <james.lu@suse.com>
(cherry picked from commit d75b51f3d7)
2025-06-28 12:01:18 +08:00
Chin-Ya Huang 28f3cfa233 fix(storage-network): skip migratable RWX volume workloads restarted
longhorn/longhorn-11158

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
(cherry picked from commit a0ddfc27b9)
2025-06-25 06:33:10 +00:00
Chin-Ya Huang 21ae0eabf5 fix(support-bundle): panic NPE after update conflicted
longhorn/longhorn-11169

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
(cherry picked from commit 7fd9cf808a)
2025-06-25 04:36:19 +00:00
renovate[bot] 7f5ddb7ca2 fix(deps): update patch digest dependencies 2025-06-22 06:15:03 +00:00
renovate[bot] 1089aa267c fix(deps): update patch digest dependencies 2025-06-15 15:00:28 +00:00
renovate[bot] f77b277cc4 fix(deps): update module github.com/urfave/cli to v1.22.17 2025-06-15 05:52:42 +00:00
renovate[bot] 6f07308aa7 fix(deps): update patch digest dependencies 2025-06-08 06:55:28 +00:00
Chin-Ya Huang badc1f7c39 fix(recurringjob): ensure each goroutine uses its own *logrus.Entry
longhorn/longhorn-11016

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
(cherry picked from commit 842a85bc8e)
2025-06-06 09:44:38 +08:00
Chin-Ya Huang 10c30c040c fix(recurring-job): concurrent write to recurringJob.Spec.Labels
longhorn/longhorn-11016

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
(cherry picked from commit 849f677822)
2025-06-06 09:44:38 +08:00
Chin-Ya Huang 1443f4ffb6 fix(recurring-job): newVolumeJob not controlled by the concurrentLimiter
longhorn/longhorn-11016

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
(cherry picked from commit b0e446e623)
2025-06-06 09:44:38 +08:00
Raphanus Lo ac16968f98 fix(backingimage): prevent eviction of in-used copies
longhorn/longhorn-11053

Signed-off-by: Raphanus Lo <yunchang.lo@suse.com>
(cherry picked from commit c5e2988fd3)
2025-06-05 02:23:38 +00:00
Derek Su ce40c4d86f fix(workflow): fix invalid curl path
Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit a79573a761)
2025-06-04 17:14:10 +08:00
Derek Su e8ae1f15eb fix(workflow): use target branch instead
Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit 43e36b45f5)
2025-06-04 08:36:02 +00:00
Raphanus Lo c7c414f531 fix(backingimage): reconcile backing image disk evict event by spec disks
longhorn/longhorn-11034

Signed-off-by: Raphanus Lo <yunchang.lo@suse.com>
(cherry picked from commit cae3910641)
2025-06-04 16:15:35 +08:00
Phan Le b70dd73d0d feat: add StartupProbe for Longhorn CSI plugin
StartupProbe is needed because Longhorn CSI plugin might need more time
at the begining to establish connection to Longhorn manager API. Without
StartupProbe, we would have to rely on the LivenessProbe which will not
wait for the long enough, unnessary crash the Longhorn CSI plugin container,
and causing more delay.

longhorn-9482

Signed-off-by: Phan Le <phan.le@suse.com>
(cherry picked from commit 604a88fbb6)
2025-06-03 08:49:04 +00:00
Phan Le db917b65ba fix: add longhorn-csi-plugin retry logic
Retry the Longhorn client initialization instead of failing immediately after
the first try

longhorn-9482

Signed-off-by: Phan Le <phan.le@suse.com>
(cherry picked from commit 9deae1ff71)
2025-06-03 08:49:04 +00:00
renovate[bot] 81d8919e31 fix(deps): update longhorn branch repo dependencies to v1.9.0 2025-06-01 06:37:06 +00:00
renovate[bot] bed82e9332 fix(deps): update patch digest dependencies 2025-06-01 06:16:45 +00:00
David Ko 8bb4d023b6 release: update version file for v1.9.0
Signed-off-by: David Ko <dko@suse.com>
2025-05-27 02:52:58 +00:00
David Ko 6d56ab6d30 release: update version file for v1.9.0-rc4
Signed-off-by: David Ko <dko@suse.com>
2025-05-26 04:11:40 +00:00
renovate[bot] 425cec7960 fix(deps): update module github.com/longhorn/longhorn-engine to v1.9.0-rc3 2025-05-25 06:14:13 +00:00
renovate[bot] 37c2add23a fix(deps): update patch digest dependencies 2025-05-25 05:53:20 +00:00
Derek Su 1b4e5a3953 fix(setting): orphan-resource-auto-deletion-grace-period should be in Orphan category
Longhorn 10904

Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit 412ede8bba)
2025-05-21 10:36:29 +09:00
David Ko cab28508e5 release: update version file for v1.9.0-rc3
Signed-off-by: David Ko <dko@suse.com>
2025-05-20 06:43:25 +00:00
Raphanus Lo dd6c53173c fix(orphan): improve orphan parameter code readability
Longhorn 10888

Signed-off-by: Raphanus Lo <yunchang.lo@suse.com>
(cherry picked from commit 08801f5a47)
2025-05-19 09:44:55 +00:00
Raphanus Lo 1855ebb481 feat(orphan): make orphan CR spec immutable
Longhorn 10888

Signed-off-by: Raphanus Lo <yunchang.lo@suse.com>
(cherry picked from commit 635f2a2dea)
2025-05-19 09:44:55 +00:00
Raphanus Lo 938d167182 fix(orphan): prevent retry while deleting illegal instance orphans
Longhorn 10888

Signed-off-by: Raphanus Lo <yunchang.lo@suse.com>
(cherry picked from commit 69f547d951)
2025-05-19 09:44:55 +00:00
Raphanus Lo d384cd916a feat(orphan): bind orphan with instance using uuid
longhorn/longhorn-10888

Signed-off-by: Raphanus Lo <yunchang.lo@suse.com>
(cherry picked from commit fd72dff47a)
2025-05-19 09:44:55 +00:00
Derek Su bcc2356a85 feat: record instance uuid in orphan.spec.parameters["InstanceUID"]
Longhorn 10888

Signed-off-by: Derek Su <derek.su@suse.com>
Signed-off-by: Raphanus Lo <yunchang.lo@suse.com>
(cherry picked from commit 71fc752773)
2025-05-19 09:44:55 +00:00
Derek Su b26e52446c feat: record uuid of engine or replica instance to im.status
Longhorn 10888

Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit 045c08b44e)
2025-05-19 09:44:55 +00:00
Derek Su 8163bac607 feat(crd): add uuid in InstanceProcessStatus and InstanceStatus
Longhorn 10888

Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit 9a9bf8188d)
2025-05-19 09:44:55 +00:00
Derek Su 8723a36e64 chore(vendor): update dependencies
Longhorn 10888

Signed-off-by: Derek Su <derek.su@suse.com>
Signed-off-by: Raphanus Lo <yunchang.lo@suse.com>
(cherry picked from commit b797aaac95)
2025-05-19 09:44:55 +00:00
Derek Su 205861cae6 feat(orphan): introduce orphan-resource-auto-deletion-grace-period setting
In the current implementation, with auto orphan deletion enabled, the orphan CR
and its associated process are deleted almost immediately after the orphan CR is
created. This behavior might be too abrupt. We could introduce a configurable
setting, such as a wait interval (deletion grace period), to delay this automatic
deletion. For instance, if the interval is set to 60 seconds, the orphan CR and
its process would be deleted 60 seconds after the creation timestamp.

Manual deletion of the orphan CR by the user would bypass this delay and proceed
immediately.

Longhorn 10904

Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit ff4148dbeb)
2025-05-19 15:07:09 +09:00
Derek Su 7a062e4714 fix(orphan): replace switch-case with if-else
switch-case works better for conditions based on a single number or string,
whereas if-else is more suitable for decisions involving multiple variables.

Longhorn 10888

Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit e83d51f56e)
2025-05-19 15:07:09 +09:00
renovate[bot] 207eb71df4 fix(deps): update patch digest dependencies 2025-05-17 03:53:02 +00:00
Raphanus Lo c95b2e4ada fix(orphan): prevent creating orphans from a terminating instance
longhorn/longhorn-10888

Signed-off-by: Raphanus Lo <yunchang.lo@suse.com>
(cherry picked from commit 0c94ce3177)
2025-05-16 21:18:27 +09:00
Raphanus Lo 2aadde18bc fix(orphan): remove owner reference from orphan CRs to prevent blocking instance manager termination
longhorn/longhorn-10888

Signed-off-by: Raphanus Lo <yunchang.lo@suse.com>
(cherry picked from commit 48a757ad4a)
2025-05-16 21:18:27 +09:00
Chin-Ya Huang bf84f3d0b1 revert: "fix: enqueue snapshot to ensure volumeattachment ticket can be correctly cleaned up"
This reverts commit 014fd6ea91.

longhorn/longhorn-10808

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
(cherry picked from commit 523a0aee5d)
2025-05-15 19:51:33 +09:00
Derek Su be9e6e4e24 chore: update log messages
Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit 96d7e664b3)
2025-05-14 10:30:57 +09:00
Derek Su 9542b23511 fix: enqueue snapshot to ensure volumeattachment ticket can be correctly cleaned up
Requeueue the snapshot if there is an attachment ticket for it to ensure
the volumeattachment can be cleaned up after the snapshot is created.

Longhorn 10874

Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit 014fd6ea91)
2025-05-14 10:30:57 +09:00
James Lu acdebda5ef fix(rebuild): change the code flow for offline rebuilding
Reduce the false warning logs for offline rebuilding
when deleting volume.

ref: longhorn/longhorn 10889

Signed-off-by: James Lu <james.lu@suse.com>
(cherry picked from commit 3468976c36)
2025-05-13 13:42:09 +09:00
renovate[bot] c0cee11eda fix(deps): update github.com/longhorn/go-iscsi-helper digest to ceffe5d 2025-05-11 14:27:53 +00:00
renovate[bot] a417db2000 fix(deps): update longhorn branch repo dependencies to v1.9.0-rc2 2025-05-11 07:46:38 +00:00
renovate[bot] 143003ff67 fix(deps): update patch digest dependencies 2025-05-11 07:27:33 +00:00
David Ko ecd00b3c24 release: update version file for v1.9.0-rc2
Signed-off-by: David Ko <dko@suse.com>
2025-05-07 08:40:17 +00:00
renovate[bot] 0187fd7d82 chore(deps): update dependency go to v1.24.3 2025-05-07 08:30:13 +00:00
Derek Su 5aa86bcfac fix(controller): remove unnecessary lasso dependency
Longhorn 10856

Signed-off-by: Derek Su <derek.su@suse.com>
(cherry picked from commit ad0cdbf3c8)
2025-05-06 16:45:49 +00:00
Chin-Ya Huang 4b08f35386 fix(snapshot): skip new snapshot handling if engine is purging
longhorn/longhorn-10808

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
(cherry picked from commit a51de50092)
2025-05-06 16:45:49 +09:00
Chin-Ya Huang 437bea1d81 fix(snapshot): skip new snapshot handling if engine is purging
longhorn/longhorn-10808

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
(cherry picked from commit a51de50092)
2025-05-06 07:20:20 +00:00
Chin-Ya Huang 782555bb3e fix(dr-volume): backup volume not found during up-to-date check
longhorn/longhorn-10824

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
(cherry picked from commit bb52d1da76)
2025-05-05 07:53:54 +00:00
renovate[bot] 0d1dc62612 chore(deps): update docker/dockerfile docker tag to v1.15.1 2025-05-04 06:20:24 +00:00
renovate[bot] 1f4898acce fix(deps): update longhorn branch repo dependencies to v1.9.0-rc1 2025-05-04 06:03:12 +00:00
renovate[bot] fbb2ff0993 fix(deps): update k8s.io/utils digest to 0f33e8f 2025-05-04 05:44:02 +00:00
Raphanus Lo 78420e9f7d feat(setting): replace orphan-auto-deletion with orphan-resource-auto-deletion
Signed-off-by: Raphanus Lo <yunchang.lo@suse.com>
(cherry picked from commit 40fd3ab08f)
2025-05-02 08:59:39 +00:00
David Ko a6079a9394 release: update version file for v1.9.0-rc1
Signed-off-by: David Ko <dko@suse.com>
2025-04-28 05:47:40 +00:00
renovate[bot] 0f65c400dc chore(deps): update module k8s.io/legacy-cloud-providers to v0.30.12 2025-04-28 07:11:38 +08:00
renovate[bot] 1c7ab7066c fix(deps): update module github.com/longhorn/longhorn-engine to v1.9.0-dev-20250420 2025-04-28 06:55:18 +08:00
Derek Su 23b9caaca5 chore(Dockerfile): revert back to registry.suse.com/bci/bci-base:15.6
registry.suse.com/bci/bci-base:15.7 is in TechPreview stage.

Signed-off-by: Derek Su <derek.su@suse.com>
2025-04-25 21:04:59 +08:00
153 changed files with 18983 additions and 4332 deletions

View File

@ -7,57 +7,79 @@ on:
- master
- "v*"
workflow_dispatch:
inputs:
pr_number:
description: 'Pull request number from longhorn/longhorn-manager'
required: true
type: number
base_branch:
description: 'Base branch the PR was merged into'
required: true
default: 'master'
type: string
jobs:
create-pull-request:
if: github.event.pull_request.merged == true
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Prepare Packages
run: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
- name: Prepare Helm
run: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
- name: Log triggering PR information
shell: bash
run: |
echo "Triggered by PR: #${{ github.event.pull_request.number }}"
echo "PR Title: ${{ github.event.pull_request.title }}"
echo "PR URL: ${{ github.event.pull_request.html_url }}"
echo "PR was merged into branch: ${{ github.event.pull_request.base.ref }}"
- uses: actions/checkout@v4
with:
repository: longhorn/longhorn
ref: ${{ github.event.pull_request.base.ref }}
- name: Determine PR info
id: pr_info
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "PR_NUMBER=${{ inputs.pr_number }}" >> $GITHUB_OUTPUT
echo "BASE_BRANCH=${{ inputs.base_branch }}" >> $GITHUB_OUTPUT
else
echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
echo "BASE_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_OUTPUT
fi
- name: Update crds.yaml and manifests
shell: bash
run: |
curl -L https://github.com/longhorn/longhorn-manager/raw/master/k8s/crds.yaml -o chart/templates/crds.yaml
bash scripts/generate-longhorn-yaml.sh
bash scripts/helm-docs.sh
- name: Log triggering PR information
run: |
echo "Triggered by PR: #${{ steps.pr_info.outputs.PR_NUMBER }}"
echo "Base branch: ${{ steps.pr_info.outputs.BASE_BRANCH }}"
- name: Get Head Commit Name
id: get_head_commit_name
run: echo "::set-output name=commit_name::$(git log -1 --pretty=format:'%an')"
- id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.LONGHORN_GITHUB_BOT_APP_ID }}
private-key: ${{ secrets.LONGHORN_GITHUB_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
permission-contents: write
permission-pull-requests: write
- name: Get Head Commit Email
id: get_head_commit_email
run: echo "::set-output name=commit_email::$(git log -1 --pretty=format:'%ae')"
- uses: actions/checkout@v4
with:
repository: longhorn/longhorn
token: ${{ steps.app-token.outputs.token }}
ref: ${{ steps.pr_info.outputs.BASE_BRANCH }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
branch: "update-crds-and-manifests-longhorn-manager-${{ github.event.pull_request.number }}"
delete-branch: true
sign-commits: true
signoff: true
author: ${{ steps.get_head_commit_name.outputs.commit_name }} <${{ steps.get_head_commit_email.outputs.commit_email }}>
committer: ${{ steps.get_head_commit_name.outputs.commit_name }} <${{ steps.get_head_commit_email.outputs.commit_email }}>
commit-message: "chore(crd): update crds.yaml and manifests (PR longhorn/longhorn-manager#${{ github.event.pull_request.number}})"
title: "chore(crd): update crds.yaml and manifests (PR longhorn/longhorn-manager#${{ github.event.pull_request.number}})"
body: |
This PR updates the crds.yaml and manifests.
It was triggered by longhorn/longhorn-manager#${{ github.event.pull_request.number}}.
- name: Update crds.yaml and manifests
run: |
curl -fL "https://github.com/longhorn/longhorn-manager/raw/${{ steps.pr_info.outputs.BASE_BRANCH }}/k8s/crds.yaml" -o chart/templates/crds.yaml
bash scripts/generate-longhorn-yaml.sh
bash scripts/helm-docs.sh
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.app-token.outputs.token }}
branch: "update-crds-and-manifests-longhorn-manager-${{ steps.pr_info.outputs.PR_NUMBER }}"
delete-branch: true
sign-commits: true
signoff: true
author: Longhorn GitHub Bot <67932897+longhorn-io-github-bot@users.noreply.github.com>
committer: Longhorn GitHub Bot <67932897+longhorn-io-github-bot@users.noreply.github.com>
commit-message: "chore(crd): update crds.yaml and manifests (PR longhorn/longhorn-manager#${{ steps.pr_info.outputs.PR_NUMBER }})"
title: "chore(crd): update crds.yaml and manifests (PR longhorn/longhorn-manager#${{ steps.pr_info.outputs.PR_NUMBER }})"
body: |
This PR updates the crds.yaml and manifests.
It was triggered by longhorn/longhorn-manager#${{ steps.pr_info.outputs.PR_NUMBER }}.

View File

@ -23,7 +23,7 @@ import (
lhclientset "github.com/longhorn/longhorn-manager/k8s/pkg/client/clientset/versioned"
)
func NewJob(name string, logger logrus.FieldLogger, managerURL string, recurringJob *longhorn.RecurringJob, lhClient *lhclientset.Clientset) (*Job, error) {
func NewJob(name string, logger *logrus.Logger, managerURL string, recurringJob *longhorn.RecurringJob, lhClient *lhclientset.Clientset) (*Job, error) {
namespace := os.Getenv(types.EnvPodNamespace)
if namespace == "" {
return nil, fmt.Errorf("failed detect pod namespace, environment variable %v is missing", types.EnvPodNamespace)

View File

@ -18,7 +18,7 @@ type Job struct {
lhClient *lhclientset.Clientset // Kubernetes clientset for Longhorn resources.
eventRecorder record.EventRecorder // Used to record events related to the job.
logger logrus.FieldLogger // Log messages related to the job.
logger *logrus.Logger // Log messages related to the job.
name string // Name for the RecurringJob.
namespace string // Kubernetes namespace in which the RecurringJob is running.
@ -33,7 +33,7 @@ type Job struct {
type VolumeJob struct {
*Job // Embedding the base Job struct.
logger logrus.FieldLogger // Log messages related to the volume job.
logger *logrus.Entry // Log messages related to the volume job.
volumeName string // Name of the volume on which the job operates.
snapshotName string // Name of the snapshot associated with the job.
@ -47,7 +47,7 @@ type VolumeJob struct {
type SystemBackupJob struct {
*Job // Embedding the base Job struct.
logger logrus.FieldLogger // Log messages related to the volume job.
logger *logrus.Entry // Log messages related to the volume job.
systemBackupName string // Name of the SystemBackup.
volumeBackupPolicy longhorn.SystemBackupCreateVolumeBackupPolicy // backup policy used for the SystemBackup.Spec.

View File

@ -70,17 +70,17 @@ func StartVolumeJobs(job *Job, recurringJob *longhorn.RecurringJob) error {
func startVolumeJob(job *Job, recurringJob *longhorn.RecurringJob,
volumeName string, concurrentLimiter chan struct{}, jobGroups []string) error {
concurrentLimiter <- struct{}{}
defer func() {
<-concurrentLimiter
}()
volumeJob, err := newVolumeJob(job, recurringJob, volumeName, jobGroups)
if err != nil {
job.logger.WithError(err).Errorf("Failed to initialize job for volume %v", volumeName)
return err
}
concurrentLimiter <- struct{}{}
defer func() {
<-concurrentLimiter
}()
volumeJob.logger.Info("Creating volume job")
err = volumeJob.run()
@ -96,7 +96,10 @@ func startVolumeJob(job *Job, recurringJob *longhorn.RecurringJob,
func newVolumeJob(job *Job, recurringJob *longhorn.RecurringJob, volumeName string, groups []string) (*VolumeJob, error) {
specLabels := map[string]string{}
if recurringJob.Spec.Labels != nil {
specLabels = recurringJob.Spec.Labels
specLabels = make(map[string]string, len(recurringJob.Spec.Labels))
for k, v := range recurringJob.Spec.Labels {
specLabels[k] = v
}
}
specLabels[types.RecurringJobLabel] = recurringJob.Name

View File

@ -70,4 +70,6 @@ const (
EventReasonRolloutSkippedFmt = "RolloutSkipped: %v %v"
EventReasonMigrationFailed = "MigrationFailed"
EventReasonOrphanCleanupCompleted = "OrphanCleanupCompleted"
)

View File

@ -281,7 +281,7 @@ func (bic *BackingImageController) syncBackingImage(key string) (err error) {
}()
if backingImage.DeletionTimestamp != nil {
replicas, err := bic.ds.ListReplicasByBackingImage(backingImage.Name)
replicas, err := bic.ds.ListReplicasByBackingImage(backingImage.Name, "")
if err != nil {
return err
}
@ -345,7 +345,9 @@ func (bic *BackingImageController) syncBackingImage(key string) (err error) {
return err
}
bic.cleanupEvictionRequestedBackingImageCopies(backingImage)
if err := bic.cleanupEvictionRequestedBackingImageCopies(backingImage); err != nil {
return err
}
if types.IsDataEngineV2(backingImage.Spec.DataEngine) {
return bic.handleV2BackingImage(backingImage)
@ -507,7 +509,7 @@ func (bic *BackingImageController) prepareFirstV2Copy(bi *longhorn.BackingImage)
_, err = engineClientProxy.SPDKBackingImageCreate(bi.Name, bi.Status.UUID, firstV2CopyDiskUUID, bi.Status.Checksum, fileDownloadAddress, "", uint64(bi.Status.Size))
if err != nil {
if types.ErrorAlreadyExists(err) {
log.Infof("backing image already exists when preparing first v2 copy on disk %v", firstV2CopyDiskUUID)
log.Infof("Backing image already exists when preparing first v2 copy on disk %v", firstV2CopyDiskUUID)
}
bic.v2CopyBackoff.Next(firstV2CopyDiskUUID, time.Now())
return errors.Wrapf(err, "failed to create backing image on disk %v when preparing first v2 copy for backing image %v", firstV2CopyDiskUUID, bi.Name)
@ -863,7 +865,7 @@ func (bic *BackingImageController) replenishBackingImageCopies(bi *longhorn.Back
return nil
}
func (bic *BackingImageController) cleanupEvictionRequestedBackingImageCopies(bi *longhorn.BackingImage) {
func (bic *BackingImageController) cleanupEvictionRequestedBackingImageCopies(bi *longhorn.BackingImage) error {
log := getLoggerForBackingImage(bic.logger, bi)
// If there is no non-evicting healthy backing image copy,
@ -901,9 +903,30 @@ func (bic *BackingImageController) cleanupEvictionRequestedBackingImageCopies(bi
// only this controller can gather all the information of all the copies of this backing image at once.
// By deleting the disk from the spec, backing image manager controller will delete the copy on that disk.
// TODO: introduce a new CRD for the backing image copy so we can delete the copy like volume controller deletes replicas.
isUsed, err := bic.isBIDiskFileUsedByReplicas(bi.Name, diskUUID)
if err != nil {
return errors.Wrapf(err, "Failed to check if the backing image copy on disk %v is used by replicas", diskUUID)
}
if isUsed {
log.Debugf("Backing image copy on disk %v is used by replicas. Copy eviction is blocked", diskUUID)
continue
}
delete(bi.Spec.DiskFileSpecMap, diskUUID)
log.Infof("Evicted backing image copy on disk %v", diskUUID)
}
return nil
}
func (bic *BackingImageController) isBIDiskFileUsedByReplicas(biName, diskUUID string) (used bool, err error) {
replicas, err := bic.ds.ListReplicasByBackingImage(biName, diskUUID)
if err != nil {
if datastore.ErrorIsNotFound(err) {
return false, nil
}
return false, err
}
return len(replicas) > 0, nil
}
func (bic *BackingImageController) IsBackingImageDataSourceCleaned(bi *longhorn.BackingImage) (cleaned bool, err error) {
@ -1409,7 +1432,7 @@ func (bic *BackingImageController) updateStatusWithFileInfo(bi *longhorn.Backing
}
func (bic *BackingImageController) updateDiskLastReferenceMap(bi *longhorn.BackingImage) error {
replicas, err := bic.ds.ListReplicasByBackingImage(bi.Name)
replicas, err := bic.ds.ListReplicasByBackingImage(bi.Name, "")
if err != nil {
return err
}
@ -1527,7 +1550,7 @@ func (bic *BackingImageController) enqueueBackingImageForNodeUpdate(oldObj, curr
}
}
diskBackingImageMap, err := bic.ds.GetDiskBackingImageMap()
diskBackingImageMap, err := bic.ds.GetCurrentDiskBackingImageMap()
if err != nil {
utilruntime.HandleError(fmt.Errorf("failed to get disk backing image map when handling node update"))
return

View File

@ -8,7 +8,6 @@ import (
"time"
"github.com/pkg/errors"
"github.com/rancher/lasso/pkg/log"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
@ -197,7 +196,7 @@ func (bc *BackupBackingImageController) reconcile(backupBackingImageName string)
}
return err
}
log.Infof("Backup backing image got new owner %v", bc.controllerID)
bc.logger.Infof("Backup backing image got new owner %v", bc.controllerID)
}
log := getLoggerForBackupBackingImage(bc.logger, bbi)

View File

@ -402,7 +402,7 @@ func (bc *BackupController) reconcile(backupName string) (err error) {
}
if backup.Status.State == longhorn.BackupStateCompleted && existingBackupState != backup.Status.State {
if err := bc.syncBackupVolume(backupTargetName, canonicalBackupVolumeName); err != nil {
log.Warnf("failed to sync backup volume %v for backup target %v", canonicalBackupVolumeName, backupTargetName)
log.Warnf("Failed to sync backup volume %v for backup target %v", canonicalBackupVolumeName, backupTargetName)
return
}
if err := bc.deleteSnapshotAfterBackupCompleted(backup); err != nil {

View File

@ -433,6 +433,16 @@ func (btc *BackupTargetController) reconcile(name string) (err error) {
}
}()
// clean up invalid backup volumes that are created during split-brain
// https://github.com/longhorn/longhorn/issues/11154
clusterVolumeBVMap, duplicatedBackupVolumeSet, err := btc.getClusterBVsDuplicatedBVs(backupTarget)
if err != nil {
return err
}
if err := btc.cleanupDuplicateBackupVolumeForBackupTarget(backupTarget, duplicatedBackupVolumeSet); err != nil {
return err
}
if backupTarget.Spec.BackupTargetURL == "" {
stopTimer(backupTarget.Name)
@ -463,7 +473,7 @@ func (btc *BackupTargetController) reconcile(name string) (err error) {
longhorn.BackupTargetConditionTypeUnavailable, longhorn.ConditionStatusFalse,
"", "")
if err = btc.syncBackupVolume(backupTarget, info.backupStoreBackupVolumeNames, syncTime, log); err != nil {
if err = btc.syncBackupVolume(backupTarget, info.backupStoreBackupVolumeNames, clusterVolumeBVMap, syncTime, log); err != nil {
return err
}
@ -546,20 +556,54 @@ func (btc *BackupTargetController) getInfoFromBackupStore(backupTarget *longhorn
return info, nil
}
func (btc *BackupTargetController) syncBackupVolume(backupTarget *longhorn.BackupTarget, backupStoreBackupVolumeNames []string, syncTime metav1.Time, log logrus.FieldLogger) error {
backupStoreBackupVolumes := sets.New[string](backupStoreBackupVolumeNames...)
func (btc *BackupTargetController) getClusterBVsDuplicatedBVs(backupTarget *longhorn.BackupTarget) (map[string]*longhorn.BackupVolume, sets.Set[string], error) {
log := getLoggerForBackupTarget(btc.logger, backupTarget)
backupTargetName := backupTarget.Name
// Get a list of all the backup volumes that exist as custom resources in the cluster
clusterBackupVolumes, err := btc.ds.ListBackupVolumesWithBackupTargetNameRO(backupTarget.Name)
// Get a list of the backup volumes of the backup target that exist as custom resources in the cluster
backupVolumeList, err := btc.ds.ListBackupVolumesWithBackupTargetNameRO(backupTargetName)
if err != nil {
return err
return nil, nil, err
}
clusterVolumeBVMap := make(map[string]*longhorn.BackupVolume, len(clusterBackupVolumes))
duplicateBackupVolumeSet := sets.New[string]()
volumeBVMap := make(map[string]*longhorn.BackupVolume, len(backupVolumeList))
for _, bv := range backupVolumeList {
if bv.Spec.BackupTargetName == "" {
log.WithField("backupVolume", bv.Name).Debug("spec.backupTargetName is empty")
duplicateBackupVolumeSet.Insert(bv.Name)
continue
}
if bv.Spec.VolumeName == "" {
log.WithField("backupVolume", bv.Name).Debug("spec.volumeName is empty")
duplicateBackupVolumeSet.Insert(bv.Name)
continue
}
if bv.Spec.BackupTargetName != backupTargetName {
log.WithField("backupVolume", bv.Name).Debugf("spec.backupTargetName %v is different from label backup-target", bv.Spec.BackupTargetName)
duplicateBackupVolumeSet.Insert(bv.Name)
continue
}
if existingBV, exists := volumeBVMap[bv.Spec.VolumeName]; exists {
if existingBV.CreationTimestamp.Before(&bv.CreationTimestamp) {
log.WithField("backupVolume", bv.Name).Warnf("Found duplicated BackupVolume with volume name %s", bv.Spec.VolumeName)
duplicateBackupVolumeSet.Insert(bv.Name)
continue
}
log.WithField("backupVolume", existingBV.Name).Warnf("Found duplicated BackupVolume with volume name %s", existingBV.Spec.VolumeName)
duplicateBackupVolumeSet.Insert(existingBV.Name)
}
volumeBVMap[bv.Spec.VolumeName] = bv
}
return volumeBVMap, duplicateBackupVolumeSet, nil
}
func (btc *BackupTargetController) syncBackupVolume(backupTarget *longhorn.BackupTarget, backupStoreBackupVolumeNames []string, clusterVolumeBVMap map[string]*longhorn.BackupVolume, syncTime metav1.Time, log logrus.FieldLogger) error {
backupStoreBackupVolumes := sets.New[string](backupStoreBackupVolumeNames...)
clusterBackupVolumesSet := sets.New[string]()
for _, bv := range clusterBackupVolumes {
for _, bv := range clusterVolumeBVMap {
clusterBackupVolumesSet.Insert(bv.Spec.VolumeName)
clusterVolumeBVMap[bv.Spec.VolumeName] = bv
}
// TODO: add a unit test
@ -580,11 +624,19 @@ func (btc *BackupTargetController) syncBackupVolume(backupTarget *longhorn.Backu
// Update the BackupVolume CR spec.syncRequestAt to request the
// backup_volume_controller to reconcile the BackupVolume CR
for backupVolumeName, backupVolume := range clusterBackupVolumes {
backupVolume.Spec.SyncRequestedAt = syncTime
if _, err = btc.ds.UpdateBackupVolume(backupVolume); err != nil && !apierrors.IsConflict(errors.Cause(err)) {
log.WithError(err).Errorf("Failed to update backup volume %s spec", backupVolumeName)
multiError := util.NewMultiError()
for volumeName, backupVolume := range clusterVolumeBVMap {
if !backupStoreBackupVolumes.Has(volumeName) {
continue
}
backupVolume.Spec.SyncRequestedAt = syncTime
if _, err := btc.ds.UpdateBackupVolume(backupVolume); err != nil && !apierrors.IsConflict(errors.Cause(err)) {
log.WithError(err).Errorf("Failed to update backup volume %s", backupVolume.Name)
multiError.Append(util.NewMultiError(fmt.Sprintf("%v: %v", backupVolume.Name, err)))
}
}
if len(multiError) > 0 {
return fmt.Errorf("failed to update backup volumes: %v", multiError.Join())
}
return nil
@ -596,7 +648,7 @@ func (btc *BackupTargetController) pullBackupVolumeFromBackupTarget(backupTarget
log.Infof("Found %d backup volumes in the backup target that do not exist in the cluster and need to be pulled", count)
}
for remoteVolumeName := range backupVolumesToPull {
backupVolumeName := types.GetBackupVolumeNameFromVolumeName(remoteVolumeName)
backupVolumeName := types.GetBackupVolumeNameFromVolumeName(remoteVolumeName, backupTarget.Name)
backupVolume := &longhorn.BackupVolume{
ObjectMeta: metav1.ObjectMeta{
Name: backupVolumeName,
@ -624,6 +676,7 @@ func (btc *BackupTargetController) cleanupBackupVolumeNotExistOnBackupTarget(clu
log.Infof("Found %d backup volumes in the backup target that do not exist in the cluster and need to be deleted from the cluster", count)
}
multiError := util.NewMultiError()
for volumeName := range backupVolumesToDelete {
bv, exists := clusterVolumeBVMap[volumeName]
if !exists {
@ -633,14 +686,50 @@ func (btc *BackupTargetController) cleanupBackupVolumeNotExistOnBackupTarget(clu
backupVolumeName := bv.Name
log.WithField("backupVolume", backupVolumeName).Info("Deleting BackupVolume not exist in backupstore")
if err = datastore.AddBackupVolumeDeleteCustomResourceOnlyLabel(btc.ds, backupVolumeName); err != nil {
return errors.Wrapf(err, "failed to add label delete-custom-resource-only to Backupvolume %s", backupVolumeName)
}
if err = btc.ds.DeleteBackupVolume(backupVolumeName); err != nil {
return errors.Wrapf(err, "failed to delete backup volume %s from cluster", backupVolumeName)
if err := btc.deleteBackupVolumeCROnly(backupVolumeName, log); err != nil {
if apierrors.IsNotFound(err) {
continue
}
multiError.Append(util.NewMultiError(fmt.Sprintf("%v: %v", backupVolumeName, err)))
}
}
if len(multiError) > 0 {
return fmt.Errorf("failed to delete backup volumes from cluster: %v", multiError.Join())
}
return nil
}
func (btc *BackupTargetController) deleteBackupVolumeCROnly(backupVolumeName string, log logrus.FieldLogger) error {
if err := datastore.AddBackupVolumeDeleteCustomResourceOnlyLabel(btc.ds, backupVolumeName); err != nil {
return errors.Wrapf(err, "failed to add label delete-custom-resource-only to BackupVolume %s", backupVolumeName)
}
if err := btc.ds.DeleteBackupVolume(backupVolumeName); err != nil {
return errors.Wrapf(err, "failed to delete BackupVolume %s", backupVolumeName)
}
return nil
}
func (btc *BackupTargetController) cleanupDuplicateBackupVolumeForBackupTarget(backupTarget *longhorn.BackupTarget, duplicateBackupVolumesSet sets.Set[string]) (err error) {
log := getLoggerForBackupTarget(btc.logger, backupTarget)
if count := duplicateBackupVolumesSet.Len(); count > 0 {
log.Infof("Found %d duplicated backup volume CRs for the backup target and need to be deleted from the cluster", count)
}
multiError := util.NewMultiError()
for bvName := range duplicateBackupVolumesSet {
log.WithField("backupVolume", bvName).Info("Deleting BackupVolume that has duplicate volume name in cluster")
if err := btc.deleteBackupVolumeCROnly(bvName, log); err != nil {
if apierrors.IsNotFound(err) {
continue
}
multiError.Append(util.NewMultiError(fmt.Sprintf("%v: %v", bvName, err)))
}
}
if len(multiError) > 0 {
return fmt.Errorf("failed to delete backup volumes: %v", multiError.Join())
}
return nil
}

View File

@ -620,8 +620,8 @@ func randomPort() int {
return rand.Int() % 30000
}
func fakeEngineBinaryChecker(image string) bool {
return true
func fakeEngineBinaryChecker(image string) (bool, error) {
return true, nil
}
func fakeEngineImageUpdater(ei *longhorn.EngineImage) error {

View File

@ -599,7 +599,7 @@ func (ec *EngineController) DeleteInstance(obj interface{}) (err error) {
}
}(c)
err = c.InstanceDelete(e.Spec.DataEngine, e.Name, string(longhorn.InstanceManagerTypeEngine), "", true)
err = c.InstanceDelete(e.Spec.DataEngine, e.Name, "", string(longhorn.InstanceManagerTypeEngine), "", true)
if err != nil && !types.ErrorIsNotFound(err) {
return err
}
@ -2201,6 +2201,7 @@ func (ec *EngineController) UpgradeEngineInstance(e *longhorn.Engine, log *logru
}
e.Status.Port = int(engineInstance.Status.PortStart)
e.Status.UUID = engineInstance.Status.UUID
return nil
}

View File

@ -58,7 +58,7 @@ type EngineImageController struct {
// for unit test
nowHandler func() string
engineBinaryChecker func(string) bool
engineBinaryChecker func(string) (bool, error)
engineImageVersionUpdater func(*longhorn.EngineImage) error
}
@ -321,8 +321,9 @@ func (ic *EngineImageController) syncEngineImage(key string) (err error) {
return err
}
if !ic.engineBinaryChecker(engineImage.Spec.Image) {
engineImage.Status.Conditions = types.SetCondition(engineImage.Status.Conditions, longhorn.EngineImageConditionTypeReady, longhorn.ConditionStatusFalse, longhorn.EngineImageConditionTypeReadyReasonDaemonSet, "engine binary check failed")
ok, err := ic.engineBinaryChecker(engineImage.Spec.Image)
if !ok {
engineImage.Status.Conditions = types.SetCondition(engineImage.Status.Conditions, longhorn.EngineImageConditionTypeReady, longhorn.ConditionStatusFalse, longhorn.EngineImageConditionTypeReadyReasonDaemonSet, errors.Errorf("engine binary check failed: %v", err).Error())
engineImage.Status.State = longhorn.EngineImageStateDeploying
return nil
}

View File

@ -75,6 +75,7 @@ func (h *InstanceHandler) syncStatusWithInstanceManager(im *longhorn.InstanceMan
status.StorageIP = ""
status.Port = 0
status.UblkID = 0
status.UUID = ""
h.resetInstanceErrorCondition(status)
return
}
@ -95,6 +96,7 @@ func (h *InstanceHandler) syncStatusWithInstanceManager(im *longhorn.InstanceMan
status.StorageIP = ""
status.Port = 0
status.UblkID = 0
status.UUID = ""
h.resetInstanceErrorCondition(status)
return
}
@ -110,6 +112,7 @@ func (h *InstanceHandler) syncStatusWithInstanceManager(im *longhorn.InstanceMan
status.StorageIP = ""
status.Port = 0
status.UblkID = 0
status.UUID = ""
h.resetInstanceErrorCondition(status)
}
return
@ -130,6 +133,7 @@ func (h *InstanceHandler) syncStatusWithInstanceManager(im *longhorn.InstanceMan
status.StorageIP = ""
status.Port = 0
status.UblkID = 0
status.UUID = ""
h.resetInstanceErrorCondition(status)
return
}
@ -153,6 +157,7 @@ func (h *InstanceHandler) syncStatusWithInstanceManager(im *longhorn.InstanceMan
status.StorageIP = ""
status.Port = 0
status.UblkID = 0
status.UUID = ""
h.resetInstanceErrorCondition(status)
case longhorn.InstanceStateRunning:
status.CurrentState = longhorn.InstanceStateRunning
@ -190,6 +195,11 @@ func (h *InstanceHandler) syncStatusWithInstanceManager(im *longhorn.InstanceMan
if status.CurrentImage == "" {
status.CurrentImage = spec.Image
}
if status.UUID != instance.Status.UUID {
status.UUID = instance.Status.UUID
}
h.syncInstanceCondition(instance, status)
case longhorn.InstanceStateStopping:
@ -203,6 +213,7 @@ func (h *InstanceHandler) syncStatusWithInstanceManager(im *longhorn.InstanceMan
status.StorageIP = ""
status.Port = 0
status.UblkID = 0
status.UUID = ""
h.resetInstanceErrorCondition(status)
case longhorn.InstanceStateStopped:
if status.Started {
@ -215,6 +226,7 @@ func (h *InstanceHandler) syncStatusWithInstanceManager(im *longhorn.InstanceMan
status.StorageIP = ""
status.Port = 0
status.UblkID = 0
status.UUID = ""
h.resetInstanceErrorCondition(status)
default:
if status.CurrentState != longhorn.InstanceStateError {
@ -226,6 +238,7 @@ func (h *InstanceHandler) syncStatusWithInstanceManager(im *longhorn.InstanceMan
status.StorageIP = ""
status.Port = 0
status.UblkID = 0
status.UUID = ""
h.resetInstanceErrorCondition(status)
}
}

View File

@ -1660,18 +1660,29 @@ func (imc *InstanceManagerController) createInstanceManagerPodSpec(im *longhorn.
return podSpec, nil
}
// deleteOrphans examines existing instance orphan CRs, and initiates CR deletion if needed.
//
// Orphan CRs will be deleted under any of the following conditions:
// - The instance manager is terminating or has terminated, which results in the removal of its managed instances.
// - An instance is missing from the instance manager.
// - An instance has been rescheduled to the instance manager and is no longer considered orphaned.
// - Automatic deletion of orphan resources is enabled.
func (imc *InstanceManagerController) deleteOrphans(im *longhorn.InstanceManager, isInstanceManagerTerminating bool) error {
autoDeletionTypes, err := imc.ds.GetSettingOrphanResourceAutoDeletion()
var autoDeleteEngine = false
var autoDeleteReplica = false
if err != nil {
imc.logger.WithError(err).Warnf("Failed to fetch orphan auto deletion setting, disabled by default")
} else {
autoDeleteEngine = autoDeletionTypes[types.OrphanResourceTypeEngineInstance]
autoDeleteReplica = autoDeletionTypes[types.OrphanResourceTypeReplicaInstance]
return errors.Wrapf(err, "failed to get setting %v", types.SettingNameOrphanResourceAutoDeletion)
}
autoDeleteEnabled, ok := autoDeletionTypes[types.OrphanResourceTypeInstance]
if !ok {
autoDeleteEnabled = false
}
orphanList, err := imc.ds.ListOrphansForEngineAndReplicaInstancesRO(im.Spec.NodeID)
autoDeleteGracePeriod, err := imc.ds.GetSettingAsInt(types.SettingNameOrphanResourceAutoDeletionGracePeriod)
if err != nil {
return errors.Wrapf(err, "failed to get setting %v", types.SettingNameOrphanResourceAutoDeletionGracePeriod)
}
orphanList, err := imc.ds.ListInstanceOrphansByInstanceManagerRO(im.Name)
if err != nil {
return err
}
@ -1681,97 +1692,110 @@ func (imc *InstanceManagerController) deleteOrphans(im *longhorn.InstanceManager
continue
}
var isDeletable = false
instanceManager := orphan.Spec.Parameters[longhorn.OrphanInstanceManager]
instanceName := orphan.Spec.Parameters[longhorn.OrphanInstanceName]
var instanceExist = false
var instanceCRScheduledBack = false
switch orphan.Spec.Type {
case longhorn.OrphanTypeEngineInstance:
isDeletable, err = imc.isOrphanDeletable(orphan, isInstanceManagerTerminating || autoDeleteEngine, im.Status.InstanceEngines, imc.isEngineScheduledOnCurrentNode)
_, instanceExist = im.Status.InstanceEngines[instanceName]
instanceCRScheduledBack, err = imc.isEngineOnInstanceManager(instanceManager, instanceName)
case longhorn.OrphanTypeReplicaInstance:
isDeletable, err = imc.isOrphanDeletable(orphan, isInstanceManagerTerminating || autoDeleteReplica, im.Status.InstanceReplicas, imc.isReplicaScheduledOnCurrentNode)
_, instanceExist = im.Status.InstanceReplicas[instanceName]
instanceCRScheduledBack, err = imc.isReplicaOnInstanceManager(instanceManager, instanceName)
}
if err != nil {
multiError.Append(util.NewMultiError(fmt.Sprintf("%v: %v", orphan.Name, err)))
} else if isDeletable {
if err := imc.ds.DeleteOrphan(orphan.Name); err != nil && !apierrors.IsNotFound(err) {
continue
}
if imc.canDeleteOrphan(orphan, isInstanceManagerTerminating, autoDeleteEnabled, instanceExist, instanceCRScheduledBack, autoDeleteGracePeriod) {
if err := imc.deleteOrphan(orphan); err != nil {
multiError.Append(util.NewMultiError(fmt.Sprintf("%v: %v", orphan.Name, err)))
}
}
}
if len(multiError) > 0 {
return fmt.Errorf("instance manager failed to delete orphan CR: %v", multiError.Join())
return fmt.Errorf("failed to delete orphans: %v", multiError.Join())
}
return nil
}
func (imc *InstanceManagerController) isOrphanDeletable(orphan *longhorn.Orphan, autoDelete bool, instanceMap instanceProcessMap, isInstanceScheduledOnNode func(node, instance string) (bool, error)) (isDeletable bool, err error) {
if autoDelete {
return true, nil
func (imc *InstanceManagerController) deleteOrphan(orphan *longhorn.Orphan) error {
imc.logger.Infof("Deleting Orphan %v", orphan.Name)
if err := imc.ds.DeleteOrphan(orphan.Name); err != nil {
if datastore.ErrorIsNotFound(err) {
return nil
}
return errors.Wrapf(err, "failed to delete orphan %q", orphan.Name)
}
instanceName := orphan.Spec.Parameters[longhorn.OrphanInstanceName]
instanceProc, instanceExist := instanceMap[instanceName]
instanceCRScheduledBack, err := isInstanceScheduledOnNode(orphan.Spec.NodeID, instanceName)
if err != nil {
return false, errors.Wrapf(err, "failed to check CR scheduled node for %v orphan %v", orphan.Spec.Type, instanceName)
}
var instanceState longhorn.InstanceState
if instanceExist {
instanceState = instanceProc.Status.State
} else {
instanceState = longhorn.InstanceStateTerminated
}
imc.logger.WithFields(logrus.Fields{
"instanceExist": instanceExist,
"instanceState": instanceState,
"instanceCRScheduledBack": instanceCRScheduledBack,
}).Debugf("Checked deletable for %s orphan instance %s", orphan.Spec.Type, orphan.Name)
if !instanceExist || instanceCRScheduledBack {
return true, nil
}
return false, nil
return nil
}
func (imc *InstanceManagerController) isEngineScheduledOnCurrentNode(node string, instance string) (bool, error) {
func (imc *InstanceManagerController) canDeleteOrphan(orphan *longhorn.Orphan, imTerminating, autoDeleteEnabled, instanceExist, instanceCRScheduledBack bool, autoDeleteGracePeriod int64) bool {
autoDeleteAllowed := false
if autoDeleteEnabled {
elapsedTime := time.Since(orphan.CreationTimestamp.Time).Seconds()
if elapsedTime > float64(autoDeleteGracePeriod) {
autoDeleteAllowed = true
}
}
canDelete := imTerminating || autoDeleteAllowed || !instanceExist || instanceCRScheduledBack
if !canDelete {
imc.logger.Debugf("Orphan %v is not ready to be deleted, imTerminating: %v, autoDeleteAllowed: %v, instanceExist: %v, instanceCRScheduledBack: %v", orphan.Name, imTerminating, autoDeleteAllowed, instanceExist, instanceCRScheduledBack)
}
return canDelete
}
func (imc *InstanceManagerController) isEngineOnInstanceManager(instanceManager string, instance string) (bool, error) {
existEngine, err := imc.ds.GetEngineRO(instance)
switch {
case err == nil:
// Engine CR still exists - check the ownership
return imc.isInstanceScheduledOnCurrentNode(node, &existEngine.Spec.InstanceSpec, &existEngine.Status.InstanceStatus), nil
case apierrors.IsNotFound(err):
// Engine CR not found - instance is orphaned
return false, nil
default:
// Unexpected error - unable to check if engine instance is orphaned or not
return false, err
if err != nil {
if apierrors.IsNotFound(err) {
// Engine CR not found - instance is orphaned
return false, nil
}
return false, errors.Wrapf(err, "failed to check if engine instance %q is scheduled on instance manager %q", instance, instanceManager)
}
return imc.isInstanceOnInstanceManager(instanceManager, &existEngine.ObjectMeta, &existEngine.Spec.InstanceSpec, &existEngine.Status.InstanceStatus), nil
}
func (imc *InstanceManagerController) isReplicaScheduledOnCurrentNode(node string, instance string) (bool, error) {
func (imc *InstanceManagerController) isReplicaOnInstanceManager(instanceManager string, instance string) (bool, error) {
existReplica, err := imc.ds.GetReplicaRO(instance)
switch {
case err == nil:
// Replica CR still exists - check the ownership
return imc.isInstanceScheduledOnCurrentNode(node, &existReplica.Spec.InstanceSpec, &existReplica.Status.InstanceStatus), nil
case apierrors.IsNotFound(err):
// Replica CR not found - instance is orphaned
return false, nil
default:
// Unexpected error - unable to check if replica instance is orphaned or not
return false, err
if err != nil {
if apierrors.IsNotFound(err) {
// Replica CR not found - instance is orphaned
return false, nil
}
return false, errors.Wrapf(err, "failed to check if replica instance %q is scheduled on instance manager %q", instance, instanceManager)
}
return imc.isInstanceOnInstanceManager(instanceManager, &existReplica.ObjectMeta, &existReplica.Spec.InstanceSpec, &existReplica.Status.InstanceStatus), nil
}
// isInstanceScheduledOnCurrentNode returns true only when it is very certain that an instance is scheduled on this node
func (imc *InstanceManagerController) isInstanceScheduledOnCurrentNode(node string, spec *longhorn.InstanceSpec, status *longhorn.InstanceStatus) bool {
if status.CurrentState != spec.DesireState {
// isInstanceOnInstanceManager returns true only when it is very certain that an instance is scheduled in a given instance manager
func (imc *InstanceManagerController) isInstanceOnInstanceManager(instanceManager string, meta *metav1.ObjectMeta, spec *longhorn.InstanceSpec, status *longhorn.InstanceStatus) bool {
if !meta.DeletionTimestamp.IsZero() {
imc.logger.Debugf("Skipping check if Instance %q is scheduled on instance manager %q; instance is marked for deletion", meta.Name, instanceManager)
return false
}
if status.CurrentState != spec.DesireState || status.OwnerID != spec.NodeID {
imc.logger.WithFields(logrus.Fields{
"currentState": status.CurrentState,
"desiredState": spec.DesireState,
"currentNode": status.OwnerID,
"desiredNode": spec.NodeID,
}).Debugf("Skipping check if instance %q is scheduled on instance manager %q; instance is in state transition", meta.Name, instanceManager)
return false
}
switch status.CurrentState {
case longhorn.InstanceStateRunning:
return status.OwnerID == spec.NodeID && spec.NodeID == node
return status.InstanceManagerName == instanceManager
case longhorn.InstanceStateStopped:
return spec.NodeID == node
// Instance manager is not assigned in the stopped state. Instance is not expected to live in any instance manager.
return false
default:
return false
}
@ -2211,7 +2235,7 @@ func (m *InstanceManagerMonitor) StopMonitorWithLock() {
func (m *InstanceManagerMonitor) syncOrphans(im *longhorn.InstanceManager, instanceMap instanceProcessMap) {
engineProcesses, replicaProcesses := m.categorizeProcesses(instanceMap)
existOrphansList, err := m.ds.ListOrphansForEngineAndReplicaInstancesRO(im.Spec.NodeID)
existOrphansList, err := m.ds.ListInstanceOrphansByInstanceManagerRO(im.Name)
if err != nil {
m.logger.WithError(err).Errorf("Failed to list orphans on node %s", im.Spec.NodeID)
return
@ -2226,62 +2250,93 @@ func (m *InstanceManagerMonitor) syncOrphans(im *longhorn.InstanceManager, insta
m.createOrphanForInstances(existOrphans, im, replicaProcesses, longhorn.OrphanTypeReplicaInstance, m.isReplicaOrphaned)
}
func (m *InstanceManagerMonitor) isEngineOrphaned(instanceName, node string) (bool, error) {
func (m *InstanceManagerMonitor) isEngineOrphaned(instanceName, instanceManager string) (bool, error) {
existEngine, err := m.ds.GetEngineRO(instanceName)
switch {
case err == nil:
// Engine CR still exists - check the ownership
return m.isInstanceOrphanedOnNode(&existEngine.Spec.InstanceSpec, &existEngine.Status.InstanceStatus, node), nil
case apierrors.IsNotFound(err):
// Engine CR not found - instance is orphaned
return true, nil
default:
if err != nil {
if apierrors.IsNotFound(err) {
// Engine CR not found - instance is orphaned
return true, nil
}
// Unexpected error - unable to check if engine instance is orphaned or not
return false, err
}
// Engine CR still exists - check the ownership
return m.isInstanceOrphanedInInstanceManager(&existEngine.ObjectMeta, &existEngine.Spec.InstanceSpec, &existEngine.Status.InstanceStatus, instanceManager), nil
}
func (m *InstanceManagerMonitor) isReplicaOrphaned(instanceName, node string) (bool, error) {
func (m *InstanceManagerMonitor) isReplicaOrphaned(instanceName, instanceManager string) (bool, error) {
existReplica, err := m.ds.GetReplicaRO(instanceName)
switch {
case err == nil:
// Replica CR still exists - check the ownership
return m.isInstanceOrphanedOnNode(&existReplica.Spec.InstanceSpec, &existReplica.Status.InstanceStatus, node), nil
case apierrors.IsNotFound(err):
// Replica CR not found - instance is orphaned
return true, nil
default:
if err != nil {
if apierrors.IsNotFound(err) {
// Replica CR not found - instance is orphaned
return true, nil
}
// Unexpected error - unable to check if replica instance is orphaned or not
return false, err
}
// Replica CR still exists - check the ownership
return m.isInstanceOrphanedInInstanceManager(&existReplica.ObjectMeta, &existReplica.Spec.InstanceSpec, &existReplica.Status.InstanceStatus, instanceManager), nil
}
// isInstanceOrphanedOnNode returns true only when it is very certain that an instance is scheduled on another node
func (m *InstanceManagerMonitor) isInstanceOrphanedOnNode(spec *longhorn.InstanceSpec, status *longhorn.InstanceStatus, node string) bool {
if status.CurrentState != spec.DesireState {
// isInstanceOrphanedInInstanceManager returns true only when it is very certain that an instance is scheduled on another instance manager
func (m *InstanceManagerMonitor) isInstanceOrphanedInInstanceManager(meta *metav1.ObjectMeta, spec *longhorn.InstanceSpec, status *longhorn.InstanceStatus, instanceManager string) bool {
if !meta.DeletionTimestamp.IsZero() {
m.logger.Debugf("Skipping orphan check; Instance %s is marked for deletion", meta.Name)
return false
}
if status.CurrentState != spec.DesireState || status.OwnerID != spec.NodeID {
m.logger.WithFields(logrus.Fields{
"currentState": status.CurrentState,
"desiredState": spec.DesireState,
"currentNode": status.OwnerID,
"desiredNode": spec.NodeID,
}).Debugf("Skipping orphan check; Instance %s is in state transition", meta.Name)
return false
}
switch status.CurrentState {
case longhorn.InstanceStateRunning:
return status.OwnerID == spec.NodeID && spec.NodeID != node
return status.InstanceManagerName != instanceManager
case longhorn.InstanceStateStopped:
return spec.NodeID != node
// Instance manager is not assigned in the stopped state. Instance is not expected to live in any instance manager.
return true
default:
return false
}
}
func (m *InstanceManagerMonitor) createOrphanForInstances(existOrphans map[string]bool, im *longhorn.InstanceManager, instanceMap instanceProcessMap, orphanType longhorn.OrphanType, orphanFilter func(instanceName, node string) (bool, error)) {
func (m *InstanceManagerMonitor) createOrphanForInstances(existOrphans map[string]bool, im *longhorn.InstanceManager, instanceMap instanceProcessMap, orphanType longhorn.OrphanType, orphanFilter func(instanceName, instanceManager string) (bool, error)) {
for instanceName, instance := range instanceMap {
orphanName := types.GetOrphanChecksumNameForOrphanedInstance(instanceName, m.controllerID, string(instance.Spec.DataEngine))
if instance.Status.State == longhorn.InstanceStateStarting ||
instance.Status.State == longhorn.InstanceStateStopping ||
instance.Status.State == longhorn.InstanceStateStopped {
// Starting: Status transitioning. Will handle this after running.
// Stopping, Stopped: Terminating. No orphan CR needed, and the orphaned instances will be cleanup by instance manager after stopped.
continue
}
if instance.Spec.DataEngine != longhorn.DataEngineTypeV1 {
m.logger.Debugf("Skipping orphan creation, instance %s is not data engine v1", instanceName)
continue
}
if instance.Status.UUID == "" {
// skip the instance without UUID to prevent accidental deletion on processes
continue
}
orphanName := types.GetOrphanChecksumNameForOrphanedInstance(instanceName, instance.Status.UUID, im.Name, string(instance.Spec.DataEngine))
if _, isExist := existOrphans[orphanName]; isExist {
continue
}
if isOrphaned, err := orphanFilter(instanceName, im.Spec.NodeID); err != nil {
if isOrphaned, err := orphanFilter(instanceName, im.Name); err != nil {
m.logger.WithError(err).Errorf("Failed to check %v orphan for instance %v", orphanType, instanceName)
} else if isOrphaned {
m.logger.Infof("Instance %v is orphaned", instanceName)
newOrphan, err := m.createOrphan(orphanName, im, instanceName, orphanType, instance.Spec.DataEngine)
m.logger.WithFields(logrus.Fields{
"instanceState": instance.Status.State,
"instanceUUID": instance.Status.UUID,
}).Infof("Creating %s Orphan %v for orphaned instance %v", orphanType, orphanName, instanceName)
newOrphan, err := m.createOrphan(orphanName, im, instanceName, instance.Status.UUID, orphanType, instance.Spec.DataEngine)
if err != nil {
m.logger.WithError(err).Errorf("Failed to create %v orphan for instance %v", orphanType, instanceName)
} else if newOrphan != nil {
@ -2291,7 +2346,7 @@ func (m *InstanceManagerMonitor) createOrphanForInstances(existOrphans map[strin
}
}
func (m *InstanceManagerMonitor) createOrphan(name string, im *longhorn.InstanceManager, instanceName string, orphanType longhorn.OrphanType, dataEngineType longhorn.DataEngineType) (*longhorn.Orphan, error) {
func (m *InstanceManagerMonitor) createOrphan(name string, im *longhorn.InstanceManager, instanceName, instanceUUID string, orphanType longhorn.OrphanType, dataEngineType longhorn.DataEngineType) (*longhorn.Orphan, error) {
if _, err := m.ds.GetOrphanRO(name); err == nil || !apierrors.IsNotFound(err) {
return nil, err
}
@ -2299,8 +2354,7 @@ func (m *InstanceManagerMonitor) createOrphan(name string, im *longhorn.Instance
// labels will be attached by mutator webhook
orphan := &longhorn.Orphan{
ObjectMeta: metav1.ObjectMeta{
Name: name,
OwnerReferences: datastore.GetOwnerReferencesForInstanceManager(im),
Name: name,
},
Spec: longhorn.OrphanSpec{
NodeID: m.controllerID,
@ -2308,6 +2362,7 @@ func (m *InstanceManagerMonitor) createOrphan(name string, im *longhorn.Instance
DataEngine: dataEngineType,
Parameters: map[string]string{
longhorn.OrphanInstanceName: instanceName,
longhorn.OrphanInstanceUUID: instanceUUID,
longhorn.OrphanInstanceManager: im.Name,
},
},

View File

@ -26,6 +26,7 @@ import (
"github.com/longhorn/longhorn-manager/constant"
"github.com/longhorn/longhorn-manager/datastore"
"github.com/longhorn/longhorn-manager/types"
"github.com/longhorn/longhorn-manager/util"
longhorn "github.com/longhorn/longhorn-manager/k8s/pkg/apis/longhorn/v1beta2"
)
@ -267,6 +268,11 @@ func (kc *KubernetesPodController) handleWorkloadPodDeletionIfCSIPluginPodIsDown
continue
}
if util.IsMigratableVolume(volume) {
_log.Debugf("%s. Volume is migratable RWX volume", logSkip)
continue
}
filteredVolumes = append(filteredVolumes, volume)
}

View File

@ -8,7 +8,6 @@ import (
"time"
"github.com/pkg/errors"
"github.com/rancher/lasso/pkg/log"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/runtime"
@ -835,10 +834,6 @@ func (nc *NodeController) updateDiskStatusSchedulableCondition(node *longhorn.No
diskStatusMap := node.Status.DiskStatus
// update Schedulable condition
minimalAvailablePercentage, err := nc.ds.GetSettingAsInt(types.SettingNameStorageMinimalAvailablePercentage)
if err != nil {
return err
}
backingImages, err := nc.ds.ListBackingImagesRO()
if err != nil {
return err
@ -911,12 +906,13 @@ func (nc *NodeController) updateDiskStatusSchedulableCondition(node *longhorn.No
if err != nil {
return err
}
if !nc.scheduler.IsSchedulableToDisk(0, 0, info) {
isSchedulableToDisk, message := nc.scheduler.IsSchedulableToDisk(0, 0, info)
if !isSchedulableToDisk {
diskStatus.Conditions = types.SetConditionAndRecord(diskStatus.Conditions,
longhorn.DiskConditionTypeSchedulable, longhorn.ConditionStatusFalse,
string(longhorn.DiskConditionReasonDiskPressure),
fmt.Sprintf("Disk %v (%v) on the node %v has %v available, but requires reserved %v, minimal %v%s to schedule more replicas",
diskName, disk.Path, node.Name, diskStatus.StorageAvailable, disk.StorageReserved, minimalAvailablePercentage, "%"),
fmt.Sprintf("Disk %v (%v) on the node %v is not schedulable for more replica; %s", diskName, disk.Path, node.Name, message),
nc.eventRecorder, node, corev1.EventTypeWarning)
} else {
diskStatus.Conditions = types.SetConditionAndRecord(diskStatus.Conditions,
@ -1301,6 +1297,11 @@ func (nc *NodeController) enqueueNodeForMonitor(key string) {
}
func (nc *NodeController) syncOrphans(node *longhorn.Node, collectedDataInfo map[string]*monitor.CollectedDiskInfo) error {
autoDeleteGracePeriod, err := nc.ds.GetSettingAsInt(types.SettingNameOrphanResourceAutoDeletionGracePeriod)
if err != nil {
return errors.Wrapf(err, "failed to get setting %v", types.SettingNameOrphanResourceAutoDeletionGracePeriod)
}
for diskName, diskInfo := range collectedDataInfo {
newOrphanedReplicaDataStores, missingOrphanedReplicaDataStores :=
nc.getNewAndMissingOrphanedReplicaDataStores(diskName, diskInfo.DiskUUID, diskInfo.Path, diskInfo.OrphanedReplicaDataStores)
@ -1308,7 +1309,7 @@ func (nc *NodeController) syncOrphans(node *longhorn.Node, collectedDataInfo map
if err := nc.createOrphansForReplicaDataStore(node, diskName, diskInfo, newOrphanedReplicaDataStores); err != nil {
return errors.Wrapf(err, "failed to create orphans for disk %v", diskName)
}
if err := nc.deleteOrphansForReplicaDataStore(node, diskName, diskInfo, missingOrphanedReplicaDataStores); err != nil {
if err := nc.deleteOrphansForReplicaDataStore(node, diskName, diskInfo, missingOrphanedReplicaDataStores, autoDeleteGracePeriod); err != nil {
return errors.Wrapf(err, "failed to delete orphans for disk %v", diskName)
}
}
@ -1383,12 +1384,15 @@ func (nc *NodeController) deleteOrphansForEngineAndReplicaInstances(node *longho
return nil
}
func (nc *NodeController) deleteOrphansForReplicaDataStore(node *longhorn.Node, diskName string, diskInfo *monitor.CollectedDiskInfo, missingOrphanedReplicaDataStores map[string]string) error {
autoDeletionResourceTypes, err := nc.ds.GetSettingOrphanResourceAutoDeletion()
func (nc *NodeController) deleteOrphansForReplicaDataStore(node *longhorn.Node, diskName string, diskInfo *monitor.CollectedDiskInfo, missingOrphanedReplicaDataStores map[string]string, autoDeleteGracePeriod int64) error {
autoDeletionTypes, err := nc.ds.GetSettingOrphanResourceAutoDeletion()
if err != nil {
return errors.Wrapf(err, "failed to get %v setting", types.SettingNameOrphanResourceAutoDeletion)
}
autoDeletionEnabled := autoDeletionResourceTypes[types.OrphanResourceTypeReplicaData]
autoDeleteEnabled, ok := autoDeletionTypes[types.OrphanResourceTypeReplicaData]
if !ok {
autoDeleteEnabled = false
}
for dataStore := range missingOrphanedReplicaDataStores {
orphanName := types.GetOrphanChecksumNameForOrphanedDataStore(node.Name, diskName, diskInfo.Path, diskInfo.DiskUUID, dataStore)
@ -1403,16 +1407,7 @@ func (nc *NodeController) deleteOrphansForReplicaDataStore(node *longhorn.Node,
}
for _, orphan := range orphans {
if orphan.Status.OwnerID != nc.controllerID {
continue
}
dataCleanableCondition := types.GetCondition(orphan.Status.Conditions, longhorn.OrphanConditionTypeDataCleanable)
if dataCleanableCondition.Status == longhorn.ConditionStatusUnknown {
continue
}
if autoDeletionEnabled || dataCleanableCondition.Status == longhorn.ConditionStatusFalse {
if nc.canDeleteOrphan(orphan, autoDeleteEnabled, autoDeleteGracePeriod) {
if err := nc.ds.DeleteOrphan(orphan.Name); err != nil && !datastore.ErrorIsNotFound(err) {
return errors.Wrapf(err, "failed to delete orphan %v", orphan.Name)
}
@ -1421,6 +1416,34 @@ func (nc *NodeController) deleteOrphansForReplicaDataStore(node *longhorn.Node,
return nil
}
func (nc *NodeController) canDeleteOrphan(orphan *longhorn.Orphan, autoDeleteEnabled bool, autoDeleteGracePeriod int64) bool {
if orphan.Status.OwnerID != nc.controllerID {
return false
}
dataCleanableCondition := types.GetCondition(orphan.Status.Conditions, longhorn.OrphanConditionTypeDataCleanable)
if dataCleanableCondition.Status == longhorn.ConditionStatusUnknown {
return false
}
autoDeleteAllowed := false
if autoDeleteEnabled {
elapsedTime := time.Since(orphan.CreationTimestamp.Time).Seconds()
if elapsedTime > float64(autoDeleteGracePeriod) {
autoDeleteAllowed = true
}
}
// When dataCleanableCondition is false, it means the associated node is not ready, missing or evicted (check updateDataCleanableCondition()).
// In this case, we can delete the orphan directly because the data is not reachable and no need to keep the orphan resource.
canDelete := autoDeleteAllowed || dataCleanableCondition.Status == longhorn.ConditionStatusFalse
if !canDelete {
nc.logger.Debugf("Orphan %v is not ready to be deleted, autoDeleteAllowed: %v, dataCleanableCondition: %v", orphan.Name, autoDeleteAllowed, dataCleanableCondition.Status)
}
return canDelete
}
func (nc *NodeController) createOrphansForReplicaDataStore(node *longhorn.Node, diskName string, diskInfo *monitor.CollectedDiskInfo, newOrphanedReplicaDataStores map[string]string) error {
for dataStore := range newOrphanedReplicaDataStores {
if err := nc.createOrphan(node, diskName, dataStore, diskInfo); err != nil && !apierrors.IsAlreadyExists(err) {
@ -1553,7 +1576,7 @@ func (nc *NodeController) alignDiskSpecAndStatus(node *longhorn.Node) {
}
func (nc *NodeController) deleteDisk(diskType longhorn.DiskType, diskName, diskUUID, diskPath, diskDriver string) error {
log.Infof("Deleting disk %v with diskUUID %v", diskName, diskUUID)
nc.logger.Infof("Deleting disk %v with diskUUID %v", diskName, diskUUID)
dataEngine := util.GetDataEngineForDiskType(diskType)
@ -1632,7 +1655,7 @@ func (nc *NodeController) syncBackingImageEvictionRequested(node *longhorn.Node)
}
log := getLoggerForNode(nc.logger, node)
diskBackingImageMap, err := nc.ds.GetDiskBackingImageMap()
diskBackingImageMap, err := nc.ds.GetCurrentDiskBackingImageMap()
if err != nil {
return err
}
@ -1644,26 +1667,26 @@ func (nc *NodeController) syncBackingImageEvictionRequested(node *longhorn.Node)
}
backingImagesToSync := []backingImageToSync{}
var diskFileSpecNotSync = false
for diskName, diskSpec := range node.Spec.Disks {
diskStatus := node.Status.DiskStatus[diskName]
diskUUID := diskStatus.DiskUUID
if diskSpec.EvictionRequested || node.Spec.EvictionRequested {
for _, backingImage := range diskBackingImageMap[diskUUID] {
// trigger eviction request
backingImage.Spec.DiskFileSpecMap[diskUUID].EvictionRequested = true
backingImagesToSync = append(backingImagesToSync, backingImageToSync{backingImage, diskUUID, true})
}
} else {
for _, backingImage := range diskBackingImageMap[diskUUID] {
if diskFileSpec, ok := backingImage.Spec.DiskFileSpecMap[diskUUID]; ok && diskFileSpec.EvictionRequested {
// if it is previously set to true, cancel the eviction request
backingImage.Spec.DiskFileSpecMap[diskUUID].EvictionRequested = false
backingImagesToSync = append(backingImagesToSync, backingImageToSync{backingImage, diskUUID, false})
}
requireDiskFileEviction := diskSpec.EvictionRequested || node.Spec.EvictionRequested
for _, backingImage := range diskBackingImageMap[diskUUID] {
// trigger or cancel the eviction request on disks
if diskFileSpec, ok := backingImage.Spec.DiskFileSpecMap[diskUUID]; ok && diskFileSpec.EvictionRequested != requireDiskFileEviction {
diskFileSpec.EvictionRequested = requireDiskFileEviction
backingImagesToSync = append(backingImagesToSync, backingImageToSync{backingImage, diskUUID, requireDiskFileEviction})
} else if !ok {
log.Infof("Evicting missing disk %s from backing image %s. Will enqueue then resync the node %s", diskUUID, backingImage.Name, node.Name)
diskFileSpecNotSync = true
}
}
}
if diskFileSpecNotSync {
nc.enqueueNodeRateLimited(node)
}
for _, backingImageToSync := range backingImagesToSync {
backingImageLog := log.WithField("backingimage", backingImageToSync.Name).WithField("disk", backingImageToSync.diskUUID)

View File

@ -1364,7 +1364,7 @@ func (s *NodeControllerSuite) TestEventOnNotReady(c *C) {
"": {
Type: "Warning",
Reason: "Schedulable",
Message: "Disk fsid (/var/lib/longhorn) on the node test-node-name-1 has 0 available, but requires reserved 0, minimal 25% to schedule more replicas",
Message: "Disk fsid (/var/lib/longhorn) on the node test-node-name-1 is not schedulable for more replica",
},
"node1-not-ready": {
Type: "Warning",
@ -1453,7 +1453,7 @@ func (s *NodeControllerSuite) TestEventOnDiskPressure(c *C) {
"": {
Type: "Warning",
Reason: "Schedulable",
Message: "Disk fsid (/var/lib/longhorn) on the node test-node-name-1 has 0 available, but requires reserved 0, minimal 25% to schedule more replicas",
Message: "Disk fsid (/var/lib/longhorn) on the node test-node-name-1 is not schedulable for more replica",
},
"node1-disk-pressure": {
Type: "Warning",
@ -1542,7 +1542,7 @@ func (s *NodeControllerSuite) TestEventOnMemoryPressure(c *C) {
"": {
Type: "Warning",
Reason: "Schedulable",
Message: "Disk fsid (/var/lib/longhorn) on the node test-node-name-1 has 0 available, but requires reserved 0, minimal 25% to schedule more replicas",
Message: "Disk fsid (/var/lib/longhorn) on the node test-node-name-1 is not schedulable for more replica",
},
"node1-memory-pressure": {
Type: "Warning",
@ -1631,7 +1631,7 @@ func (s *NodeControllerSuite) TestEventOnPidPressure(c *C) {
"": {
Type: "Warning",
Reason: "Schedulable",
Message: "Disk fsid (/var/lib/longhorn) on the node test-node-name-1 has 0 available, but requires reserved 0, minimal 25% to schedule more replicas",
Message: "Disk fsid (/var/lib/longhorn) on the node test-node-name-1 is not schedulable for more replica",
},
"node1-pid-pressure": {
Type: "Warning",
@ -1720,7 +1720,7 @@ func (s *NodeControllerSuite) TestEventOnNetworkPressure(c *C) {
"": {
Type: "Warning",
Reason: "Schedulable",
Message: "Disk fsid (/var/lib/longhorn) on the node test-node-name-1 has 0 available, but requires reserved 0, minimal 25% to schedule more replicas",
Message: "Disk fsid (/var/lib/longhorn) on the node test-node-name-1 is not schedulable for more replica",
},
"node1-network-pressure": {
Type: "Warning",
@ -1820,7 +1820,7 @@ func (s *NodeControllerSuite) TestNoEventOnUnknownTrueNodeCondition(c *C) {
"": {
Type: "Warning",
Reason: "Schedulable",
Message: "Disk fsid (/var/lib/longhorn) on the node test-node-name-1 has 0 available, but requires reserved 0, minimal 25% to schedule more replicas",
Message: "Disk fsid (/var/lib/longhorn) on the node test-node-name-1 is not schedulable for more replica",
},
},
}

View File

@ -23,6 +23,7 @@ import (
lhns "github.com/longhorn/go-common-libs/ns"
"github.com/longhorn/longhorn-manager/constant"
"github.com/longhorn/longhorn-manager/datastore"
"github.com/longhorn/longhorn-manager/engineapi"
"github.com/longhorn/longhorn-manager/types"
@ -157,7 +158,7 @@ func (oc *OrphanController) enqueueForInstanceManager(obj interface{}) {
}
}
orphans, err := oc.ds.ListOrphansByNodeRO(im.Spec.NodeID)
orphans, err := oc.ds.ListInstanceOrphansByInstanceManagerRO(im.Name)
if err != nil {
utilruntime.HandleError(fmt.Errorf("failed to list orphans on instance manager %v since %v", im.Name, err))
return
@ -261,15 +262,30 @@ func (oc *OrphanController) reconcile(orphanName string) (err error) {
log.Infof("Orphan got new owner %v", oc.controllerID)
}
existingOrphan := orphan.DeepCopy()
if !orphan.DeletionTimestamp.IsZero() {
defer func() {
if reflect.DeepEqual(existingOrphan.Status, orphan.Status) {
return
}
if _, updateStatusErr := oc.ds.UpdateOrphanStatus(orphan); updateStatusErr != nil {
log.WithError(updateStatusErr).Errorf("Failed to update condition while cleaning up %v orphan %v", orphan.Spec.Type, orphan.Name)
if err == nil {
err = updateStatusErr
}
}
}()
isCleanupComplete, err := oc.cleanupOrphanedResource(orphan)
if isCleanupComplete {
oc.eventRecorder.Eventf(orphan, corev1.EventTypeNormal, constant.EventReasonOrphanCleanupCompleted, "Orphan %v cleanup completed", orphan.Name)
return oc.ds.RemoveFinalizerForOrphan(orphan)
}
return err
}
existingOrphan := orphan.DeepCopy()
defer func() {
if err != nil {
return
@ -311,8 +327,9 @@ func (oc *OrphanController) cleanupOrphanedResource(orphan *longhorn.Orphan) (is
}
err = errors.Wrapf(err, "failed to delete %v orphan %v", orphan.Spec.Type, orphan.Name)
orphan.Status.Conditions = types.SetCondition(orphan.Status.Conditions,
longhorn.OrphanConditionTypeError, longhorn.ConditionStatusTrue, "", err.Error())
orphan.Status.Conditions = types.SetConditionAndRecord(orphan.Status.Conditions,
longhorn.OrphanConditionTypeError, longhorn.ConditionStatusTrue, "", err.Error(),
oc.eventRecorder, orphan, corev1.EventTypeWarning)
}()
// Make sure if the orphan nodeID and controller ID are the same.
@ -356,21 +373,18 @@ func (oc *OrphanController) cleanupOrphanedEngineInstance(orphan *longhorn.Orpha
}
}()
instance, imName, err := oc.extractOrphanedInstanceInfo(orphan)
if err != nil {
return false, err
}
instanceParameters := getOrphanedInstanceParameters(orphan)
var spec *longhorn.InstanceSpec
if engineCR, err := oc.ds.GetEngineRO(instance); err != nil {
var status *longhorn.InstanceStatus
if engine, err := oc.ds.GetEngineRO(instanceParameters.name); err != nil {
if !datastore.ErrorIsNotFound(err) {
return false, err
}
spec = nil
status = nil
} else {
spec = &engineCR.Spec.InstanceSpec
status = &engine.Status.InstanceStatus
}
oc.cleanupOrphanedInstance(orphan, instance, imName, longhorn.InstanceManagerTypeEngine, spec)
oc.cleanupOrphanedInstance(orphan, instanceParameters.name, instanceParameters.uuid, instanceParameters.instanceManager, longhorn.InstanceManagerTypeEngine, status)
return true, nil
}
@ -381,48 +395,24 @@ func (oc *OrphanController) cleanupOrphanedReplicaInstance(orphan *longhorn.Orph
}
}()
instance, imName, err := oc.extractOrphanedInstanceInfo(orphan)
if err != nil {
return false, err
}
instanceParameters := getOrphanedInstanceParameters(orphan)
var spec *longhorn.InstanceSpec
if replicaCR, err := oc.ds.GetReplicaRO(instance); err != nil {
var status *longhorn.InstanceStatus
if replica, err := oc.ds.GetReplicaRO(instanceParameters.name); err != nil {
if !datastore.ErrorIsNotFound(err) {
return false, err
}
spec = nil
status = nil
} else {
spec = &replicaCR.Spec.InstanceSpec
status = &replica.Status.InstanceStatus
}
oc.cleanupOrphanedInstance(orphan, instance, imName, longhorn.InstanceManagerTypeReplica, spec)
oc.cleanupOrphanedInstance(orphan, instanceParameters.name, instanceParameters.uuid, instanceParameters.instanceManager, longhorn.InstanceManagerTypeReplica, status)
return true, nil
}
func (oc *OrphanController) extractOrphanedInstanceInfo(orphan *longhorn.Orphan) (name, instanceManager string, err error) {
name, ok := orphan.Spec.Parameters[longhorn.OrphanInstanceName]
if !ok {
return "", "", fmt.Errorf("failed to get instance name for instance orphan %v", orphan.Name)
}
instanceManager, ok = orphan.Spec.Parameters[longhorn.OrphanInstanceManager]
if !ok {
return "", "", fmt.Errorf("failed to get instance manager for instance orphan %v", orphan.Name)
}
switch orphan.Spec.DataEngine {
case longhorn.DataEngineTypeV1, longhorn.DataEngineTypeV2:
// supported data engine type
default:
return "", "", fmt.Errorf("unknown data engine type %v for instance orphan %v", orphan.Spec.DataEngine, orphan.Name)
}
return name, instanceManager, nil
}
func (oc *OrphanController) cleanupOrphanedInstance(orphan *longhorn.Orphan, instance, imName string, imType longhorn.InstanceManagerType, instanceCRSpec *longhorn.InstanceSpec) {
if instanceCRSpec != nil && instanceCRSpec.NodeID == orphan.Spec.NodeID {
oc.logger.Infof("Orphan instance %v is scheduled back to current node %v. Skip cleaning up the instance resource and finalize the orphan CR.", instance, orphan.Spec.NodeID)
func (oc *OrphanController) cleanupOrphanedInstance(orphan *longhorn.Orphan, instanceName, instanceUUID, imName string, imType longhorn.InstanceManagerType, instanceCRStatus *longhorn.InstanceStatus) {
if instanceCRStatus != nil && instanceCRStatus.InstanceManagerName == imName {
oc.logger.Infof("Orphan instance %v is scheduled back to instance manager %v. Skip cleaning up the instance resource and finalize the orphan CR.", instanceName, imName)
return
}
@ -430,10 +420,10 @@ func (oc *OrphanController) cleanupOrphanedInstance(orphan *longhorn.Orphan, ins
// Later if the orphaned instance is still reachable, the orphan will be recreated.
imc, err := oc.getRunningInstanceManagerClientForOrphan(orphan, imName)
if err != nil {
oc.logger.WithError(err).Warnf("Failed to delete orphan instance %v due to instance manager client initialization failure. Continue to finalize orphan %v", instance, orphan.Name)
oc.logger.WithError(err).Warnf("Failed to delete orphan instance %v due to instance manager client initialization failure. Continue to finalize orphan %v", instanceName, orphan.Name)
return
} else if imc == nil {
oc.logger.WithField("orphanInstanceNode", orphan.Spec.NodeID).Warnf("No running instance manager for deleting orphan instance %v", orphan.Name)
oc.logger.WithField("instanceManager", imName).Warnf("No running instance manager for deleting orphan instance %v", orphan.Name)
return
}
defer func() {
@ -442,9 +432,9 @@ func (oc *OrphanController) cleanupOrphanedInstance(orphan *longhorn.Orphan, ins
}
}()
err = imc.InstanceDelete(orphan.Spec.DataEngine, instance, string(imType), "", false)
err = imc.InstanceDelete(orphan.Spec.DataEngine, instanceName, instanceUUID, string(imType), "", false)
if err != nil && !types.ErrorIsNotFound(err) {
oc.logger.WithError(err).Warnf("Failed to delete orphan instance %v. Continue to finalize orphan %v", instance, orphan.Name)
oc.logger.WithError(err).Warnf("Failed to delete orphan instance %v with UUID %v. Continue to finalize orphan %v", instanceName, instanceUUID, orphan.Name)
}
}
@ -553,8 +543,8 @@ func (oc *OrphanController) updateInstanceStateCondition(orphan *longhorn.Orphan
orphan.Status.Conditions = types.SetCondition(orphan.Status.Conditions, longhorn.OrphanConditionTypeInstanceExist, status, string(instanceState), "")
}()
instanceName, instanceManager, err := oc.extractOrphanedInstanceInfo(orphan)
im, err := oc.ds.GetInstanceManager(instanceManager)
instanceParameter := getOrphanedInstanceParameters(orphan)
im, err := oc.ds.GetInstanceManager(instanceParameter.instanceManager)
if err != nil {
if datastore.ErrorIsNotFound(err) {
oc.logger.WithError(err).Infof("No instance manager for node %v for update instance state of orphan instance %v", oc.controllerID, orphan.Name)
@ -573,13 +563,16 @@ func (oc *OrphanController) updateInstanceStateCondition(orphan *longhorn.Orphan
}
}()
instance, err := imc.InstanceGet(orphan.Spec.DataEngine, instanceName, string(instanceType))
switch {
case err != nil:
return errors.Wrapf(err, "failed to get instance %v", instanceName)
case instance == nil:
instance, err := imc.InstanceGet(orphan.Spec.DataEngine, instanceParameter.name, string(instanceType))
if err != nil {
if types.ErrorIsNotFound(err) {
instanceState = longhorn.InstanceStateTerminated
} else {
return errors.Wrapf(err, "failed to get instance %v", instanceParameter.name)
}
} else if instance == nil {
instanceState = longhorn.InstanceStateTerminated
default:
} else {
instanceState = instance.Status.State
}
@ -656,3 +649,17 @@ func (oc *OrphanController) checkOrphanedReplicaDataCleanable(node *longhorn.Nod
return ""
}
type orphanedInstanceParameters struct {
name string
uuid string
instanceManager string
}
func getOrphanedInstanceParameters(orphan *longhorn.Orphan) orphanedInstanceParameters {
return orphanedInstanceParameters{
name: orphan.Spec.Parameters[longhorn.OrphanInstanceName],
uuid: orphan.Spec.Parameters[longhorn.OrphanInstanceUUID],
instanceManager: orphan.Spec.Parameters[longhorn.OrphanInstanceManager],
}
}

View File

@ -585,7 +585,7 @@ func (rc *ReplicaController) DeleteInstance(obj interface{}) (err error) {
log.WithField("cleanupRequired", cleanupRequired).Infof("Deleting replica instance on disk %v", r.Spec.DiskPath)
err = c.InstanceDelete(r.Spec.DataEngine, r.Name, string(longhorn.InstanceManagerTypeReplica), r.Spec.DiskID, cleanupRequired)
err = c.InstanceDelete(r.Spec.DataEngine, r.Name, "", string(longhorn.InstanceManagerTypeReplica), r.Spec.DiskID, cleanupRequired)
if err != nil && !types.ErrorIsNotFound(err) {
return err
}

View File

@ -256,10 +256,6 @@ func (sc *SettingController) syncNonDangerZoneSettingsForManagedComponents(setti
if err := sc.syncDefaultLonghornStaticStorageClass(); err != nil {
return err
}
case types.SettingNameOrphanResourceAutoDeletion:
if err := sc.syncOrphanResourceAutoDeletion(); err != nil {
return err
}
}
return nil
@ -900,32 +896,6 @@ func (sc *SettingController) syncDefaultLonghornStaticStorageClass() error {
return err
}
func (sc *SettingController) syncOrphanResourceAutoDeletion() error {
setting, err := sc.ds.GetSettingOrphanResourceAutoDeletion()
if err != nil {
return err
}
var replicaDataCleanupValue string
if setting[types.OrphanResourceTypeReplicaData] {
replicaDataCleanupValue = "true"
} else {
replicaDataCleanupValue = "false"
}
deprecatedSetting, err := sc.ds.GetSetting(types.SettingNameOrphanAutoDeletion)
if err != nil {
return err
}
if replicaDataCleanupValue != deprecatedSetting.Value {
deprecatedSetting.Value = replicaDataCleanupValue
if _, err := sc.ds.UpdateSetting(deprecatedSetting); err != nil {
return err
}
}
return err
}
// updateDataEngine deletes the corresponding instance manager pods immediately if the data engine setting is disabled.
func (sc *SettingController) updateDataEngine(setting types.SettingName) error {
enabled, err := sc.ds.GetSettingAsBool(setting)
@ -1614,7 +1584,6 @@ func (info *ClusterInfo) collectSettings() error {
types.SettingNameKubernetesClusterAutoscalerEnabled: true,
types.SettingNameNodeDownPodDeletionPolicy: true,
types.SettingNameNodeDrainPolicy: true,
types.SettingNameOrphanAutoDeletion: true,
types.SettingNameOrphanResourceAutoDeletion: true,
types.SettingNameRecurringFailedJobsHistoryLimit: true,
types.SettingNameRecurringSuccessfulJobsHistoryLimit: true,

View File

@ -100,7 +100,8 @@ func NewSnapshotController(
sc.cacheSyncs = append(sc.cacheSyncs, ds.EngineInformer.HasSynced)
if _, err = ds.VolumeInformer.AddEventHandlerWithResyncPeriod(cache.ResourceEventHandlerFuncs{
DeleteFunc: sc.enqueueVolumeChange,
UpdateFunc: sc.enqueueVolumeChange,
DeleteFunc: sc.enqueueVolumeDeleted,
}, 0); err != nil {
return nil, err
}
@ -211,7 +212,52 @@ func filterSnapshotsForEngineEnqueuing(oldEngine, curEngine *longhorn.Engine, sn
return targetSnapshots
}
func (sc *SnapshotController) enqueueVolumeChange(obj interface{}) {
// There is a race condition for that all snapshot controllers will not process some snapshots when the volume owner ID changes.
// https://github.com/longhorn/longhorn/issues/10874#issuecomment-2870915401
// In that case, snapshot controllers should enqueue the snapshots again when the volume owner ID changes.
func (sc *SnapshotController) enqueueVolumeChange(old, new interface{}) {
oldVol, ok := old.(*longhorn.Volume)
if !ok {
utilruntime.HandleError(fmt.Errorf("received unexpected obj: %#v", old))
return
}
newVol, ok := new.(*longhorn.Volume)
if !ok {
utilruntime.HandleError(fmt.Errorf("received unexpected obj: %#v", new))
return
}
if !newVol.DeletionTimestamp.IsZero() {
return
}
if oldVol.Status.OwnerID == newVol.Status.OwnerID {
return
}
va, err := sc.ds.GetLHVolumeAttachmentByVolumeName(newVol.Name)
if err != nil {
sc.logger.WithError(err).Warnf("Failed to get volume attachment for volume %s", newVol.Name)
return
}
if va == nil || va.Spec.AttachmentTickets == nil {
return
}
snapshots, err := sc.ds.ListVolumeSnapshotsRO(newVol.Name)
if err != nil {
utilruntime.HandleError(fmt.Errorf("snapshot controller failed to list snapshots when enqueuing volume %v: %v", newVol.Name, err))
return
}
for _, snap := range snapshots {
// Longhorn#10874:
// Requeue the snapshot if there is an attachment ticket for it to ensure the volumeattachment can be cleaned up after the snapshot is created.
attachmentTicketID := longhorn.GetAttachmentTicketID(longhorn.AttacherTypeSnapshotController, snap.Name)
if va.Spec.AttachmentTickets[attachmentTicketID] != nil {
sc.enqueueSnapshot(snap)
}
}
}
func (sc *SnapshotController) enqueueVolumeDeleted(obj interface{}) {
vol, ok := obj.(*longhorn.Volume)
if !ok {
deletedState, ok := obj.(cache.DeletedFinalStateUnknown)
@ -475,8 +521,15 @@ func (sc *SnapshotController) reconcile(snapshotName string) (err error) {
return err
}
// newly created snapshotCR by user
if requestCreateNewSnapshot && !alreadyCreatedBefore {
// Skip handing new snapshot if they already exist in the engine CR.
// The engine may be purging, and the snapshot may be deleted mid-reconciliation,
// potentially lead to a mis-recreation.
//
// https://github.com/longhorn/longhorn/issues/10808
snapshotExistInEngine := isSnapshotExistInEngine(snapshotName, engine)
// Newly created snapshot CR by user
if requestCreateNewSnapshot && !alreadyCreatedBefore && !snapshotExistInEngine {
if err := sc.handleAttachmentTicketCreation(snapshot, false); err != nil {
return err
}

View File

@ -201,7 +201,6 @@ func (c *SupportBundleController) handleErr(err error, key interface{}) {
}
func (c *SupportBundleController) handleStatusUpdate(record *supportBundleRecord, supportBundle *longhorn.SupportBundle, existing *longhorn.SupportBundle, log logrus.FieldLogger) {
var err error
switch record.recordType {
case supportBundleRecordError:
c.recordErrorState(record, supportBundle, log)
@ -234,11 +233,19 @@ func (c *SupportBundleController) handleStatusUpdate(record *supportBundleRecord
isStatusChange := !reflect.DeepEqual(existing.Status, supportBundle.Status)
if isStatusChange {
supportBundle, err = c.ds.UpdateSupportBundleStatus(supportBundle)
if apierrors.IsConflict(errors.Cause(err)) {
_supportBundle, err := c.ds.UpdateSupportBundleStatus(supportBundle)
if err != nil && apierrors.IsConflict(errors.Cause(err)) {
log.WithError(err).Warnf(SupportBundleMsgRequeueOnConflictFmt, supportBundle.Name)
c.enqueue(supportBundle)
}
// Avoid requeue if the object is nil to avoid unnecessary requeue loops.
// This can happen if the update failed, for example, when the object was
// deleted during reconciliation.
if _supportBundle == nil {
log.WithError(err).Warnf("SupportBundle %v is nil after update, skipping requeue", supportBundle.Name)
return
}
supportBundle = _supportBundle
if supportBundle.Status.State != existing.Status.State {
log.Infof(SupportBundleMsgRequeueNextPhaseFmt, supportBundle.Name, supportBundle.Status.State)

View File

@ -940,7 +940,8 @@ func (c *SystemBackupController) isVolumeBackupUpToDate(volume *longhorn.Volume,
lastBackupTime, err := time.Parse(time.RFC3339, lastBackupSnapshot.Status.CreationTime)
if err != nil {
return false, err
log.WithError(err).Warnf("Failed to parse creation time %q for snapshot %v", lastBackupSnapshot.Status.CreationTime, lastBackupSnapshot.Name)
return false, nil
}
// Identify snapshots created after the last backup.

View File

@ -47,6 +47,7 @@ type SystemBackupTestCase struct {
existVolumes map[SystemRolloutCRName]*longhorn.Volume
existBackingImages map[SystemRolloutCRName]*longhorn.BackingImage
existBackups map[string]*longhorn.Backup
existSnapshots map[string]*longhorn.Snapshot
expectError bool
expectErrorConditionMessage string
@ -115,6 +116,70 @@ func (s *TestSuite) TestReconcileSystemBackup(c *C) {
expectState: longhorn.SystemBackupStateBackingImageBackup,
expectNewVolumBackupCount: 0,
},
"system backup create volume backup if-not-present when snapshot creationTime is not set": {
state: longhorn.SystemBackupStateVolumeBackup,
volumeBackupPolicy: longhorn.SystemBackupCreateVolumeBackupPolicyIfNotPresent,
existVolumes: map[SystemRolloutCRName]*longhorn.Volume{
SystemRolloutCRName(TestVolumeName): {
Status: longhorn.VolumeStatus{
LastBackup: "exists",
},
},
},
existBackups: map[string]*longhorn.Backup{
"exists": {
Status: longhorn.BackupStatus{
State: longhorn.BackupStateCompleted,
SnapshotName: "exists",
VolumeName: TestVolumeName,
},
},
},
existSnapshots: map[string]*longhorn.Snapshot{
"exists": {
ObjectMeta: metav1.ObjectMeta{Name: "exists"},
Spec: longhorn.SnapshotSpec{Volume: TestVolumeName},
Status: longhorn.SnapshotStatus{
ReadyToUse: true,
// CreationTime is not set
},
},
},
expectState: longhorn.SystemBackupStateBackingImageBackup,
expectNewVolumBackupCount: 1,
},
"system backup create volume backup if-not-present when snapshot creationTime is null": {
state: longhorn.SystemBackupStateVolumeBackup,
volumeBackupPolicy: longhorn.SystemBackupCreateVolumeBackupPolicyIfNotPresent,
existVolumes: map[SystemRolloutCRName]*longhorn.Volume{
SystemRolloutCRName(TestVolumeName): {
Status: longhorn.VolumeStatus{
LastBackup: "exists",
},
},
},
existBackups: map[string]*longhorn.Backup{
"exists": {
Status: longhorn.BackupStatus{
State: longhorn.BackupStateCompleted,
SnapshotName: "exists",
VolumeName: TestVolumeName,
},
},
},
existSnapshots: map[string]*longhorn.Snapshot{
"exists": {
ObjectMeta: metav1.ObjectMeta{Name: "exists"},
Spec: longhorn.SnapshotSpec{Volume: TestVolumeName},
Status: longhorn.SnapshotStatus{
ReadyToUse: true,
CreationTime: "null",
},
},
},
expectState: longhorn.SystemBackupStateBackingImageBackup,
expectNewVolumBackupCount: 1,
},
"system backup create volume backup always": {
state: longhorn.SystemBackupStateVolumeBackup,
volumeBackupPolicy: longhorn.SystemBackupCreateVolumeBackupPolicyAlways,
@ -276,15 +341,25 @@ func (s *TestSuite) TestReconcileSystemBackup(c *C) {
switch systemBackup.Status.State {
case longhorn.SystemBackupStateVolumeBackup:
if tc.existBackups != nil {
existBackupSnap := &longhorn.Snapshot{
ObjectMeta: metav1.ObjectMeta{Name: "exists"},
Spec: longhorn.SnapshotSpec{Volume: TestVolumeName},
Status: longhorn.SnapshotStatus{
ReadyToUse: true,
CreationTime: metav1.Now().Format(time.RFC3339),
},
existBackupSnapshots := make(map[string]*longhorn.Snapshot)
if tc.existSnapshots == nil {
for _, backup := range tc.existBackups {
existBackupSnapshots[backup.Status.SnapshotName] = &longhorn.Snapshot{
ObjectMeta: metav1.ObjectMeta{Name: backup.Status.SnapshotName},
Spec: longhorn.SnapshotSpec{Volume: TestVolumeName},
Status: longhorn.SnapshotStatus{
ReadyToUse: true,
CreationTime: metav1.Now().Format(time.RFC3339),
},
}
}
} else {
existBackupSnapshots = tc.existSnapshots
}
for _, existBackupSnap := range existBackupSnapshots {
fakeSystemRolloutSnapshot(existBackupSnap, c, informerFactories.LhInformerFactory, lhClient)
}
fakeSystemRolloutSnapshot(existBackupSnap, c, informerFactories.LhInformerFactory, lhClient)
}
backups, _ := systemBackupController.BackupVolumes(systemBackup)

View File

@ -115,3 +115,22 @@ func isBackupTargetAvailable(backupTarget *longhorn.BackupTarget) bool {
backupTarget.Spec.BackupTargetURL != "" &&
backupTarget.Status.Available
}
// isSnapshotExistInEngine checks if a snapshot with the given name exists in the specified engine.
// It returns true if the snapshot is found, otherwise false.
func isSnapshotExistInEngine(snapshotName string, engine *longhorn.Engine) bool {
if engine == nil {
return false
}
if engine.Status.Snapshots == nil {
return false
}
for name := range engine.Status.Snapshots {
if name == snapshotName {
return true
}
}
return false
}

View File

@ -528,7 +528,7 @@ func (c *VolumeController) syncVolume(key string) (err error) {
}
if err := c.ReconcileBackupVolumeState(volume); err != nil {
return nil
return err
}
if err := c.ReconcileVolumeState(volume, engines, replicas); err != nil {
@ -3431,7 +3431,7 @@ func (c *VolumeController) checkAndFinishVolumeRestore(v *longhorn.Volume, e *lo
if err != nil {
return errors.Wrapf(err, "failed to get backup name from volume %s backup URL %v", v.Name, v.Spec.FromBackup)
}
bv, err := c.ds.GetBackupVolumeRO(bvName)
bv, err := c.ds.GetBackupVolumeByBackupTargetAndVolumeRO(v.Spec.BackupTargetName, bvName)
if err != nil && !apierrors.IsNotFound(err) {
return err
}

View File

@ -286,51 +286,58 @@ func (vbc *VolumeRebuildingController) reconcile(volName string) (err error) {
}
}()
isOfflineRebuildEnabled, err := vbc.isVolumeOfflineRebuildEnabled(vol.Spec.OfflineRebuilding)
if err != nil {
return err
}
if !isOfflineRebuildEnabled {
return nil
}
if !vol.DeletionTimestamp.IsZero() {
vbc.logger.Infof("Volume %v is deleting, skip offline rebuilding", volName)
return nil
}
if vol.Status.Robustness == longhorn.VolumeRobustnessFaulted {
vbc.logger.Warnf("Volume %v is faulted, skip offline rebuilding", volName)
return nil
}
isOfflineRebuildEnabled, err := vbc.isVolumeOfflineRebuildEnabled(vol.Spec.OfflineRebuilding)
if err != nil {
return err
if util.IsHigherPriorityVATicketExisting(va, longhorn.AttacherTypeVolumeRebuildingController) {
return nil
}
if isOfflineRebuildEnabled && !util.IsHigherPriorityVATicketExisting(va, longhorn.AttacherTypeVolumeRebuildingController) {
if vol.Status.State == longhorn.VolumeStateDetached {
_, err = vbc.syncLHVolumeAttachmentForOfflineRebuild(vol, va, rebuildingAttachmentTicketID)
if err != nil {
return err
}
deleteVATicketRequired = false
return nil
}
if vol.Status.State == longhorn.VolumeStateAttaching {
deleteVATicketRequired = false
return nil
}
engine, err := vbc.getVolumeEngine(vol)
if vol.Status.State == longhorn.VolumeStateDetached {
_, err = vbc.syncLHVolumeAttachmentForOfflineRebuild(vol, va, rebuildingAttachmentTicketID)
if err != nil {
return err
}
if engine == nil {
vbc.logger.Warnf("Volume %v engine not found, skip offline rebuilding", volName)
return nil
}
deleteVATicketRequired = false
return nil
}
if vol.Status.State == longhorn.VolumeStateAttaching {
deleteVATicketRequired = false
return nil
}
if engine.Status.ReplicaModeMap == nil {
// wait for engine status synced
deleteVATicketRequired = false
return nil
}
if vbc.isVolumeReplicasRebuilding(vol, engine) {
deleteVATicketRequired = false
return nil
}
engine, err := vbc.getVolumeEngine(vol)
if err != nil {
return err
}
if engine == nil {
vbc.logger.Warnf("Volume %v engine not found, skip offline rebuilding", volName)
return nil
}
if engine.Status.ReplicaModeMap == nil {
// wait for engine status synced
deleteVATicketRequired = false
return nil
}
if vbc.isVolumeReplicasRebuilding(vol, engine) {
deleteVATicketRequired = false
return nil
}
return nil

View File

@ -380,6 +380,18 @@ func NewPluginDeployment(namespace, serviceAccount, nodeDriverRegistrarImage, li
Protocol: corev1.ProtocolTCP,
},
},
StartupProbe: &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/healthz",
Port: intstr.FromInt(DefaultCSILivenessProbePort),
},
},
InitialDelaySeconds: datastore.PodProbeInitialDelay,
TimeoutSeconds: datastore.PodProbeTimeoutSeconds,
PeriodSeconds: datastore.PodProbePeriodSeconds,
FailureThreshold: datastore.PodStartupProbeFailureThreshold,
},
LivenessProbe: &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
HTTPGet: &corev1.HTTPGetAction{

View File

@ -1,6 +1,8 @@
package csi
import (
"time"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@ -13,6 +15,9 @@ type Manager struct {
cs *ControllerServer
}
// It can take up to 10s for each try. So total retry time would be 180s
const rancherClientInitMaxRetry = 18
func init() {}
func GetCSIManager() *Manager {
@ -24,9 +29,9 @@ func (m *Manager) Run(driverName, nodeID, endpoint, identityVersion, managerURL
// Longhorn API Client
clientOpts := &longhornclient.ClientOpts{Url: managerURL}
apiClient, err := longhornclient.NewRancherClient(clientOpts)
apiClient, err := initRancherClient(clientOpts)
if err != nil {
return errors.Wrap(err, "Failed to initialize Longhorn API client")
return err
}
// Create GRPC servers
@ -43,3 +48,19 @@ func (m *Manager) Run(driverName, nodeID, endpoint, identityVersion, managerURL
return nil
}
func initRancherClient(clientOpts *longhornclient.ClientOpts) (*longhornclient.RancherClient, error) {
var lastErr error
for i := 0; i < rancherClientInitMaxRetry; i++ {
apiClient, err := longhornclient.NewRancherClient(clientOpts)
if err == nil {
return apiClient, nil
}
logrus.Warnf("Failed to initialize Longhorn API client %v. Retrying", err)
lastErr = err
time.Sleep(time.Second)
}
return nil, errors.Wrap(lastErr, "Failed to initialize Longhorn API client")
}

View File

@ -43,6 +43,7 @@ const (
PodProbeTimeoutSeconds = PodProbePeriodSeconds - 1
PodProbePeriodSeconds = 5
PodLivenessProbeFailureThreshold = 3
PodStartupProbeFailureThreshold = 36
IMPodProbeInitialDelay = 3
IMPodProbeTimeoutSeconds = IMPodProbePeriodSeconds - 1

View File

@ -71,11 +71,19 @@ func (s *DataStore) UpdateCustomizedSettings(defaultImages map[types.SettingName
return err
}
if err := s.syncSettingOrphanResourceAutoDeletionSettings(); err != nil {
return err
}
if err := s.createNonExistingSettingCRsWithDefaultSetting(defaultSettingCM.ResourceVersion); err != nil {
return err
}
return s.syncSettingCRsWithCustomizedDefaultSettings(availableCustomizedDefaultSettings, defaultSettingCM.ResourceVersion)
if err := s.syncSettingCRsWithCustomizedDefaultSettings(availableCustomizedDefaultSettings, defaultSettingCM.ResourceVersion); err != nil {
return err
}
return s.deleteReplacedSettings()
}
func (s *DataStore) createNonExistingSettingCRsWithDefaultSetting(configMapResourceVersion string) error {
@ -155,6 +163,31 @@ func (s *DataStore) syncSettingsWithDefaultImages(defaultImages map[types.Settin
return nil
}
func (s *DataStore) syncSettingOrphanResourceAutoDeletionSettings() error {
oldOrphanReplicaDataAutoDeletionSettingRO, err := s.getSettingRO(string(types.SettingNameOrphanAutoDeletion))
switch {
case ErrorIsNotFound(err):
logrus.Infof("No old setting %v to be replaced.", types.SettingNameOrphanAutoDeletion)
return nil
case err != nil:
return errors.Wrapf(err, "failed to get replaced setting %v", types.SettingNameOrphanAutoDeletion)
}
resourceTypes, err := s.GetSettingOrphanResourceAutoDeletion()
if err != nil {
return errors.Wrapf(err, "failed to get setting %v", types.SettingNameOrphanResourceAutoDeletion)
}
resourceTypes[types.OrphanResourceTypeReplicaData] = oldOrphanReplicaDataAutoDeletionSettingRO.Value == "true"
enabledResourceType := make([]string, 0, len(resourceTypes))
for rt, enabled := range resourceTypes {
if enabled {
enabledResourceType = append(enabledResourceType, string(rt))
}
}
value := strings.Join(enabledResourceType, ";")
return s.createOrUpdateSetting(types.SettingNameOrphanResourceAutoDeletion, value, "")
}
func (s *DataStore) createOrUpdateSetting(name types.SettingName, value, defaultSettingCMResourceVersion string) error {
setting, err := s.GetSettingExact(name)
if err != nil {
@ -235,6 +268,23 @@ func (s *DataStore) syncSettingCRsWithCustomizedDefaultSettings(customizedDefaul
return nil
}
func (s *DataStore) deleteReplacedSettings() error {
settings, err := s.settingLister.Settings(s.namespace).List(labels.Everything())
if err != nil {
return err
}
for _, setting := range settings {
if !types.IsSettingReplaced(types.SettingName(setting.Name)) {
continue
}
if err := s.deleteSetting(setting.Name); err != nil {
return err
}
}
return nil
}
// CreateSetting create a Longhorn Settings resource for the given setting and
// namespace
func (s *DataStore) CreateSetting(setting *longhorn.Setting) (*longhorn.Setting, error) {
@ -277,6 +327,10 @@ func (s *DataStore) UpdateSettingStatus(setting *longhorn.Setting) (*longhorn.Se
return obj, nil
}
func (s *DataStore) deleteSetting(name string) error {
return s.lhClient.LonghornV1beta2().Settings(s.namespace).Delete(context.TODO(), name, metav1.DeleteOptions{})
}
// ValidateSetting checks the given setting value types and condition
func (s *DataStore) ValidateSetting(name, value string) (err error) {
defer func() {
@ -3114,6 +3168,14 @@ func getLonghornNodeSelector(nodeName string) (labels.Selector, error) {
})
}
func getInstanceManagerSelector(name string) (labels.Selector, error) {
return metav1.LabelSelectorAsSelector(&metav1.LabelSelector{
MatchLabels: map[string]string{
types.LonghornInstanceManagerKey: name,
},
})
}
// ListReplicasByNode gets a map of Replicas on the node Name for the given namespace.
func (s *DataStore) ListReplicasByNode(name string) (map[string]*longhorn.Replica, error) {
nodeSelector, err := getNodeSelector(name)
@ -3136,17 +3198,22 @@ func (s *DataStore) ListReplicasByDiskUUID(uuid string) (map[string]*longhorn.Re
return s.listReplicas(diskSelector)
}
func getBackingImageSelector(backingImageName string) (labels.Selector, error) {
func getBackingImageSelector(backingImageName, diskUUID string) (labels.Selector, error) {
matchLabels := map[string]string{
types.GetLonghornLabelKey(types.LonghornLabelBackingImage): backingImageName,
}
if diskUUID != "" {
matchLabels[types.LonghornDiskUUIDKey] = diskUUID
}
return metav1.LabelSelectorAsSelector(&metav1.LabelSelector{
MatchLabels: map[string]string{
types.GetLonghornLabelKey(types.LonghornLabelBackingImage): backingImageName,
},
MatchLabels: matchLabels,
})
}
// ListReplicasByBackingImage gets a list of Replicas using a specific backing image the given namespace.
func (s *DataStore) ListReplicasByBackingImage(backingImageName string) ([]*longhorn.Replica, error) {
backingImageSelector, err := getBackingImageSelector(backingImageName)
// If diskUUID is not empty, it will also filter the replicas by the diskUUID.
func (s *DataStore) ListReplicasByBackingImage(backingImageName, diskUUID string) ([]*longhorn.Replica, error) {
backingImageSelector, err := getBackingImageSelector(backingImageName, diskUUID)
if err != nil {
return nil, err
}
@ -5245,9 +5312,9 @@ func (s *DataStore) ListOrphans() (map[string]*longhorn.Orphan, error) {
return s.listOrphans(labels.Everything())
}
// ListOrphansByNode gets a map of Orphans on the node Name for the given namespace.
func (s *DataStore) ListOrphansByNode(name string) (map[string]*longhorn.Orphan, error) {
nodeSelector, err := getNodeSelector(name)
// ListOrphansByInstanceManager gets a map of Orphans managed by instance manager Name for the given namespace.
func (s *DataStore) ListOrphansByInstanceManager(name string) (map[string]*longhorn.Orphan, error) {
nodeSelector, err := getInstanceManagerSelector(name)
if err != nil {
return nil, err
}
@ -5270,11 +5337,11 @@ func (s *DataStore) ListOrphansByNodeRO(name string) ([]*longhorn.Orphan, error)
return s.orphanLister.Orphans(s.namespace).List(nodeSelector)
}
// ListOrphansForEngineAndReplicaInstancesRO returns a list of all engine and replica instance Orphans on node Name for the given namespace,
// ListInstanceOrphansByInstanceManagerRO returns a list of all engine and replica instance Orphans on instance manager Name for the given namespace,
// the list contains direct references to the internal cache objects and should not be mutated.
// Consider using this function when you can guarantee read only access and don't want the overhead of deep copies
func (s *DataStore) ListOrphansForEngineAndReplicaInstancesRO(name string) (orphanList []*longhorn.Orphan, err error) {
existOrphans, err := s.ListOrphansByNode(name)
func (s *DataStore) ListInstanceOrphansByInstanceManagerRO(instanceManager string) (orphanList []*longhorn.Orphan, err error) {
existOrphans, err := s.ListOrphansByInstanceManager(instanceManager)
if err != nil {
return nil, err
}
@ -5904,7 +5971,7 @@ func (s *DataStore) IsV2DataEngineDisabledForNode(nodeName string) (bool, error)
return false, nil
}
func (s *DataStore) GetDiskBackingImageMap() (map[string][]*longhorn.BackingImage, error) {
func (s *DataStore) GetCurrentDiskBackingImageMap() (map[string][]*longhorn.BackingImage, error) {
diskBackingImageMap := map[string][]*longhorn.BackingImage{}
backingImages, err := s.ListBackingImages()
if err != nil {

View File

@ -292,6 +292,7 @@ func parseInstance(p *imapi.Instance) *longhorn.InstanceProcess {
TargetPortStart: p.InstanceStatus.TargetPortStart,
TargetPortEnd: p.InstanceStatus.TargetPortEnd,
UblkID: p.InstanceStatus.UblkID,
UUID: p.InstanceStatus.UUID,
// FIXME: These fields are not used, maybe we can deprecate them later.
Listen: "",
@ -317,6 +318,7 @@ func parseProcess(p *imapi.Process) *longhorn.InstanceProcess {
Conditions: p.ProcessStatus.Conditions,
PortStart: p.ProcessStatus.PortStart,
PortEnd: p.ProcessStatus.PortEnd,
UUID: p.ProcessStatus.UUID,
// FIXME: These fields are not used, maybe we can deprecate them later.
Listen: "",
@ -587,13 +589,13 @@ func (c *InstanceManagerClient) ReplicaInstanceCreate(req *ReplicaInstanceCreate
return parseInstance(instance), nil
}
// InstanceDelete deletes the instance
func (c *InstanceManagerClient) InstanceDelete(dataEngine longhorn.DataEngineType, name, kind, diskUUID string, cleanupRequired bool) (err error) {
// InstanceDelete deletes the instance by name. UUID will be validated if not empty.
func (c *InstanceManagerClient) InstanceDelete(dataEngine longhorn.DataEngineType, name, uuid, kind, diskUUID string, cleanupRequired bool) (err error) {
if c.GetAPIVersion() < 4 {
/* Fall back to the old way of deleting process */
_, err = c.processManagerGrpcClient.ProcessDelete(name)
_, err = c.processManagerGrpcClient.ProcessDelete(name, uuid)
} else {
_, err = c.instanceServiceGrpcClient.InstanceDelete(string(dataEngine), name, kind, diskUUID, cleanupRequired)
_, err = c.instanceServiceGrpcClient.InstanceDelete(string(dataEngine), name, uuid, kind, diskUUID, cleanupRequired)
}
return err

142
go.mod
View File

@ -2,7 +2,7 @@ module github.com/longhorn/longhorn-manager
go 1.24.0
toolchain go1.24.2
toolchain go1.24.5
// Replace directives are required for dependencies in this section because:
// - This module imports k8s.io/kubernetes.
@ -20,38 +20,38 @@ toolchain go1.24.2
// necessary. However, it is better to include all of them for consistency.
replace (
k8s.io/api => k8s.io/api v0.33.0
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.33.0
k8s.io/apimachinery => k8s.io/apimachinery v0.33.0
k8s.io/apiserver => k8s.io/apiserver v0.33.0
k8s.io/cli-runtime => k8s.io/cli-runtime v0.33.0
k8s.io/client-go => k8s.io/client-go v0.33.0
k8s.io/cloud-provider => k8s.io/cloud-provider v0.33.0
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.33.0
k8s.io/code-generator => k8s.io/code-generator v0.33.0
k8s.io/component-base => k8s.io/component-base v0.33.0
k8s.io/component-helpers => k8s.io/component-helpers v0.33.0
k8s.io/controller-manager => k8s.io/controller-manager v0.33.0
k8s.io/cri-api => k8s.io/cri-api v0.33.0
k8s.io/cri-client => k8s.io/cri-client v0.33.0
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.33.0
k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.33.0
k8s.io/endpointslice => k8s.io/endpointslice v0.33.0
k8s.io/externaljwt => k8s.io/externaljwt v0.33.0
k8s.io/kms => k8s.io/kms v0.33.0
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.33.0
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.33.0
k8s.io/kube-proxy => k8s.io/kube-proxy v0.33.0
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.33.0
k8s.io/kubectl => k8s.io/kubectl v0.33.0
k8s.io/kubelet => k8s.io/kubelet v0.33.0
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.30.11
k8s.io/metrics => k8s.io/metrics v0.33.0
k8s.io/mount-utils => k8s.io/mount-utils v0.33.0
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.33.0
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.33.0
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.33.0
k8s.io/sample-controller => k8s.io/sample-controller v0.33.0
k8s.io/api => k8s.io/api v0.33.3
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.33.3
k8s.io/apimachinery => k8s.io/apimachinery v0.33.3
k8s.io/apiserver => k8s.io/apiserver v0.33.3
k8s.io/cli-runtime => k8s.io/cli-runtime v0.33.3
k8s.io/client-go => k8s.io/client-go v0.33.3
k8s.io/cloud-provider => k8s.io/cloud-provider v0.33.3
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.33.3
k8s.io/code-generator => k8s.io/code-generator v0.33.3
k8s.io/component-base => k8s.io/component-base v0.33.3
k8s.io/component-helpers => k8s.io/component-helpers v0.33.3
k8s.io/controller-manager => k8s.io/controller-manager v0.33.3
k8s.io/cri-api => k8s.io/cri-api v0.33.3
k8s.io/cri-client => k8s.io/cri-client v0.33.3
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.33.3
k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.33.3
k8s.io/endpointslice => k8s.io/endpointslice v0.33.3
k8s.io/externaljwt => k8s.io/externaljwt v0.33.3
k8s.io/kms => k8s.io/kms v0.33.3
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.33.3
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.33.3
k8s.io/kube-proxy => k8s.io/kube-proxy v0.33.3
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.33.3
k8s.io/kubectl => k8s.io/kubectl v0.33.3
k8s.io/kubelet => k8s.io/kubelet v0.33.3
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.30.14
k8s.io/metrics => k8s.io/metrics v0.33.3
k8s.io/mount-utils => k8s.io/mount-utils v0.33.3
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.33.3
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.33.3
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.33.3
k8s.io/sample-controller => k8s.io/sample-controller v0.33.3
)
require (
@ -64,39 +64,39 @@ require (
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674
github.com/jinzhu/copier v0.4.0
github.com/kubernetes-csi/csi-lib-utils v0.21.0
github.com/longhorn/backing-image-manager v1.8.1
github.com/longhorn/backupstore v0.0.0-20250421031654-0ef762b84472
github.com/longhorn/go-common-libs v0.0.0-20250419062810-2bdafe8e7f4e
github.com/longhorn/go-iscsi-helper v0.0.0-20250425050615-1de428a1281a
github.com/longhorn/go-spdk-helper v0.0.0-20250422073040-bb5fe0ae1d17
github.com/longhorn/longhorn-engine v1.9.0-dev-20250223.0.20250225091521-921f63f3a87d
github.com/longhorn/longhorn-instance-manager v1.9.0-dev-20250420.0.20250421223422-3c87f4a9aaa5
github.com/longhorn/longhorn-share-manager v1.8.1
github.com/longhorn/backing-image-manager v1.9.1
github.com/longhorn/backupstore v0.0.0-20250716050439-d920cc13cf0f
github.com/longhorn/go-common-libs v0.0.0-20250712065607-11215ac4de96
github.com/longhorn/go-iscsi-helper v0.0.0-20250713130221-69ce6f3960fa
github.com/longhorn/go-spdk-helper v0.0.2
github.com/longhorn/longhorn-engine v1.9.1
github.com/longhorn/longhorn-instance-manager v1.10.0-dev-20250518.0.20250519060809-955e286a739c
github.com/longhorn/longhorn-share-manager v1.9.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.22.0
github.com/rancher/dynamiclistener v0.6.2
github.com/rancher/go-rancher v0.1.1-0.20220412083059-ff12399dd57b
github.com/rancher/wrangler/v3 v3.2.0
github.com/rancher/wrangler/v3 v3.2.2
github.com/robfig/cron v1.2.0
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.10.0
github.com/urfave/cli v1.22.16
golang.org/x/mod v0.24.0
golang.org/x/net v0.39.0
golang.org/x/sys v0.32.0
github.com/urfave/cli v1.22.17
golang.org/x/mod v0.26.0
golang.org/x/net v0.40.0
golang.org/x/sys v0.33.0
golang.org/x/time v0.11.0
google.golang.org/grpc v1.72.0
google.golang.org/grpc v1.73.0
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.33.0
k8s.io/apiextensions-apiserver v0.33.0
k8s.io/apimachinery v0.33.0
k8s.io/cli-runtime v0.33.0
k8s.io/client-go v0.33.0
k8s.io/kubernetes v1.33.0
k8s.io/metrics v0.33.0
k8s.io/mount-utils v0.33.0
k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e
k8s.io/api v0.33.3
k8s.io/apiextensions-apiserver v0.33.3
k8s.io/apimachinery v0.33.3
k8s.io/cli-runtime v0.33.3
k8s.io/client-go v0.33.3
k8s.io/kubernetes v1.33.3
k8s.io/metrics v0.33.3
k8s.io/mount-utils v0.33.3
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
sigs.k8s.io/controller-runtime v0.20.4
)
@ -106,15 +106,15 @@ require (
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/longhorn/types v0.0.0-20250416235128-0c407ad2b792 // indirect
github.com/longhorn/types v0.0.0-20250710112743-e3a1e9e2a9c1 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/shirou/gopsutil/v3 v3.24.5 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
@ -127,7 +127,7 @@ require (
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
@ -159,29 +159,29 @@ require (
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rancher/lasso v0.2.1
github.com/rancher/lasso v0.2.3 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/slok/goresilience v0.2.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.opentelemetry.io/otel v1.34.0 // indirect
go.opentelemetry.io/otel/trace v1.34.0 // indirect
go.opentelemetry.io/otel v1.35.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0
golang.org/x/crypto v0.37.0 // indirect
golang.org/x/oauth2 v0.27.0 // indirect
golang.org/x/sync v0.13.0
golang.org/x/term v0.31.0 // indirect
golang.org/x/text v0.24.0
golang.org/x/crypto v0.38.0 // indirect
golang.org/x/oauth2 v0.28.0 // indirect
golang.org/x/sync v0.16.0
golang.org/x/term v0.32.0 // indirect
golang.org/x/text v0.25.0
google.golang.org/protobuf v1.36.6
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/apiserver v0.33.0 // indirect
k8s.io/component-base v0.33.0 // indirect
k8s.io/apiserver v0.33.3 // indirect
k8s.io/component-base v0.33.3 // indirect
k8s.io/component-helpers v0.33.0 // indirect
k8s.io/controller-manager v0.33.0 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-aggregator v0.32.1 // indirect
k8s.io/kube-aggregator v0.33.1 // indirect
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
k8s.io/kubelet v0.0.0 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect

187
go.sum
View File

@ -1,6 +1,6 @@
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0=
@ -16,8 +16,8 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/container-storage-interface/spec v1.11.0 h1:H/YKTOeUZwHtyPOr9raR+HgFmGluGCklulxDYxSdVNM=
github.com/container-storage-interface/spec v1.11.0/go.mod h1:DtUvaQszPml1YJfIK7c00mlv6/g4wNMLanLgiUbKFRI=
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
@ -109,24 +109,24 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/longhorn/backing-image-manager v1.8.1 h1:Va/Ncu1YCksUelegLF7HmawgZqt9/lfpLV/Rcbh09O8=
github.com/longhorn/backing-image-manager v1.8.1/go.mod h1:SC3vqkxf6ntuMQmZ902IBExROqGy7JSMlqyE4tf4c6o=
github.com/longhorn/backupstore v0.0.0-20250421031654-0ef762b84472 h1:nKpF/SLYj9Gw6PJPsuz23OxjHhe7iT8ObIN8NUSZhtE=
github.com/longhorn/backupstore v0.0.0-20250421031654-0ef762b84472/go.mod h1:pcMa85HhY/6QuPOMYx/THntdmkxyXa1p1RAOsXFen/8=
github.com/longhorn/go-common-libs v0.0.0-20250419062810-2bdafe8e7f4e h1:Pw6nJB8C8wB6usM7bSkGhYxbWaa/SNESh1yoFboazuY=
github.com/longhorn/go-common-libs v0.0.0-20250419062810-2bdafe8e7f4e/go.mod h1:O5c6VGDM2EiYdBmaz9DlVf0o4vvBf1bJaF4m1aQ1kvU=
github.com/longhorn/go-iscsi-helper v0.0.0-20250425050615-1de428a1281a h1:rvUgmO0v6LTpIqoGn0n3nLFmchHyvoVZ8EePnt4bEqA=
github.com/longhorn/go-iscsi-helper v0.0.0-20250425050615-1de428a1281a/go.mod h1:6otI70HGdPUKJTRHCU9qlcpFJO6b5LXSrVWy3pciNww=
github.com/longhorn/go-spdk-helper v0.0.0-20250422073040-bb5fe0ae1d17 h1:zkhXghEfmRNpyI6qZACc2LvpQqF3VEZF2Z40veEeEZY=
github.com/longhorn/go-spdk-helper v0.0.0-20250422073040-bb5fe0ae1d17/go.mod h1:92fHXPUhed51zY2ZzlaNDwN5+p3n/iJgBz4C0Y1ADgc=
github.com/longhorn/longhorn-engine v1.9.0-dev-20250223.0.20250225091521-921f63f3a87d h1:JdkTIIaKT0uUU80Ncl26JeAqT727PgPJMaqjf0OUfAE=
github.com/longhorn/longhorn-engine v1.9.0-dev-20250223.0.20250225091521-921f63f3a87d/go.mod h1:qTsHK0nU6Myh4XGnuqfsPG4FpeLh7Vki2hLl/1P0iuc=
github.com/longhorn/longhorn-instance-manager v1.9.0-dev-20250420.0.20250421223422-3c87f4a9aaa5 h1:T4qxmnrWHtv+GXTradhuf8z+5o9p6W2HvnUrmgRf88s=
github.com/longhorn/longhorn-instance-manager v1.9.0-dev-20250420.0.20250421223422-3c87f4a9aaa5/go.mod h1:F/3UgM1ms5B+SfbOY4qWMqYwW+8NNiaVs2FrotTsiJc=
github.com/longhorn/longhorn-share-manager v1.8.1 h1:WJkn4kLXWcROTOeZ17zVe6MxwFkzF6KaEKq7ZelobZM=
github.com/longhorn/longhorn-share-manager v1.8.1/go.mod h1:3GpCj+P339UeCUsAvinlmq2tn8+qD7yaq6I/El/STfQ=
github.com/longhorn/types v0.0.0-20250416235128-0c407ad2b792 h1:+KWYQQKGCBnoy7Our2ryJ9HtUksKf3OPaLVMfsxPzMk=
github.com/longhorn/types v0.0.0-20250416235128-0c407ad2b792/go.mod h1:3jHuVDtpkXQzpnp4prguDBskVRric2kmF8aSPkRJ4jw=
github.com/longhorn/backing-image-manager v1.9.1 h1:amT5BDkBJnnmlJYfPfA2m0o3zdvArf7e/DSsbgOquX0=
github.com/longhorn/backing-image-manager v1.9.1/go.mod h1:a9UGK3bsd1Gj0kbN5tKev5/uaSwjOvoHqZzLqMMqnU0=
github.com/longhorn/backupstore v0.0.0-20250716050439-d920cc13cf0f h1:fxgi/MLL2RjMUgaodx6pxPsqRRbDOTjd/0MabqbowrE=
github.com/longhorn/backupstore v0.0.0-20250716050439-d920cc13cf0f/go.mod h1:zVJtOEHBCFmboACEjy8rtbUVYrrtknN4DIVJ9gd1TJQ=
github.com/longhorn/go-common-libs v0.0.0-20250712065607-11215ac4de96 h1:+SN5T/B6WvJjlzKWDqswziq9k11XOxK27KlCTrbalW0=
github.com/longhorn/go-common-libs v0.0.0-20250712065607-11215ac4de96/go.mod h1:WJowu2xRMEZ2B9K+SPQCUQpFoiC6yZiAHLZx2cR34QE=
github.com/longhorn/go-iscsi-helper v0.0.0-20250713130221-69ce6f3960fa h1:J0DyOSate7Vf+zlHYB5WrCTWJfshEsSJDp161GjBmhI=
github.com/longhorn/go-iscsi-helper v0.0.0-20250713130221-69ce6f3960fa/go.mod h1:fN9H878mLjAqSbPxEXpOCwvTlt43h+/CZxXrQlX/iMQ=
github.com/longhorn/go-spdk-helper v0.0.2 h1:cK7obTyCI1ytm0SMaUEjwsHeX6hK+82kPjuAQkf+Tvg=
github.com/longhorn/go-spdk-helper v0.0.2/go.mod h1:lZYWKf8YNOV4TSf57u8Tj1ilDQLQlW2M/HgFlecoRno=
github.com/longhorn/longhorn-engine v1.9.1 h1:DlkcXhwmR2b6ATwZeaQr8hG4i8Mf4SLcXcIzgnl6jaI=
github.com/longhorn/longhorn-engine v1.9.1/go.mod h1:40+Fw+/PV78DDFYWXUfJHmrZ8QGfFaisC9m9YRnw4xg=
github.com/longhorn/longhorn-instance-manager v1.10.0-dev-20250518.0.20250519060809-955e286a739c h1:W9/fwmx/uhCzZfE9g7Lf6i4VaD6fl20IgeQF1cFblrU=
github.com/longhorn/longhorn-instance-manager v1.10.0-dev-20250518.0.20250519060809-955e286a739c/go.mod h1:8gfwbZRPzNazr3eLPm3/JS2pQIdflj0yFn1J4E4vLy8=
github.com/longhorn/longhorn-share-manager v1.9.1 h1:ObRP8lnNOncRg9podwrPrqObBXJsQDlPfNwslxkBRhM=
github.com/longhorn/longhorn-share-manager v1.9.1/go.mod h1:vYqc2o+6xTlgdlweIeED4Do/n+0/4I3AbD6jQ5OHfcg=
github.com/longhorn/types v0.0.0-20250710112743-e3a1e9e2a9c1 h1:Lox/NlebN9jOc9JXokB270iyeMlyUw9gRePBy5LKwz0=
github.com/longhorn/types v0.0.0-20250710112743-e3a1e9e2a9c1/go.mod h1:3bhH8iUZGZT3kA/B1DYMGzpdzfacqeexOt4SHo4/C2I=
github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4=
github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
@ -179,10 +179,10 @@ github.com/rancher/dynamiclistener v0.6.2 h1:F0SEJhvO2aFe0eTvKGlQoy5x7HtwK8oJbyI
github.com/rancher/dynamiclistener v0.6.2/go.mod h1:ncmVR7qR8kR1o6xNkTcVS2mZ9WtlljimBilIlNjdyzc=
github.com/rancher/go-rancher v0.1.1-0.20220412083059-ff12399dd57b h1:so40GMVZOZkQeIbAzaZRq6wDrMErvRLuXNsGTRZUpg8=
github.com/rancher/go-rancher v0.1.1-0.20220412083059-ff12399dd57b/go.mod h1:7oQvGNiJsGvrUgB+7AH8bmdzuR0uhULfwKb43Ht0hUk=
github.com/rancher/lasso v0.2.1 h1:SZTqMVQn8cAOqvwGBd1/EYOIJ/MGN+UfJrOWvHd4jHU=
github.com/rancher/lasso v0.2.1/go.mod h1:KSV3jBXfdXqdCuMm2uC8kKB9q/wuDYb3h0eHZoRjShM=
github.com/rancher/wrangler/v3 v3.2.0 h1:fZmhSOczW+pxAhyOaGG+9xbEwETPGA5gbS0x0Im2zWs=
github.com/rancher/wrangler/v3 v3.2.0/go.mod h1:0C5QyvSrQOff8gQQzpB/L/FF03EQycjR3unSJcKCHno=
github.com/rancher/lasso v0.2.3 h1:74/z/C/O3ykhyMrRuEgc9kVyYiSoS7kp5BAijlcyXDg=
github.com/rancher/lasso v0.2.3/go.mod h1:G+KeeOaKRjp+qGp0bV6VbLhYrq1vHbJPbDh40ejg5yE=
github.com/rancher/wrangler/v3 v3.2.2 h1:IK1/v8n8gaZSB4izmJhGFXJt38Z8gkbwzl3Lo/e2jQc=
github.com/rancher/wrangler/v3 v3.2.2/go.mod h1:TA1QuuQxrtn/kmJbBLW/l24IcfHBmSXBa9an3IRlqQQ=
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
@ -219,11 +219,10 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/urfave/cli v1.22.16 h1:MH0k6uJxdwdeWQTwhSO42Pwr4YLrNLwBtg1MRgTqPdQ=
github.com/urfave/cli v1.22.16/go.mod h1:EeJR6BKodywf4zciqrdw6hpCPk68JO9z5LazXZMn5Po=
github.com/urfave/cli v1.22.17 h1:SYzXoiPfQjHBbkYxbew5prZHS1TOLT3ierW8SYLqtVQ=
github.com/urfave/cli v1.22.17/go.mod h1:b0ht0aqgH/6pBYzzxURyrM4xXNgsoT/n2ZzwQiEhNVo=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@ -232,51 +231,51 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY=
go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg=
go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o=
go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w=
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU=
go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM=
go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko=
go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE=
golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc=
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM=
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8=
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc h1:TS73t7x3KarrNd5qAipmspBDS1rkMcgVG/fS1aRb4Rc=
golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc=
golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610=
golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -285,30 +284,30 @@ golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20=
golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o=
golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0=
golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0=
golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU=
golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s=
golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0=
golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw=
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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a h1:51aaUVRocpvUOSQKM6Q7VuoaktNIaMCLuhZB6DKksq4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a/go.mod h1:uRxBH1mhmO8PGhU89cMcHaXKZqO+OfakD8QQO0oYwlQ=
google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM=
google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 h1:e0AIkUUhxyBKh6ssZNrAMeqhA7RKUj42346d1y02i2g=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok=
google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc=
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@ -325,40 +324,40 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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=
k8s.io/api v0.33.0 h1:yTgZVn1XEe6opVpP1FylmNrIFWuDqe2H0V8CT5gxfIU=
k8s.io/api v0.33.0/go.mod h1:CTO61ECK/KU7haa3qq8sarQ0biLq2ju405IZAd9zsiM=
k8s.io/apiextensions-apiserver v0.33.0 h1:d2qpYL7Mngbsc1taA4IjJPRJ9ilnsXIrndH+r9IimOs=
k8s.io/apiextensions-apiserver v0.33.0/go.mod h1:VeJ8u9dEEN+tbETo+lFkwaaZPg6uFKLGj5vyNEwwSzc=
k8s.io/apimachinery v0.33.0 h1:1a6kHrJxb2hs4t8EE5wuR/WxKDwGN1FKH3JvDtA0CIQ=
k8s.io/apimachinery v0.33.0/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
k8s.io/apiserver v0.33.0 h1:QqcM6c+qEEjkOODHppFXRiw/cE2zP85704YrQ9YaBbc=
k8s.io/apiserver v0.33.0/go.mod h1:EixYOit0YTxt8zrO2kBU7ixAtxFce9gKGq367nFmqI8=
k8s.io/cli-runtime v0.33.0 h1:Lbl/pq/1o8BaIuyn+aVLdEPHVN665tBAXUePs8wjX7c=
k8s.io/cli-runtime v0.33.0/go.mod h1:QcA+r43HeUM9jXFJx7A+yiTPfCooau/iCcP1wQh4NFw=
k8s.io/client-go v0.33.0 h1:UASR0sAYVUzs2kYuKn/ZakZlcs2bEHaizrrHUZg0G98=
k8s.io/client-go v0.33.0/go.mod h1:kGkd+l/gNGg8GYWAPr0xF1rRKvVWvzh9vmZAMXtaKOg=
k8s.io/component-base v0.33.0 h1:Ot4PyJI+0JAD9covDhwLp9UNkUja209OzsJ4FzScBNk=
k8s.io/component-base v0.33.0/go.mod h1:aXYZLbw3kihdkOPMDhWbjGCO6sg+luw554KP51t8qCU=
k8s.io/component-helpers v0.33.0 h1:0AdW0A0mIgljLgtG0hJDdJl52PPqTrtMgOgtm/9i/Ys=
k8s.io/component-helpers v0.33.0/go.mod h1:9SRiXfLldPw9lEEuSsapMtvT8j/h1JyFFapbtybwKvU=
k8s.io/controller-manager v0.33.0 h1:O9LnTjffOe62d66gMcKLuPXsBjY5sqETWEIzg+DVL8w=
k8s.io/controller-manager v0.33.0/go.mod h1:vQwAQnroav4+UyE2acW1Rj6CSsHPzr2/018kgRLYqlI=
k8s.io/api v0.33.3 h1:SRd5t//hhkI1buzxb288fy2xvjubstenEKL9K51KBI8=
k8s.io/api v0.33.3/go.mod h1:01Y/iLUjNBM3TAvypct7DIj0M0NIZc+PzAHCIo0CYGE=
k8s.io/apiextensions-apiserver v0.33.3 h1:qmOcAHN6DjfD0v9kxL5udB27SRP6SG/MTopmge3MwEs=
k8s.io/apiextensions-apiserver v0.33.3/go.mod h1:oROuctgo27mUsyp9+Obahos6CWcMISSAPzQ77CAQGz8=
k8s.io/apimachinery v0.33.3 h1:4ZSrmNa0c/ZpZJhAgRdcsFcZOw1PQU1bALVQ0B3I5LA=
k8s.io/apimachinery v0.33.3/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
k8s.io/apiserver v0.33.3 h1:Wv0hGc+QFdMJB4ZSiHrCgN3zL3QRatu56+rpccKC3J4=
k8s.io/apiserver v0.33.3/go.mod h1:05632ifFEe6TxwjdAIrwINHWE2hLwyADFk5mBsQa15E=
k8s.io/cli-runtime v0.33.3 h1:Dgy4vPjNIu8LMJBSvs8W0LcdV0PX/8aGG1DA1W8lklA=
k8s.io/cli-runtime v0.33.3/go.mod h1:yklhLklD4vLS8HNGgC9wGiuHWze4g7x6XQZ+8edsKEo=
k8s.io/client-go v0.33.3 h1:M5AfDnKfYmVJif92ngN532gFqakcGi6RvaOF16efrpA=
k8s.io/client-go v0.33.3/go.mod h1:luqKBQggEf3shbxHY4uVENAxrDISLOarxpTKMiUuujg=
k8s.io/component-base v0.33.3 h1:mlAuyJqyPlKZM7FyaoM/LcunZaaY353RXiOd2+B5tGA=
k8s.io/component-base v0.33.3/go.mod h1:ktBVsBzkI3imDuxYXmVxZ2zxJnYTZ4HAsVj9iF09qp4=
k8s.io/component-helpers v0.33.3 h1:fjWVORSQfI0WKzPeIFSju/gMD9sybwXBJ7oPbqQu6eM=
k8s.io/component-helpers v0.33.3/go.mod h1:7iwv+Y9Guw6X4RrnNQOyQlXcvJrVjPveHVqUA5dm31c=
k8s.io/controller-manager v0.33.3 h1:OItg5te3ixRw9MFko5KW2ed4ogBbwnJfrS4mCXixbsg=
k8s.io/controller-manager v0.33.3/go.mod h1:sH/I5CXliIc+3bnEjdalgSTJ/3fJhIHrDA3sOwTNgxM=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-aggregator v0.33.0 h1:jTjEe/DqpJcaPp4x1CjNaMb1XPD+H8SSf/yVpC8coFg=
k8s.io/kube-aggregator v0.33.0/go.mod h1:6BRnSnWzh6nWUxjQhNwGP9gMnPfSW0WsFeOZGMHtvZw=
k8s.io/kube-aggregator v0.33.3 h1:Pa6hQpKJMX0p0D2wwcxXJgu02++gYcGWXoW1z1ZJDfo=
k8s.io/kube-aggregator v0.33.3/go.mod h1:hwvkUoQ8q6gv0+SgNnlmQ3eUue1zHhJKTHsX7BwxwSE=
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
k8s.io/kubelet v0.33.0 h1:4pJA2Ge6Rp0kDNV76KH7pTBiaV2T1a1874QHMcubuSU=
k8s.io/kubelet v0.33.0/go.mod h1:iDnxbJQMy9DUNaML5L/WUlt3uJtNLWh7ZAe0JSp4Yi0=
k8s.io/kubernetes v1.33.0 h1:BP5Y5yIzUZVeBuE/ESZvnw6TNxjXbLsCckIkljE+R0U=
k8s.io/kubernetes v1.33.0/go.mod h1:2nWuPk0seE4+6sd0x60wQ6rYEXcV7SoeMbU0YbFm/5k=
k8s.io/metrics v0.33.0 h1:sKe5sC9qb1RakMhs8LWYNuN2ne6OTCWexj8Jos3rO2Y=
k8s.io/metrics v0.33.0/go.mod h1:XewckTFXmE2AJiP7PT3EXaY7hi7bler3t2ZLyOdQYzU=
k8s.io/mount-utils v0.33.0 h1:hH6EcCcax4lFNIERaGMj6d7oGMW1qW3eTCwHUuLtLog=
k8s.io/mount-utils v0.33.0/go.mod h1:1JR4rKymg8B8bCPo618hpSAdrpO6XLh0Acqok/xVwPE=
k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e h1:KqK5c/ghOm8xkHYhlodbp6i6+r+ChV2vuAuVRdFbLro=
k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/kubelet v0.33.3 h1:Cvy8+7Lq9saZds2ib7YBXbKvkMMJu3f5mzucmhSIJno=
k8s.io/kubelet v0.33.3/go.mod h1:Q1Cfr6VQq1m9v9XsE/mDmhTxPdN6NPU6Ug0e6mAqi58=
k8s.io/kubernetes v1.33.3 h1:dBx5Z2ZhR8kNzAwCoCz4j1niUbUrNUDVxeSj4/Ienu0=
k8s.io/kubernetes v1.33.3/go.mod h1:nrt8sldmckKz2fCZhgRX3SKfS2e+CzXATPv6ITNkU00=
k8s.io/metrics v0.33.3 h1:9CcqBz15JZfISqwca33gdHS8I6XfsK1vA8WUdEnG70g=
k8s.io/metrics v0.33.3/go.mod h1:Aw+cdg4AYHw0HvUY+lCyq40FOO84awrqvJRTw0cmXDs=
k8s.io/mount-utils v0.33.3 h1:Q1jsnqdS4LdtJSYSXgiQv/XNrRHQncLk3gMYjKNSZrE=
k8s.io/mount-utils v0.33.3/go.mod h1:1JR4rKymg8B8bCPo618hpSAdrpO6XLh0Acqok/xVwPE=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/controller-runtime v0.20.4 h1:X3c+Odnxz+iPTRobG4tp092+CvBU9UK0t/bRf+n0DGU=
sigs.k8s.io/controller-runtime v0.20.4/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=

View File

@ -1443,7 +1443,6 @@ spec:
shortNames:
- lhei
singular: engineimage
preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:
@ -1646,7 +1645,6 @@ spec:
shortNames:
- lhe
singular: engine
preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:
@ -2019,6 +2017,8 @@ spec:
type: integer
unmapMarkSnapChainRemovedEnabled:
type: boolean
uuid:
type: string
type: object
type: object
served: true
@ -2043,7 +2043,6 @@ spec:
shortNames:
- lhim
singular: instancemanager
preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:
@ -2249,6 +2248,8 @@ spec:
ublkID:
format: int32
type: integer
uuid:
type: string
type: object
type: object
nullable: true
@ -2298,6 +2299,8 @@ spec:
ublkID:
format: int32
type: integer
uuid:
type: string
type: object
type: object
nullable: true
@ -2347,6 +2350,8 @@ spec:
ublkID:
format: int32
type: integer
uuid:
type: string
type: object
type: object
description: 'Deprecated: Replaced by InstanceEngines and InstanceReplicas'
@ -2396,7 +2401,6 @@ spec:
shortNames:
- lhn
singular: node
preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:
@ -2991,7 +2995,6 @@ spec:
shortNames:
- lhr
singular: replica
preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:
@ -3252,6 +3255,8 @@ spec:
ublkID:
format: int32
type: integer
uuid:
type: string
type: object
type: object
served: true
@ -3276,7 +3281,6 @@ spec:
shortNames:
- lhs
singular: setting
preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:
@ -4184,7 +4188,6 @@ spec:
shortNames:
- lhv
singular: volume
preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:

View File

@ -1,11 +0,0 @@
# This is one of seven CRDs that were originally apiextensions.k8s.io/v1beta1. If Longhorn and Kubernetes are upgraded
# in a particular order from Longhorn v1.0.2- to the latest, preserveUnknownFields may remain true, even though the
# default (and intended value) is false.
# https://github.com/longhorn/longhorn/discussions/4198
# https://github.com/longhorn/longhorn/issues/7887
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: engines.longhorn.io
spec:
preserveUnknownFields: false

View File

@ -1,11 +0,0 @@
# This is one of seven CRDs that were originally apiextensions.k8s.io/v1beta1. If Longhorn and Kubernetes are upgraded
# in a particular order from Longhorn v1.0.2- to the latest, preserveUnknownFields may remain true, even though the
# default (and intended value) is false.
# https://github.com/longhorn/longhorn/discussions/4198
# https://github.com/longhorn/longhorn/issues/7887
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: engineimages.longhorn.io
spec:
preserveUnknownFields: false

View File

@ -1,11 +0,0 @@
# This is one of seven CRDs that were originally apiextensions.k8s.io/v1beta1. If Longhorn and Kubernetes are upgraded
# in a particular order from Longhorn v1.0.2- to the latest, preserveUnknownFields may remain true, even though the
# default (and intended value) is false.
# https://github.com/longhorn/longhorn/discussions/4198
# https://github.com/longhorn/longhorn/issues/7887
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: instancemanagers.longhorn.io
spec:
preserveUnknownFields: false

View File

@ -1,11 +0,0 @@
# This is one of seven CRDs that were originally apiextensions.k8s.io/v1beta1. If Longhorn and Kubernetes are upgraded
# in a particular order from Longhorn v1.0.2- to the latest, preserveUnknownFields may remain true, even though the
# default (and intended value) is false.
# https://github.com/longhorn/longhorn/discussions/4198
# https://github.com/longhorn/longhorn/issues/7887
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: nodes.longhorn.io
spec:
preserveUnknownFields: false

View File

@ -1,11 +0,0 @@
# This is one of seven CRDs that were originally apiextensions.k8s.io/v1beta1. If Longhorn and Kubernetes are upgraded
# in a particular order from Longhorn v1.0.2- to the latest, preserveUnknownFields may remain true, even though the
# default (and intended value) is false.
# https://github.com/longhorn/longhorn/discussions/4198
# https://github.com/longhorn/longhorn/issues/7887
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: replicas.longhorn.io
spec:
preserveUnknownFields: false

View File

@ -1,11 +0,0 @@
# This is one of seven CRDs that were originally apiextensions.k8s.io/v1beta1. If Longhorn and Kubernetes are upgraded
# in a particular order from Longhorn v1.0.2- to the latest, preserveUnknownFields may remain true, even though the
# default (and intended value) is false.
# https://github.com/longhorn/longhorn/discussions/4198
# https://github.com/longhorn/longhorn/issues/7887
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: settings.longhorn.io
spec:
preserveUnknownFields: false

View File

@ -1,11 +0,0 @@
# This is one of seven CRDs that were originally apiextensions.k8s.io/v1beta1. If Longhorn and Kubernetes are upgraded
# in a particular order from Longhorn v1.0.2- to the latest, preserveUnknownFields may remain true, even though the
# default (and intended value) is false.
# https://github.com/longhorn/longhorn/discussions/4198
# https://github.com/longhorn/longhorn/issues/7887
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: volumes.longhorn.io
spec:
preserveUnknownFields: false

View File

@ -112,6 +112,8 @@ type InstanceStatus struct {
Conditions []Condition `json:"conditions"`
// +optional
UblkID int32 `json:"ublkID,omitempty"`
// +optional
UUID string `json:"uuid,omitempty"`
}
type InstanceProcessStatus struct {
@ -140,6 +142,8 @@ type InstanceProcessStatus struct {
ResourceVersion int64 `json:"resourceVersion"`
// +optional
UblkID int32 `json:"ublkID,omitempty"`
// +optional
UUID string `json:"uuid,omitempty"`
}
type V2DataEngineSpec struct {

View File

@ -24,6 +24,7 @@ const (
const (
OrphanInstanceName = "InstanceName"
OrphanInstanceUUID = "InstanceUUID"
OrphanInstanceManager = "InstanceManager"
OrphanDataName = "DataName"

View File

@ -37,6 +37,7 @@ type InstanceProcessStatusApplyConfiguration struct {
Type *longhornv1beta2.InstanceType `json:"type,omitempty"`
ResourceVersion *int64 `json:"resourceVersion,omitempty"`
UblkID *int32 `json:"ublkID,omitempty"`
UUID *string `json:"uuid,omitempty"`
}
// InstanceProcessStatusApplyConfiguration constructs a declarative configuration of the InstanceProcessStatus type for use with
@ -146,3 +147,11 @@ func (b *InstanceProcessStatusApplyConfiguration) WithUblkID(value int32) *Insta
b.UblkID = &value
return b
}
// WithUUID sets the UUID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UUID field is set to the value of the last call.
func (b *InstanceProcessStatusApplyConfiguration) WithUUID(value string) *InstanceProcessStatusApplyConfiguration {
b.UUID = &value
return b
}

View File

@ -37,6 +37,7 @@ type InstanceStatusApplyConfiguration struct {
SalvageExecuted *bool `json:"salvageExecuted,omitempty"`
Conditions []ConditionApplyConfiguration `json:"conditions,omitempty"`
UblkID *int32 `json:"ublkID,omitempty"`
UUID *string `json:"uuid,omitempty"`
}
// InstanceStatusApplyConfiguration constructs a declarative configuration of the InstanceStatus type for use with
@ -145,3 +146,11 @@ func (b *InstanceStatusApplyConfiguration) WithUblkID(value int32) *InstanceStat
b.UblkID = &value
return b
}
// WithUUID sets the UUID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UUID field is set to the value of the last call.
func (b *InstanceStatusApplyConfiguration) WithUUID(value string) *InstanceStatusApplyConfiguration {
b.UUID = &value
return b
}

View File

@ -166,7 +166,7 @@ func (m *VolumeManager) CleanUpBackingImageDiskFiles(name string, diskFileList [
}
}()
replicas, err := m.ds.ListReplicasByBackingImage(name)
replicas, err := m.ds.ListReplicasByBackingImage(name, "")
if err != nil {
return nil, err
}

View File

@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.15.0
# syntax=docker/dockerfile:1.15.1
FROM registry.suse.com/bci/golang:1.24 AS builder
WORKDIR /app

View File

@ -433,7 +433,7 @@ func (rcs *ReplicaScheduler) filterNodeDisksForReplica(node *longhorn.Node, disk
if storageScheduled > 0 {
info.StorageScheduled += storageScheduled
}
if !rcs.IsSchedulableToDisk(volume.Spec.Size, volume.Status.ActualSize, info) {
if isSchedulableToDisk, _ := rcs.IsSchedulableToDisk(volume.Spec.Size, volume.Status.ActualSize, info); !isSchedulableToDisk {
multiError.Append(util.NewMultiError(longhorn.ErrorReplicaScheduleInsufficientStorage))
continue
}
@ -814,13 +814,43 @@ func GetLatestFailedReplica(rs ...*longhorn.Replica) (res *longhorn.Replica) {
return res
}
func (rcs *ReplicaScheduler) IsSchedulableToDisk(size int64, requiredStorage int64, info *DiskSchedulingInfo) bool {
func (rcs *ReplicaScheduler) IsSchedulableToDisk(size int64, requiredStorage int64, info *DiskSchedulingInfo) (isSchedulable bool, message string) {
// StorageReserved = the space is already used by 3rd party + the space will be used by 3rd party.
// StorageAvailable = the space can be used by 3rd party or Longhorn system.
// There is no (direct) relationship between StorageReserved and StorageAvailable.
return info.StorageMaximum > 0 && info.StorageAvailable > 0 &&
info.StorageAvailable-requiredStorage > int64(float64(info.StorageMaximum)*float64(info.MinimalAvailablePercentage)/100) &&
(size+info.StorageScheduled) <= int64(float64(info.StorageMaximum-info.StorageReserved)*float64(info.OverProvisioningPercentage)/100)
if info.StorageMaximum <= 0 {
return false, "Storage Max must be greater than 0"
}
if info.StorageAvailable <= 0 {
return false, "Storage Available must be greater than 0"
}
// Actual Space Usage Condition:
// Ensure that after scheduling the replica, the disk still has enough available space left.
// This prevents the disk from being completely filled.
currentAvailable := info.StorageAvailable - requiredStorage
minimalAvailable := int64(float64(info.StorageMaximum) * float64(info.MinimalAvailablePercentage) / 100)
if currentAvailable <= minimalAvailable {
return false, fmt.Sprintf(
"Actual space usage condition failed: CurrentAvailable = %d (StorageAvailable - Required) is less than or equal to MinimalAvailable = %d (%d%% of Storage Max).",
currentAvailable, minimalAvailable, info.MinimalAvailablePercentage,
)
}
// Scheduling Space Condition:
// Ensure that the total scheduled size (including this replica) does not exceed the allowed over-provisioning limit.
// This prevents excessive over-commitment of the disk capacity.
scheduledTotal := size + info.StorageScheduled
overProvisionLimit := int64(float64(info.StorageMaximum-info.StorageReserved) * float64(info.OverProvisioningPercentage) / 100)
if scheduledTotal > overProvisionLimit {
return false, fmt.Sprintf(
"Scheduling space condition failed: ScheduledTotal = %d (Size + StorageScheduled) is greater than ProvisionedLimit = %d (%d%% of StorageMax - StorageReserved). ",
scheduledTotal, overProvisionLimit, info.OverProvisioningPercentage,
)
}
return true, ""
}
func (rcs *ReplicaScheduler) IsSchedulableToDiskConsiderDiskPressure(diskPressurePercentage, size, requiredStorage int64, info *DiskSchedulingInfo) bool {
@ -841,7 +871,8 @@ func (rcs *ReplicaScheduler) IsSchedulableToDiskConsiderDiskPressure(diskPressur
newDiskUsagePercentage := (requiredStorage + info.StorageScheduled + info.StorageReserved) * 100 / info.StorageMaximum
log.Debugf("Evaluated new disk usage percentage after scheduling replica: %v%%", newDiskUsagePercentage)
return rcs.IsSchedulableToDisk(size, requiredStorage, info) &&
isSchedulableToDisk, _ := rcs.IsSchedulableToDisk(size, requiredStorage, info)
return isSchedulableToDisk &&
newDiskUsagePercentage < int64(diskPressurePercentage)
}
@ -874,7 +905,7 @@ func (rcs *ReplicaScheduler) FilterNodesSchedulableForVolume(nodes map[string]*l
continue
}
if rcs.IsSchedulableToDisk(volume.Spec.Size, volume.Status.ActualSize, diskInfo) {
if isSchedulableToDisk, _ := rcs.IsSchedulableToDisk(volume.Spec.Size, volume.Status.ActualSize, diskInfo); isSchedulableToDisk {
isSchedulable = true
break
}
@ -956,8 +987,8 @@ func (rcs *ReplicaScheduler) CheckReplicasSizeExpansion(v *longhorn.Volume, oldS
expandingSize := newSize - oldSize
for diskID, diskInfo := range diskIDToDiskInfo {
requestingSizeExpansionOnDisk := expandingSize * diskIDToReplicaCount[diskID]
if !rcs.IsSchedulableToDisk(requestingSizeExpansionOnDisk, 0, diskInfo) {
logrus.Errorf("Cannot schedule %v more bytes to disk %v with %+v", requestingSizeExpansionOnDisk, diskID, diskInfo)
if isSchedulableToDisk, reason := rcs.IsSchedulableToDisk(requestingSizeExpansionOnDisk, 0, diskInfo); !isSchedulableToDisk {
logrus.Errorf("Cannot schedule %v more bytes to disk %v with %+v; %s", requestingSizeExpansionOnDisk, diskID, diskInfo, reason)
return util.NewMultiError(longhorn.ErrorReplicaScheduleInsufficientStorage),
fmt.Errorf("cannot schedule %v more bytes to disk %v with %+v", requestingSizeExpansionOnDisk, diskID, diskInfo)
}

View File

@ -99,8 +99,9 @@ const (
SettingNameBackingImageRecoveryWaitInterval = SettingName("backing-image-recovery-wait-interval")
SettingNameGuaranteedInstanceManagerCPU = SettingName("guaranteed-instance-manager-cpu")
SettingNameKubernetesClusterAutoscalerEnabled = SettingName("kubernetes-cluster-autoscaler-enabled")
SettingNameOrphanAutoDeletion = SettingName("orphan-auto-deletion")
SettingNameOrphanAutoDeletion = SettingName("orphan-auto-deletion") // replaced by SettingNameOrphanResourceAutoDeletion
SettingNameOrphanResourceAutoDeletion = SettingName("orphan-resource-auto-deletion")
SettingNameOrphanResourceAutoDeletionGracePeriod = SettingName("orphan-resource-auto-deletion-grace-period")
SettingNameStorageNetwork = SettingName("storage-network")
SettingNameStorageNetworkForRWXVolumeEnabled = SettingName("storage-network-for-rwx-volume-enabled")
SettingNameFailedBackupTTL = SettingName("failed-backup-ttl")
@ -202,8 +203,8 @@ var (
SettingNameBackingImageRecoveryWaitInterval,
SettingNameGuaranteedInstanceManagerCPU,
SettingNameKubernetesClusterAutoscalerEnabled,
SettingNameOrphanAutoDeletion,
SettingNameOrphanResourceAutoDeletion,
SettingNameOrphanResourceAutoDeletionGracePeriod,
SettingNameStorageNetwork,
SettingNameStorageNetworkForRWXVolumeEnabled,
SettingNameFailedBackupTTL,
@ -250,6 +251,10 @@ var (
}
)
var replacedSettingNames = map[SettingName]bool{
SettingNameOrphanAutoDeletion: true, // SettingNameOrphanResourceAutoDeletion
}
type SettingCategory string
const (
@ -327,8 +332,8 @@ var (
SettingNameBackingImageRecoveryWaitInterval: SettingDefinitionBackingImageRecoveryWaitInterval,
SettingNameGuaranteedInstanceManagerCPU: SettingDefinitionGuaranteedInstanceManagerCPU,
SettingNameKubernetesClusterAutoscalerEnabled: SettingDefinitionKubernetesClusterAutoscalerEnabled,
SettingNameOrphanAutoDeletion: SettingDefinitionOrphanAutoDeletion,
SettingNameOrphanResourceAutoDeletion: SettingDefinitionOrphanResourceAutoDeletion,
SettingNameOrphanResourceAutoDeletionGracePeriod: SettingDefinitionOrphanResourceAutoDeletionGracePeriod,
SettingNameStorageNetwork: SettingDefinitionStorageNetwork,
SettingNameStorageNetworkForRWXVolumeEnabled: SettingDefinitionStorageNetworkForRWXVolumeEnabled,
SettingNameFailedBackupTTL: SettingDefinitionFailedBackupTTL,
@ -1055,27 +1060,14 @@ var (
Default: "false",
}
SettingDefinitionOrphanAutoDeletion = SettingDefinition{
DisplayName: "Orphan Auto-Deletion",
Description: "This setting allows Longhorn to delete the orphan resource and its corresponding orphaned data automatically. \n\n" +
"Orphan resources on down or unknown nodes will not be cleaned up automatically. \n\n" +
fmt.Sprintf("Deprecated: enable \"%s\" in %s instead. \n\n", OrphanResourceTypeReplicaData, SettingNameOrphanResourceAutoDeletion),
Category: SettingCategoryOrphan,
Type: SettingTypeBool,
Required: true,
ReadOnly: true,
Default: "false",
}
SettingDefinitionOrphanResourceAutoDeletion = SettingDefinition{
DisplayName: "Orphan Resource Auto-Deletion",
Description: "This setting allows Longhorn to automatically delete orphan resources and their corresponding orphaned resources. \n\n" +
"Orphan resources located on nodes that are in down or unknown state will not be cleaned up automatically. \n\n" +
"List the enabled resource types in a semicolon-separated list. \n\n" +
"Available items are: \n\n" +
"- **replicaData**: replica data store \n\n" +
"- **engineInstance**: engine runtime instance \n\n" +
"- **replicaInstance**: replica runtime instance \n\n",
"- **replica-data**: replica data store \n\n" +
"- **instance**: engine and replica runtime instance \n\n",
Category: SettingCategoryOrphan,
Type: SettingTypeString,
Required: false,
@ -1083,6 +1075,20 @@ var (
Default: "",
}
SettingDefinitionOrphanResourceAutoDeletionGracePeriod = SettingDefinition{
DisplayName: "Orphan Resource Auto-Deletion Grace Period",
Description: "Specifies the wait time, in seconds, before Longhorn automatically deletes an orphaned Custom Resource (CR) and its associated resources. \n\n" +
"**Note:** If a user manually deletes an orphaned CR, the deletion occurs immediately and does not respect this grace period. \n\n",
Category: SettingCategoryOrphan,
Type: SettingTypeInt,
Required: true,
ReadOnly: false,
Default: "300",
ValueIntRange: map[string]int{
ValueIntRangeMinimum: 0,
},
}
SettingDefinitionStorageNetwork = SettingDefinition{
DisplayName: "Storage Network",
Description: "Longhorn uses the storage network for in-cluster data traffic. Leave this blank to use the Kubernetes cluster network. \n\n" +
@ -1615,9 +1621,8 @@ const (
type OrphanResourceType string
const (
OrphanResourceTypeReplicaData = OrphanResourceType("replicaData")
OrphanResourceTypeEngineInstance = OrphanResourceType("engineInstance")
OrphanResourceTypeReplicaInstance = OrphanResourceType("replicaInstance")
OrphanResourceTypeReplicaData = OrphanResourceType("replica-data")
OrphanResourceTypeInstance = OrphanResourceType("instance")
)
func ValidateSetting(name, value string) (err error) {
@ -1801,9 +1806,8 @@ func UnmarshalNodeSelector(nodeSelectorSetting string) (map[string]string, error
func UnmarshalOrphanResourceTypes(resourceTypesSetting string) (map[OrphanResourceType]bool, error) {
resourceTypes := map[OrphanResourceType]bool{
OrphanResourceTypeReplicaData: false,
OrphanResourceTypeEngineInstance: false,
OrphanResourceTypeReplicaInstance: false,
OrphanResourceTypeReplicaData: false,
OrphanResourceTypeInstance: false,
}
resourceTypesSetting = strings.Trim(resourceTypesSetting, " ")
@ -1825,6 +1829,10 @@ func UnmarshalOrphanResourceTypes(resourceTypesSetting string) (map[OrphanResour
return resourceTypes, nil
}
func IsSettingReplaced(name SettingName) bool {
return replacedSettingNames[name]
}
// GetSettingDefinition gets the setting definition in `settingDefinitions` by the parameter `name`
func GetSettingDefinition(name SettingName) (SettingDefinition, bool) {
settingDefinitionsLock.RLock()

View File

@ -119,10 +119,11 @@ const (
DefaultBackupTargetName = "default"
LonghornNodeKey = "longhornnode"
LonghornEngineKey = "longhornengine"
LonghornReplicaKey = "longhornreplica"
LonghornDiskUUIDKey = "longhorndiskuuid"
LonghornNodeKey = "longhornnode"
LonghornInstanceManagerKey = "longhorninstancemanager"
LonghornEngineKey = "longhornengine"
LonghornReplicaKey = "longhornreplica"
LonghornDiskUUIDKey = "longhorndiskuuid"
NodeCreateDefaultDiskLabelKey = "node.longhorn.io/create-default-disk"
NodeCreateDefaultDiskLabelValueTrue = "true"
@ -399,9 +400,16 @@ func GetEngineBinaryDirectoryForReplicaManagerContainer(image string) string {
return filepath.Join(filepath.Join(ReplicaHostPrefix, EngineBinaryDirectoryOnHost), cname)
}
func EngineBinaryExistOnHostForImage(image string) bool {
st, err := os.Stat(filepath.Join(GetEngineBinaryDirectoryOnHostForImage(image), "longhorn"))
return err == nil && !st.IsDir()
func EngineBinaryExistOnHostForImage(image string) (bool, error) {
engineBinaryPath := filepath.Join(GetEngineBinaryDirectoryOnHostForImage(image), "longhorn")
st, err := os.Stat(engineBinaryPath)
if err != nil {
return false, err
}
if st.IsDir() {
return false, errors.Errorf("expected %s to be a file, but it is a directory", engineBinaryPath)
}
return true, nil
}
func GetBackingImageManagerName(image, diskUUID string) string {
@ -660,19 +668,21 @@ func GetOrphanLabelsForOrphanedDirectory(nodeID, diskUUID string) map[string]str
return labels
}
func GetOrphanLabelsForOrphanedEngineInstance(nodeID, engineName string) map[string]string {
func GetOrphanLabelsForOrphanedEngineInstance(nodeID, instanceManager, engineName string) map[string]string {
labels := GetBaseLabelsForSystemManagedComponent()
labels[GetLonghornLabelComponentKey()] = LonghornLabelOrphan
labels[LonghornNodeKey] = nodeID
labels[LonghornInstanceManagerKey] = instanceManager
labels[LonghornEngineKey] = engineName
labels[GetLonghornLabelKey(LonghornLabelOrphanType)] = string(longhorn.OrphanTypeEngineInstance)
return labels
}
func GetOrphanLabelsForOrphanedReplicaInstance(nodeID, replicaName string) map[string]string {
func GetOrphanLabelsForOrphanedReplicaInstance(nodeID, instanceManager, replicaName string) map[string]string {
labels := GetBaseLabelsForSystemManagedComponent()
labels[GetLonghornLabelComponentKey()] = LonghornLabelOrphan
labels[LonghornNodeKey] = nodeID
labels[LonghornInstanceManagerKey] = instanceManager
labels[LonghornReplicaKey] = replicaName
labels[GetLonghornLabelKey(LonghornLabelOrphanType)] = string(longhorn.OrphanTypeReplicaInstance)
return labels
@ -746,8 +756,8 @@ func GetOrphanChecksumNameForOrphanedDataStore(nodeID, diskName, diskPath, diskU
return orphanPrefix + util.GetStringChecksumSHA256(strings.TrimSpace(fmt.Sprintf("%s-%s-%s-%s-%s", nodeID, diskName, diskPath, diskUUID, dataStore)))
}
func GetOrphanChecksumNameForOrphanedInstance(instanceName, nodeID, dataEngine string) string {
return orphanPrefix + util.GetStringChecksumSHA256(strings.TrimSpace(fmt.Sprintf("%s-%s-%s", instanceName, nodeID, dataEngine)))
func GetOrphanChecksumNameForOrphanedInstance(instanceName, instanceUUID, instanceManager, dataEngine string) string {
return orphanPrefix + util.GetStringChecksumSHA256(strings.TrimSpace(fmt.Sprintf("%s-%s-%s-%s", instanceName, instanceUUID, instanceManager, dataEngine)))
}
func GetShareManagerPodNameFromShareManagerName(smName string) string {
@ -766,8 +776,9 @@ func GetShareManagerNameFromShareManagerPodName(podName string) string {
return strings.TrimPrefix(podName, shareManagerPrefix)
}
func GetBackupVolumeNameFromVolumeName(volumeName string) string {
return volumeName + "-" + util.RandomID()
func GetBackupVolumeNameFromVolumeName(volumeName, backupTargetName string) string {
// Generate a unique backup volume name based on the volume name and backup target name to prevent re-creation from a split-brain scenario.
return volumeName + "-" + util.GetStringChecksumSHA256(strings.TrimSpace(fmt.Sprintf("%s-%s", volumeName, backupTargetName)))[:util.RandomIDLength]
}
func GetBackupBackingImageNameFromBIName(backingImageName string) string {

View File

@ -339,7 +339,8 @@ func DeleteRemovedSettings(namespace string, lhClient *lhclientset.Clientset) er
return true
}
}
return false
// replaced settings will be deleted after replaced
return types.IsSettingReplaced(name)
}
existingSettingList, err := lhClient.LonghornV1beta2().Settings(namespace).List(context.TODO(), metav1.ListOptions{})
@ -400,6 +401,10 @@ func ListAndUpdateSettingsInProvidedCache(namespace string, lhClient *lhclientse
return nil, err
}
for _, setting := range settingList.Items {
if _, exist := types.GetSettingDefinition(types.SettingName(setting.Name)); !exist {
logrus.Warnf("Found unknown setting %v, skipping", setting.Name)
continue
}
settingCopy := longhorn.Setting{}
if err := copier.Copy(&settingCopy, setting); err != nil {
return nil, err

View File

@ -1,12 +1,9 @@
package v18xto190
import (
"strings"
"github.com/pkg/errors"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clientset "k8s.io/client-go/kubernetes"
"github.com/longhorn/longhorn-manager/types"
@ -72,10 +69,6 @@ func updateCRs(namespace string, lhClient *lhclientset.Clientset, kubeClient *cl
return err
}
if err := upgradeSettings(namespace, lhClient, resourceMaps); err != nil {
return err
}
return nil
}
@ -100,53 +93,3 @@ func upgradeVolumes(namespace string, lhClient *lhclientset.Clientset, resourceM
return nil
}
func upgradeSettings(namespace string, lhClient *lhclientset.Clientset, resourceMaps map[string]interface{}) (err error) {
defer func() {
err = errors.Wrapf(err, upgradeLogPrefix+"upgrade settings failed")
}()
settingsMap, err := upgradeutil.ListAndUpdateSettingsInProvidedCache(namespace, lhClient, resourceMaps)
if err != nil {
if apierrors.IsNotFound(err) {
return nil
}
return errors.Wrapf(err, "failed to list all existing Longhorn settings during the settings upgrade")
}
if err := updateOrphanResourceAutoDeletionSetting(settingsMap); err != nil {
return errors.Wrapf(err, "failed to update orphan resource auto-deletion settings")
}
return nil
}
func updateOrphanResourceAutoDeletionSetting(settingsMap map[string]*longhorn.Setting) (err error) {
oldSetting, exist := settingsMap[string(types.SettingNameOrphanAutoDeletion)]
if !exist {
return nil
}
newSetting, exist := settingsMap[string(types.SettingNameOrphanResourceAutoDeletion)]
if !exist {
newSetting = &longhorn.Setting{
ObjectMeta: metav1.ObjectMeta{
Name: string(types.SettingNameOrphanResourceAutoDeletion),
},
}
settingsMap[string(types.SettingNameOrphanResourceAutoDeletion)] = newSetting
}
resourceTypes, err := types.UnmarshalOrphanResourceTypes(newSetting.Value)
if err != nil {
return err
}
resourceTypes[types.OrphanResourceTypeReplicaData] = oldSetting.Value == "true"
enabledResourceType := make([]string, 0, len(resourceTypes))
for rt, enabled := range resourceTypes {
if enabled {
enabledResourceType = append(enabledResourceType, string(rt))
}
}
newSetting.Value = strings.Join(enabledResourceType, ";")
return nil
}

View File

@ -1,3 +1,4 @@
// Package md2man aims in converting markdown into roff (man pages).
package md2man
import (

View File

@ -47,13 +47,13 @@ const (
tableStart = "\n.TS\nallbox;\n"
tableEnd = ".TE\n"
tableCellStart = "T{\n"
tableCellEnd = "\nT}\n"
tableCellEnd = "\nT}"
tablePreprocessor = `'\" t`
)
// NewRoffRenderer creates a new blackfriday Renderer for generating roff documents
// from markdown
func NewRoffRenderer() *roffRenderer { // nolint: golint
func NewRoffRenderer() *roffRenderer {
return &roffRenderer{}
}
@ -104,7 +104,7 @@ func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering
node.Parent.Prev.Type == blackfriday.Heading &&
node.Parent.Prev.FirstChild != nil &&
bytes.EqualFold(node.Parent.Prev.FirstChild.Literal, []byte("NAME")) {
before, after, found := bytes.Cut(node.Literal, []byte(" - "))
before, after, found := bytesCut(node.Literal, []byte(" - "))
escapeSpecialChars(w, before)
if found {
out(w, ` \- `)
@ -316,9 +316,8 @@ func (r *roffRenderer) handleTableCell(w io.Writer, node *blackfriday.Node, ente
} else if nodeLiteralSize(node) > 30 {
end = tableCellEnd
}
if node.Next == nil && end != tableCellEnd {
// Last cell: need to carriage return if we are at the end of the
// header row and content isn't wrapped in a "tablecell"
if node.Next == nil {
// Last cell: need to carriage return if we are at the end of the header row.
end += crTag
}
out(w, end)
@ -356,7 +355,7 @@ func countColumns(node *blackfriday.Node) int {
}
func out(w io.Writer, output string) {
io.WriteString(w, output) // nolint: errcheck
io.WriteString(w, output) //nolint:errcheck
}
func escapeSpecialChars(w io.Writer, text []byte) {
@ -395,7 +394,7 @@ func escapeSpecialCharsLine(w io.Writer, text []byte) {
i++
}
if i > org {
w.Write(text[org:i]) // nolint: errcheck
w.Write(text[org:i]) //nolint:errcheck
}
// escape a character
@ -403,6 +402,15 @@ func escapeSpecialCharsLine(w io.Writer, text []byte) {
break
}
w.Write([]byte{'\\', text[i]}) // nolint: errcheck
w.Write([]byte{'\\', text[i]}) //nolint:errcheck
}
}
// bytesCut is a copy of [bytes.Cut] to provide compatibility with go1.17
// and older. We can remove this once we drop support for go1.17 and older.
func bytesCut(s, sep []byte) (before, after []byte, found bool) {
if i := bytes.Index(s, sep); i >= 0 {
return s[:i], s[i+len(sep):], true
}
return s, nil, false
}

View File

@ -9,6 +9,8 @@ import (
"os"
"strconv"
"github.com/sirupsen/logrus"
"github.com/longhorn/backing-image-manager/api"
"github.com/longhorn/backing-image-manager/pkg/util"
"github.com/pkg/errors"
@ -31,7 +33,11 @@ func (client *DataSourceClient) Get() (*api.DataSourceInfo, error) {
if err != nil {
return nil, fmt.Errorf("get failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -69,7 +75,11 @@ func (client *DataSourceClient) Transfer() error {
if err != nil {
return fmt.Errorf("transfer failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -93,8 +103,16 @@ func (client *DataSourceClient) Upload(filePath string) error {
r, w := io.Pipe()
m := multipart.NewWriter(w)
go func() {
defer w.Close()
defer m.Close()
defer func() {
if errClose := w.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close writer")
}
}()
defer func() {
if errClose := m.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close multipart writer")
}
}()
part, err := m.CreateFormFile("chunk", "blob")
if err != nil {
return
@ -103,7 +121,11 @@ func (client *DataSourceClient) Upload(filePath string) error {
if err != nil {
return
}
defer file.Close()
defer func() {
if errClose := file.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close file")
}
}()
if _, err = io.Copy(part, file); err != nil {
return
}
@ -125,7 +147,11 @@ func (client *DataSourceClient) Upload(filePath string) error {
if err != nil {
return fmt.Errorf("upload failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {

View File

@ -4,6 +4,8 @@ import (
"fmt"
rpc "github.com/longhorn/types/pkg/generated/bimrpc"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
@ -34,7 +36,11 @@ func (cli *BackingImageManagerClient) Sync(name, uuid, checksum, fromAddress str
if err != nil {
return nil, fmt.Errorf("cannot connect backing image manager service to %v: %v", cli.Address, err)
}
defer conn.Close()
defer func() {
if errClose := conn.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close backing image manager service connection")
}
}()
client := rpc.NewBackingImageManagerServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
@ -64,7 +70,11 @@ func (cli *BackingImageManagerClient) Send(name, uuid, toAddress string) error {
if err != nil {
return fmt.Errorf("cannot connect backing image manager service to %v: %v", cli.Address, err)
}
defer conn.Close()
defer func() {
if errClose := conn.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close backing image manager service connection")
}
}()
client := rpc.NewBackingImageManagerServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
@ -87,7 +97,11 @@ func (cli *BackingImageManagerClient) Delete(name, uuid string) error {
if err != nil {
return fmt.Errorf("cannot connect backing image manager service to %v: %v", cli.Address, err)
}
defer conn.Close()
defer func() {
if errClose := conn.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close backing image manager service connection")
}
}()
client := rpc.NewBackingImageManagerServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
@ -109,7 +123,11 @@ func (cli *BackingImageManagerClient) Get(name, uuid string) (*api.BackingImage,
if err != nil {
return nil, fmt.Errorf("cannot connect backing image manager service to %v: %v", cli.Address, err)
}
defer conn.Close()
defer func() {
if errClose := conn.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close backing image manager service connection")
}
}()
client := rpc.NewBackingImageManagerServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
@ -130,7 +148,11 @@ func (cli *BackingImageManagerClient) List() (map[string]*api.BackingImage, erro
if err != nil {
return nil, fmt.Errorf("cannot connect backing image manager service to %v: %v", cli.Address, err)
}
defer conn.Close()
defer func() {
if errClose := conn.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close backing image manager service connection")
}
}()
client := rpc.NewBackingImageManagerServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
@ -152,7 +174,11 @@ func (cli *BackingImageManagerClient) Fetch(name, uuid, checksum, dataSourceAddr
if err != nil {
return nil, fmt.Errorf("cannot connect backing image manager service to %v: %v", cli.Address, err)
}
defer conn.Close()
defer func() {
if errClose := conn.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close backing image manager service connection")
}
}()
client := rpc.NewBackingImageManagerServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
@ -182,7 +208,11 @@ func (cli *BackingImageManagerClient) PrepareDownload(name, uuid string) (string
if err != nil {
return "", "", fmt.Errorf("cannot connect backing image manager service to %v: %v", cli.Address, err)
}
defer conn.Close()
defer func() {
if errClose := conn.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close backing image manager service connection")
}
}()
client := rpc.NewBackingImageManagerServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
@ -203,7 +233,11 @@ func (cli *BackingImageManagerClient) VersionGet() (*meta.VersionOutput, error)
if err != nil {
return nil, fmt.Errorf("cannot connect backing image manager service to %v: %v", cli.Address, err)
}
defer conn.Close()
defer func() {
if errClose := conn.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close backing image manager service connection")
}
}()
client := rpc.NewBackingImageManagerServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
@ -249,7 +283,11 @@ func (cli *BackingImageManagerClient) BackupCreate(name, uuid, checksum, backupT
if err != nil {
return fmt.Errorf("failed to connect backing image manager service to %v: %v", cli.Address, err)
}
defer conn.Close()
defer func() {
if errClose := conn.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close backing image manager service connection")
}
}()
client := rpc.NewBackingImageManagerServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
@ -283,7 +321,11 @@ func (cli *BackingImageManagerClient) BackupStatus(name string) (*api.BackupStat
if err != nil {
return nil, fmt.Errorf("failed to connect backing image manager service to %v: %v", cli.Address, err)
}
defer conn.Close()
defer func() {
if errClose := conn.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close backing image manager service connection")
}
}()
client := rpc.NewBackingImageManagerServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)

View File

@ -13,6 +13,7 @@ import (
"time"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/longhorn/backing-image-manager/api"
"github.com/longhorn/backing-image-manager/pkg/util"
@ -39,7 +40,11 @@ func (client *SyncClient) Get(filePath string) (*api.FileInfo, error) {
if err != nil {
return nil, fmt.Errorf("get failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -74,7 +79,11 @@ func (client *SyncClient) List() (map[string]*api.FileInfo, error) {
if err != nil {
return nil, fmt.Errorf("list failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -109,7 +118,11 @@ func (client *SyncClient) Delete(filePath string) error {
if err != nil {
return fmt.Errorf("delete failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -138,7 +151,11 @@ func (client *SyncClient) Forget(filePath string) error {
if err != nil {
return fmt.Errorf("forget failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -173,7 +190,11 @@ func (client *SyncClient) Fetch(srcFilePath, dstFilePath, uuid, diskUUID, expect
if err != nil {
return fmt.Errorf("fetch failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -208,7 +229,11 @@ func (client *SyncClient) DownloadFromURL(downloadURL, filePath, uuid, diskUUID,
if err != nil {
return fmt.Errorf("download from URL failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -251,7 +276,11 @@ func (client *SyncClient) CloneFromBackingImage(sourceBackingImage, sourceBackin
if err != nil {
return errors.Wrapf(err, "clone from backing image failed")
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -293,7 +322,11 @@ func (client *SyncClient) RestoreFromBackupURL(backupURL, concurrentLimit, fileP
if err != nil {
return fmt.Errorf("download from URL failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -317,8 +350,16 @@ func (client *SyncClient) Upload(src, dst, uuid, diskUUID, expectedChecksum stri
r, w := io.Pipe()
m := multipart.NewWriter(w)
go func() {
defer w.Close()
defer m.Close()
defer func() {
if errClose := w.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close writer")
}
}()
defer func() {
if errClose := m.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close multipart writer")
}
}()
part, err := m.CreateFormFile("chunk", "blob")
if err != nil {
return
@ -327,7 +368,11 @@ func (client *SyncClient) Upload(src, dst, uuid, diskUUID, expectedChecksum stri
if err != nil {
return
}
defer file.Close()
defer func() {
if errClose := file.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close file")
}
}()
if _, err = io.Copy(part, file); err != nil {
return
}
@ -353,7 +398,11 @@ func (client *SyncClient) Upload(src, dst, uuid, diskUUID, expectedChecksum stri
if err != nil {
return fmt.Errorf("upload failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -390,7 +439,11 @@ func (client *SyncClient) Receive(filePath, uuid, diskUUID, expectedChecksum, fi
if err != nil {
return fmt.Errorf("receive from peer failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -420,7 +473,11 @@ func (client *SyncClient) Send(filePath, toAddress string) error {
if err != nil {
return fmt.Errorf("send to peer failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
@ -443,7 +500,11 @@ func (client *SyncClient) DownloadToDst(srcFilePath, dstFilePath string) error {
if err != nil {
return errors.Wrapf(err, "failed to create the dst file before download")
}
defer dst.Close()
defer func() {
if errClose := dst.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close dst file")
}
}()
httpClient := &http.Client{Timeout: 0}
@ -457,7 +518,11 @@ func (client *SyncClient) DownloadToDst(srcFilePath, dstFilePath string) error {
if err != nil {
return fmt.Errorf("download to dst failed, err: %s", err)
}
defer resp.Body.Close()
defer func() {
if errClose := resp.Body.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close response body")
}
}()
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("%s, skip reading the response body content", util.GetHTTPClientErrorPrefix(resp.StatusCode))

View File

@ -47,7 +47,11 @@ func GetFileChecksum(filePath string) (string, error) {
if err != nil {
return "", err
}
defer f.Close()
defer func() {
if errClose := f.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close file")
}
}()
h := sha512.New()
if _, err := io.Copy(h, f); err != nil {
@ -62,7 +66,11 @@ func CopyFile(srcPath, dstPath string) (int64, error) {
if err != nil {
return 0, err
}
defer src.Close()
defer func() {
if errClose := src.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close source file")
}
}()
if _, err := os.Stat(dstPath); err == nil || !os.IsNotExist(err) {
if err := os.RemoveAll(dstPath); err != nil {
@ -73,7 +81,11 @@ func CopyFile(srcPath, dstPath string) (int64, error) {
if err != nil {
return 0, err
}
defer dst.Close()
defer func() {
if errClose := dst.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close destination file")
}
}()
return io.Copy(dst, src)
}
@ -293,7 +305,11 @@ func ConvertFromRawToQcow2(filePath string) error {
}
tmpFilePath := filePath + ".qcow2tmp"
defer os.RemoveAll(tmpFilePath)
defer func() {
if errRemove := os.RemoveAll(tmpFilePath); errRemove != nil {
logrus.WithError(errRemove).Error("Failed to remove temporary file")
}
}()
if _, err := Execute([]string{}, QemuImgBinary, "convert", "-f", "raw", "-O", "qcow2", filePath, tmpFilePath); err != nil {
return err
@ -342,19 +358,31 @@ func GunzipFile(filePath string, dstFilePath string) error {
if err != nil {
return err
}
defer gzipfile.Close()
defer func() {
if errClose := gzipfile.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close gzip file")
}
}()
reader, err := gzip.NewReader(gzipfile)
if err != nil {
return err
}
defer reader.Close()
defer func() {
if errClose := reader.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close gzip reader")
}
}()
writer, err := os.Create(dstFilePath)
if err != nil {
return err
}
defer writer.Close()
defer func() {
if errClose := writer.Close(); errClose != nil {
logrus.WithError(errClose).Error("Failed to close destination file")
}
}()
if _, err = io.Copy(writer, reader); err != nil {
return err

View File

@ -6,7 +6,7 @@ ARG https_proxy
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
ENV GOLANGCI_LINT_VERSION="v1.60.3"
RUN zypper -n install gcc ca-certificates git wget curl vim less file nfs-client awk docker && \
RUN zypper -n install gcc ca-certificates git wget curl vim less file nfs-client awk docker e2fsprogs && \
rm -rf /var/cache/zypp/*
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm64=arm64 GOLANG_ARCH=GOLANG_ARCH_${ARCH} \

View File

@ -119,6 +119,13 @@ type DeltaRestoreOperations interface {
// CreateDeltaBlockBackup creates a delta block backup for the given volume and snapshot.
func CreateDeltaBlockBackup(backupName string, config *DeltaBackupConfig) (isIncremental bool, err error) {
createLog := log
defer func() {
if err != nil {
createLog.WithError(err).Error("Failed to create delta block backup")
}
}()
if config == nil {
return false, fmt.Errorf("BUG: invalid empty config for backup")
}
@ -126,22 +133,21 @@ func CreateDeltaBlockBackup(backupName string, config *DeltaBackupConfig) (isInc
volume := config.Volume
snapshot := config.Snapshot
destURL := config.DestURL
createLog = createLog.WithFields(logrus.Fields{
LogFieldVolume: volume,
LogFieldSnapshot: snapshot,
LogFieldDestURL: destURL,
})
deltaOps := config.DeltaOps
if deltaOps == nil {
return false, fmt.Errorf("BUG: missing DeltaBlockBackupOperations")
}
log := logrus.WithFields(logrus.Fields{
"volume": volume,
"snapshot": snapshot,
"destURL": destURL,
})
defer func() {
if err != nil {
log.WithError(err).Error("Failed to create delta block backup")
if updateErr := deltaOps.UpdateBackupStatus(snapshot.Name, volume.Name, string(types.ProgressStateError), 0, "", err.Error()); updateErr != nil {
log.WithError(updateErr).Warn("Failed to update backup status")
createLog.WithError(updateErr).Warn("Failed to update backup status")
}
}
}()
@ -158,7 +164,7 @@ func CreateDeltaBlockBackup(backupName string, config *DeltaBackupConfig) (isInc
defer func() {
if unlockErr := lock.Unlock(); unlockErr != nil {
logrus.WithError(unlockErr).Warn("Failed to unlock")
createLog.WithError(unlockErr).Warn("Failed to unlock")
}
}()
if err := lock.Lock(); err != nil {
@ -177,6 +183,10 @@ func CreateDeltaBlockBackup(backupName string, config *DeltaBackupConfig) (isInc
config.Volume.CompressionMethod = volume.CompressionMethod
config.Volume.DataEngine = volume.DataEngine
createLog = createLog.WithFields(logrus.Fields{
LogFieldCompressionMethod: volume.CompressionMethod,
LogFieldDataEngine: volume.DataEngine,
})
if err := deltaOps.OpenSnapshot(snapshot.Name, volume.Name); err != nil {
return false, err
@ -185,43 +195,50 @@ func CreateDeltaBlockBackup(backupName string, config *DeltaBackupConfig) (isInc
backupRequest := &backupRequest{}
if volume.LastBackupName != "" && !isFullBackup(config) {
lastBackupName := volume.LastBackupName
var backup, err = loadBackup(bsDriver, lastBackupName, volume.Name)
if err != nil {
log.WithFields(logrus.Fields{
LogFieldReason: LogReasonFallback,
LogFieldEvent: LogEventBackup,
LogFieldObject: LogObjectBackup,
LogFieldBackup: lastBackupName,
LogFieldVolume: volume.Name,
LogFieldDestURL: destURL,
}).WithError(err).Info("Cannot find previous backup in backupstore")
} else if backup.SnapshotName == snapshot.Name {
// Generate full snapshot if the snapshot has been backed up last time
log.WithFields(logrus.Fields{
LogFieldReason: LogReasonFallback,
LogFieldEvent: LogEventCompare,
LogFieldObject: LogObjectSnapshot,
LogFieldSnapshot: backup.SnapshotName,
LogFieldVolume: volume.Name,
}).Info("Creating full snapshot config")
} else if backup.SnapshotName != "" && !deltaOps.HasSnapshot(backup.SnapshotName, volume.Name) {
log.WithFields(logrus.Fields{
LogFieldReason: LogReasonFallback,
LogFieldObject: LogObjectSnapshot,
LogFieldSnapshot: backup.SnapshotName,
LogFieldVolume: volume.Name,
}).Info("Cannot find last snapshot in local storage")
createLog = createLog.WithFields(logrus.Fields{
LogFieldLastBackup: lastBackupName,
})
if lastBackup, err := loadBackup(bsDriver, lastBackupName, volume.Name); err != nil {
createLog = createLog.WithFields(logrus.Fields{
LogFieldLastBackup: "",
})
createLog.WithFields(logrus.Fields{
LogFieldReason: LogReasonFallback,
LogFieldEvent: LogEventBackup,
LogFieldObject: LogObjectBackup,
}).WithError(err).Infof("Cannot find previous backup %s in backupstore", lastBackupName)
} else {
backupRequest.lastBackup = backup
createLog = createLog.WithFields(logrus.Fields{
LogFieldLastSnapshot: lastBackup.SnapshotName,
})
if lastBackup.SnapshotName == snapshot.Name {
// Generate full snapshot if the snapshot has been backed up last time
createLog.WithFields(logrus.Fields{
LogFieldReason: LogReasonFallback,
LogFieldEvent: LogEventCompare,
LogFieldObject: LogObjectSnapshot,
}).Info("Creating full snapshot config")
} else if lastBackup.SnapshotName != "" && !deltaOps.HasSnapshot(lastBackup.SnapshotName, volume.Name) {
createLog = createLog.WithFields(logrus.Fields{
LogFieldLastSnapshot: "",
})
createLog.WithFields(logrus.Fields{
LogFieldReason: LogReasonFallback,
LogFieldObject: LogObjectSnapshot,
}).Infof("Cannot find last snapshot %s in local storage", lastBackup.SnapshotName)
} else {
backupRequest.lastBackup = lastBackup
}
}
}
log.WithFields(logrus.Fields{
LogFieldReason: LogReasonStart,
LogFieldObject: LogObjectSnapshot,
LogFieldEvent: LogEventCompare,
LogFieldSnapshot: snapshot.Name,
LogFieldLastSnapshot: backupRequest.getLastSnapshotName(),
createLog = logrus.WithFields(logrus.Fields{
LogFieldBackupType: backupRequest.getBackupType(),
})
createLog.WithFields(logrus.Fields{
LogFieldReason: LogReasonStart,
LogFieldObject: LogObjectSnapshot,
LogFieldEvent: LogEventCompare,
}).Info("Generating snapshot changed blocks config")
delta, err := deltaOps.CompareSnapshot(snapshot.Name, backupRequest.getLastSnapshotName(), volume.Name)
@ -238,19 +255,15 @@ func CreateDeltaBlockBackup(backupName string, config *DeltaBackupConfig) (isInc
}
return backupRequest.isIncrementalBackup(), err
}
log.WithFields(logrus.Fields{
LogFieldReason: LogReasonComplete,
LogFieldObject: LogObjectSnapshot,
LogFieldEvent: LogEventCompare,
LogFieldSnapshot: snapshot.Name,
LogFieldLastSnapshot: backupRequest.getLastSnapshotName(),
createLog.WithFields(logrus.Fields{
LogFieldReason: LogReasonComplete,
LogFieldObject: LogObjectSnapshot,
LogFieldEvent: LogEventCompare,
}).Info("Generated snapshot changed blocks config")
log.WithFields(logrus.Fields{
LogFieldReason: LogReasonStart,
LogFieldEvent: LogEventBackup,
LogFieldBackupType: backupRequest.getBackupType(),
LogFieldSnapshot: snapshot.Name,
createLog.WithFields(logrus.Fields{
LogFieldReason: LogReasonStart,
LogFieldEvent: LogEventBackup,
}).Info("Creating backup")
deltaBackup := &Backup{
@ -264,10 +277,6 @@ func CreateDeltaBlockBackup(backupName string, config *DeltaBackupConfig) (isInc
},
}
log = logrus.WithFields(logrus.Fields{
"compressionMethod": volume.CompressionMethod,
})
// keep lock alive for async go routine.
if err := lock.Lock(); err != nil {
if closeErr := deltaOps.CloseSnapshot(snapshot.Name, volume.Name); closeErr != nil {
@ -278,29 +287,29 @@ func CreateDeltaBlockBackup(backupName string, config *DeltaBackupConfig) (isInc
go func() {
defer func() {
if closeErr := deltaOps.CloseSnapshot(snapshot.Name, volume.Name); closeErr != nil {
logrus.WithError(closeErr).Warn("Failed to close snapshot")
createLog.WithError(closeErr).Warn("Failed to close snapshot")
}
}()
defer func() {
if unlockErr := lock.Unlock(); unlockErr != nil {
logrus.WithError(unlockErr).Warn("Failed to unlock")
createLog.WithError(unlockErr).Warn("Failed to unlock")
}
}()
if updateErr := deltaOps.UpdateBackupStatus(snapshot.Name, volume.Name, string(types.ProgressStateInProgress), 0, "", ""); updateErr != nil {
logrus.WithError(updateErr).Error("Failed to update backup status")
createLog.WithError(updateErr).Error("Failed to update backup status")
}
log.Info("Performing delta block backup")
createLog.Info("Performing delta block backup")
if progress, backup, err := performBackup(bsDriver, config, delta, deltaBackup, backupRequest.lastBackup); err != nil {
logrus.WithError(err).Errorf("Failed to perform backup for volume %v snapshot %v", volume.Name, snapshot.Name)
createLog.WithError(err).Errorf("Failed to perform backup for volume %v snapshot %v", volume.Name, snapshot.Name)
if updateErr := deltaOps.UpdateBackupStatus(snapshot.Name, volume.Name, string(types.ProgressStateInProgress), progress, "", err.Error()); updateErr != nil {
logrus.WithError(updateErr).Warn("Failed to update backup status")
createLog.WithError(updateErr).Warn("Failed to update backup status")
}
} else {
if updateErr := deltaOps.UpdateBackupStatus(snapshot.Name, volume.Name, string(types.ProgressStateInProgress), progress, backup, ""); updateErr != nil {
logrus.WithError(updateErr).Warn("Failed to update backup status")
createLog.WithError(updateErr).Warn("Failed to update backup status")
}
}
}()
@ -687,7 +696,14 @@ func mergeSnapshotMap(deltaBackup, lastBackup *Backup) *Backup {
}
// RestoreDeltaBlockBackup restores a delta block backup for the given configuration
func RestoreDeltaBlockBackup(ctx context.Context, config *DeltaRestoreConfig) error {
func RestoreDeltaBlockBackup(ctx context.Context, config *DeltaRestoreConfig) (err error) {
restoreLog := log
defer func() {
if err != nil {
restoreLog.WithError(err).Error("Failed to restore delta block backup")
}
}()
if config == nil {
return fmt.Errorf("invalid empty config for restore")
}
@ -695,6 +711,12 @@ func RestoreDeltaBlockBackup(ctx context.Context, config *DeltaRestoreConfig) er
volDevName := config.Filename
backupURL := config.BackupURL
concurrentLimit := config.ConcurrentLimit
restoreLog = restoreLog.WithFields(logrus.Fields{
LogFieldDstVolumeDev: volDevName,
LogFieldBackupURL: backupURL,
LogFieldConcurrentLimit: concurrentLimit,
})
deltaOps := config.DeltaOps
if deltaOps == nil {
return fmt.Errorf("missing DeltaRestoreOperations")
@ -709,6 +731,10 @@ func RestoreDeltaBlockBackup(ctx context.Context, config *DeltaRestoreConfig) er
if err != nil {
return err
}
restoreLog = restoreLog.WithFields(logrus.Fields{
LogFieldSnapshot: srcBackupName,
LogFieldSrcVolume: srcVolumeName,
})
lock, err := New(bsDriver, srcVolumeName, RESTORE_LOCK)
if err != nil {
@ -717,7 +743,7 @@ func RestoreDeltaBlockBackup(ctx context.Context, config *DeltaRestoreConfig) er
defer func() {
if unlockErr := lock.Unlock(); unlockErr != nil {
logrus.WithError(unlockErr).Warn("Failed to unlock")
restoreLog.WithError(unlockErr).Warn("Failed to unlock")
}
}()
if err := lock.Lock(); err != nil {
@ -727,14 +753,18 @@ func RestoreDeltaBlockBackup(ctx context.Context, config *DeltaRestoreConfig) er
vol, err := loadVolume(bsDriver, srcVolumeName)
if err != nil {
return generateError(logrus.Fields{
LogFieldVolume: srcVolumeName,
LogEventBackupURL: backupURL,
}, "Volume doesn't exist in backupstore: %v", err)
LogFieldSrcVolume: srcVolumeName,
LogFieldSnapshot: srcBackupName,
LogFieldBackupURL: backupURL,
}, "Source volume doesn't exist in backupstore: %v", err)
}
if vol.Size == 0 || vol.Size%DEFAULT_BLOCK_SIZE != 0 {
return fmt.Errorf("invalid volume size %v", vol.Size)
}
restoreLog = restoreLog.WithFields(logrus.Fields{
LogFieldCompressionMethod: vol.CompressionMethod,
LogFieldDataEngine: vol.DataEngine,
})
volDev, volDevPath, err := deltaOps.OpenVolumeDev(volDevName)
if err != nil {
@ -743,7 +773,7 @@ func RestoreDeltaBlockBackup(ctx context.Context, config *DeltaRestoreConfig) er
defer func() {
if err != nil {
if _err := deltaOps.CloseVolumeDev(volDev); _err != nil {
logrus.WithError(_err).Warnf("Failed to close volume device %v", volDevName)
restoreLog.WithError(_err).Warnf("Failed to close volume device %v", volDevName)
}
}
}()
@ -758,14 +788,10 @@ func RestoreDeltaBlockBackup(ctx context.Context, config *DeltaRestoreConfig) er
return err
}
log.WithFields(logrus.Fields{
LogFieldReason: LogReasonStart,
LogFieldEvent: LogEventRestore,
LogFieldObject: LogFieldSnapshot,
LogFieldSnapshot: srcBackupName,
LogFieldOrigVolume: srcVolumeName,
LogFieldVolumeDev: volDevName,
LogEventBackupURL: backupURL,
restoreLog.WithFields(logrus.Fields{
LogFieldReason: LogReasonStart,
LogFieldEvent: LogEventRestore,
LogFieldObject: LogFieldSnapshot,
}).Info("Restoring delta block backup")
// keep lock alive for async go routine.
@ -779,12 +805,12 @@ func RestoreDeltaBlockBackup(ctx context.Context, config *DeltaRestoreConfig) er
defer func() {
if _err := deltaOps.CloseVolumeDev(volDev); _err != nil {
logrus.WithError(_err).Warnf("Failed to close volume device %v", volDevName)
restoreLog.WithError(_err).Warnf("Failed to close volume device %v", volDevName)
}
deltaOps.UpdateRestoreStatus(volDevName, currentProgress, err)
if unlockErr := lock.Unlock(); unlockErr != nil {
logrus.WithError(unlockErr).Warn("Failed to unlock")
restoreLog.WithError(unlockErr).Warn("Failed to unlock")
}
}()
@ -798,7 +824,7 @@ func RestoreDeltaBlockBackup(ctx context.Context, config *DeltaRestoreConfig) er
// https://github.com/longhorn/longhorn/issues/2503
// We want to truncate regular files, but not device
if stat.Mode().IsRegular() {
log.Infof("Truncate %v to size %v", volDevName, vol.Size)
restoreLog.Infof("Truncate %v to size %v", volDevName, vol.Size)
err = volDev.Truncate(vol.Size)
if err != nil {
return
@ -816,7 +842,7 @@ func RestoreDeltaBlockBackup(ctx context.Context, config *DeltaRestoreConfig) er
err = <-mergedErrChan
if err != nil {
currentProgress = progress.progress
logrus.WithError(err).Errorf("Failed to delta restore volume %v backup %v", srcVolumeName, backup.Name)
restoreLog.WithError(err).Errorf("Failed to delta restore volume %v backup %v", srcVolumeName, backup.Name)
return
}
currentProgress = PROGRESS_PERCENTAGE_BACKUP_TOTAL
@ -839,7 +865,14 @@ func restoreBlockToFile(bsDriver BackupStoreDriver, volumeName string, volDev *o
return errors.Wrapf(err, "failed to write decompressed block %v to volume %v", blkFile, volumeName)
}
func RestoreDeltaBlockBackupIncrementally(ctx context.Context, config *DeltaRestoreConfig) error {
func RestoreDeltaBlockBackupIncrementally(ctx context.Context, config *DeltaRestoreConfig) (err error) {
restoreLog := log
defer func() {
if err != nil {
restoreLog.WithError(err).Error("Failed to restore delta block backup incrementally")
}
}()
if config == nil {
return fmt.Errorf("invalid empty config for restore")
}
@ -847,6 +880,12 @@ func RestoreDeltaBlockBackupIncrementally(ctx context.Context, config *DeltaRest
backupURL := config.BackupURL
volDevName := config.Filename
lastBackupName := config.LastBackupName
restoreLog = restoreLog.WithFields(logrus.Fields{
LogFieldDstVolumeDev: volDevName,
LogFieldBackupURL: backupURL,
LogFieldLastBackup: lastBackupName,
})
deltaOps := config.DeltaOps
if deltaOps == nil {
return fmt.Errorf("missing DeltaRestoreOperations")
@ -861,6 +900,10 @@ func RestoreDeltaBlockBackupIncrementally(ctx context.Context, config *DeltaRest
if err != nil {
return err
}
restoreLog = restoreLog.WithFields(logrus.Fields{
LogFieldSnapshot: srcBackupName,
LogFieldSrcVolume: srcVolumeName,
})
lock, err := New(bsDriver, srcVolumeName, RESTORE_LOCK)
if err != nil {
@ -872,7 +915,7 @@ func RestoreDeltaBlockBackupIncrementally(ctx context.Context, config *DeltaRest
}
defer func() {
if unlockErr := lock.Unlock(); unlockErr != nil {
logrus.WithError(unlockErr).Warn("Failed to unlock")
restoreLog.WithError(unlockErr).Warn("Failed to unlock")
}
}()
@ -880,7 +923,8 @@ func RestoreDeltaBlockBackupIncrementally(ctx context.Context, config *DeltaRest
if err != nil {
return generateError(logrus.Fields{
LogFieldVolume: srcVolumeName,
LogEventBackupURL: backupURL,
LogFieldSnapshot: srcBackupName,
LogFieldBackupURL: backupURL,
}, "Volume doesn't exist in backupstore: %v", err)
}
@ -895,7 +939,7 @@ func RestoreDeltaBlockBackupIncrementally(ctx context.Context, config *DeltaRest
// check the file. do not reuse if the file exists
if _, err := os.Stat(volDevName); err == nil {
logrus.Warnf("File %s for the incremental restore exists, will remove and re-create it", volDevName)
restoreLog.Warnf("File %s for the incremental restore exists, will remove and re-create it", volDevName)
if err := os.Remove(volDevName); err != nil {
return errors.Wrapf(err, "failed to clean up the existing file %v before incremental restore", volDevName)
}
@ -909,7 +953,7 @@ func RestoreDeltaBlockBackupIncrementally(ctx context.Context, config *DeltaRest
// make sure to close the device
if err != nil {
if _err := deltaOps.CloseVolumeDev(volDev); _err != nil {
logrus.WithError(_err).Warnf("Failed to close volume device %v", volDevName)
restoreLog.WithError(_err).Warnf("Failed to close volume device %v", volDevName)
}
}
}()
@ -928,14 +972,10 @@ func RestoreDeltaBlockBackupIncrementally(ctx context.Context, config *DeltaRest
return err
}
log.WithFields(logrus.Fields{
LogFieldReason: LogReasonStart,
LogFieldEvent: LogEventRestoreIncre,
LogFieldObject: LogFieldSnapshot,
LogFieldSnapshot: srcBackupName,
LogFieldOrigVolume: srcVolumeName,
LogFieldVolumeDev: volDevName,
LogEventBackupURL: backupURL,
restoreLog.WithFields(logrus.Fields{
LogFieldReason: LogReasonStart,
LogFieldEvent: LogEventRestoreIncre,
LogFieldObject: LogFieldSnapshot,
}).Infof("Started incrementally restoring from %v to %v", lastBackup, backup)
// keep lock alive for async go routine.
if err := lock.Lock(); err != nil {
@ -947,13 +987,13 @@ func RestoreDeltaBlockBackupIncrementally(ctx context.Context, config *DeltaRest
defer func() {
if _err := deltaOps.CloseVolumeDev(volDev); _err != nil {
logrus.WithError(_err).Warnf("Failed to close volume device %v", volDevName)
restoreLog.WithError(_err).Warnf("Failed to close volume device %v", volDevName)
}
deltaOps.UpdateRestoreStatus(volDevName, finalProgress, err)
if unlockErr := lock.Unlock(); unlockErr != nil {
logrus.WithError(unlockErr).Warn("Failed to unlock")
restoreLog.WithError(unlockErr).Warn("Failed to unlock")
}
}()
@ -963,7 +1003,7 @@ func RestoreDeltaBlockBackupIncrementally(ctx context.Context, config *DeltaRest
// https://github.com/longhorn/longhorn/issues/2503
// We want to truncate regular files, but not device
if stat.Mode().IsRegular() {
log.Infof("Truncate %v to size %v", volDevName, vol.Size)
restoreLog.Infof("Truncate %v to size %v", volDevName, vol.Size)
err = volDev.Truncate(vol.Size)
if err != nil {
return
@ -1152,7 +1192,17 @@ func fillZeros(volDev *os.File, offset, length int64) error {
return syscall.Fallocate(int(volDev.Fd()), 0, offset, length)
}
func DeleteBackupVolume(volumeName string, destURL string) error {
func DeleteBackupVolume(volumeName string, destURL string) (err error) {
deleteLog := log.WithFields(logrus.Fields{
LogFieldVolume: volumeName,
LogFieldDestURL: destURL,
})
defer func() {
if err != nil {
deleteLog.WithError(err).Errorf("Failed to delete backup volume %v at destination URL %v", volumeName, destURL)
}
}()
bsDriver, err := GetBackupStoreDriver(destURL)
if err != nil {
return err
@ -1178,7 +1228,7 @@ func DeleteBackupVolume(volumeName string, destURL string) error {
}
defer func() {
if unlockErr := lock.Unlock(); unlockErr != nil {
logrus.WithError(unlockErr).Warn("Failed to unlock")
deleteLog.WithError(unlockErr).Warn("Failed to unlock")
}
}()
return removeVolume(volumeName, bsDriver)
@ -1226,7 +1276,16 @@ func getLatestBackup(backup *Backup, lastBackup *LastBackupInfo) error {
return nil
}
func DeleteDeltaBlockBackup(backupURL string) error {
func DeleteDeltaBlockBackup(backupURL string) (err error) {
deleteLog := log.WithFields(logrus.Fields{
LogFieldBackupURL: backupURL,
})
defer func() {
if err != nil {
log.WithError(err).Error("Failed to delete delta block backup")
}
}()
bsDriver, err := GetBackupStoreDriver(backupURL)
if err != nil {
return err
@ -1236,9 +1295,9 @@ func DeleteDeltaBlockBackup(backupURL string) error {
if err != nil {
return err
}
log := log.WithFields(logrus.Fields{
"backup": backupName,
"volume": volumeName,
deleteLog = deleteLog.WithFields(logrus.Fields{
LogFieldBackup: backupName,
LogFieldVolume: volumeName,
})
lock, err := New(bsDriver, volumeName, DELETION_LOCK)
@ -1250,14 +1309,14 @@ func DeleteDeltaBlockBackup(backupURL string) error {
}
defer func() {
if unlockErr := lock.Unlock(); unlockErr != nil {
logrus.WithError(unlockErr).Warn("Failed to unlock")
deleteLog.WithError(unlockErr).Warn("Failed to unlock")
}
}()
// If we fail to load the backup we still want to proceed with the deletion of the backup file
backupToBeDeleted, err := loadBackup(bsDriver, backupName, volumeName)
if err != nil {
log.WithError(err).Warn("Failed to load to be deleted backup")
deleteLog.WithError(err).Warn("Failed to load to be deleted backup")
backupToBeDeleted = &Backup{
Name: backupName,
VolumeName: volumeName,
@ -1268,7 +1327,7 @@ func DeleteDeltaBlockBackup(backupURL string) error {
if err := removeBackup(backupToBeDeleted, bsDriver); err != nil {
return err
}
log.Info("Removed backup for volume")
deleteLog.Info("Removed backup for volume")
v, err := loadVolume(bsDriver, volumeName)
if err != nil {
@ -1281,11 +1340,11 @@ func DeleteDeltaBlockBackup(backupURL string) error {
v.LastBackupAt = ""
}
log.Info("GC started")
deleteLog.Info("GC started")
deleteBlocks := true
backupNames, err := getBackupNamesForVolume(bsDriver, volumeName)
if err != nil {
log.WithError(err).Warn("Failed to load backup names, skip block deletion")
deleteLog.WithError(err).Warn("Failed to load backup names, skip block deletion")
deleteBlocks = false
}
@ -1304,16 +1363,16 @@ func DeleteDeltaBlockBackup(backupURL string) error {
lastBackup := &LastBackupInfo{}
for _, name := range backupNames {
log := log.WithField("backup", name)
deleteLog = deleteLog.WithField("backup", name)
backup, err := loadBackup(bsDriver, name, volumeName)
if err != nil {
log.WithError(err).Warn("Failed to load backup, skip block deletion")
deleteLog.WithError(err).Warn("Failed to load backup, skip block deletion")
deleteBlocks = false
break
}
if isBackupInProgress(backup) {
log.Info("Found in progress backup, skip block deletion")
deleteLog.Info("Found in progress backup, skip block deletion")
deleteBlocks = false
break
}
@ -1326,7 +1385,7 @@ func DeleteDeltaBlockBackup(backupURL string) error {
if updateLastBackup {
err := getLatestBackup(backup, lastBackup)
if err != nil {
log.WithError(err).Warn("Failed to find last backup, skip block deletion")
deleteLog.WithError(err).Warn("Failed to find last backup, skip block deletion")
deleteBlocks = false
break
}
@ -1346,7 +1405,7 @@ func DeleteDeltaBlockBackup(backupURL string) error {
prevBackupNames := backupNames
backupNames, err = getBackupNamesForVolume(bsDriver, volumeName)
if err != nil || !util.UnorderedEqual(prevBackupNames, backupNames) {
log.Info("Found new backups for volume, skip block deletion")
deleteLog.Info("Found new backups for volume, skip block deletion")
deleteBlocks = false
}

View File

@ -7,20 +7,22 @@ import (
)
const (
LogFieldVolume = "volume"
LogFieldVolumeDev = "volume_dev"
LogFieldVolumeName = "volume_name"
LogFieldOrigVolume = "original_volume"
LogFieldSnapshot = "snapshot"
LogFieldBackup = "backup"
LogFieldBackupType = "backup_type"
LogFieldLastBackup = "last_backup"
LogFieldLastSnapshot = "last_snapshot"
LogEventBackupURL = "backup_url"
LogFieldDestURL = "dest_url"
LogFieldSourceURL = "source_url"
LogFieldKind = "kind"
LogFieldFilepath = "filepath"
LogFieldVolume = "volume"
LogFieldDataEngine = "data_engine"
LogFieldSrcVolume = "source_volume"
LogFieldDstVolumeDev = "destination_volume_dev"
LogFieldSnapshot = "snapshot"
LogFieldLastSnapshot = "last_snapshot"
LogFieldBackup = "backup"
LogFieldBackupType = "backup_type"
LogFieldLastBackup = "last_backup"
LogFieldCompressionMethod = "compression_method"
LogFieldBackupURL = "backup_url"
LogFieldDestURL = "dest_url"
LogFieldSourceURL = "source_url"
LogFieldKind = "kind"
LogFieldFilepath = "filepath"
LogFieldConcurrentLimit = "concurrent_limit"
LogFieldEvent = "event"
LogEventBackup = "backup"

View File

@ -88,7 +88,7 @@ func RestoreSingleFileBackup(backupURL, path string) (string, error) {
if _, err := loadVolume(driver, srcVolumeName); err != nil {
return "", generateError(logrus.Fields{
LogFieldVolume: srcVolumeName,
LogEventBackupURL: backupURL,
LogFieldBackupURL: backupURL,
}, "Volume doesn't exist in backupstore: %v", err)
}

View File

@ -3,6 +3,7 @@ package iscsi
import (
"bufio"
"fmt"
"net"
"path/filepath"
"strconv"
"strings"
@ -186,7 +187,7 @@ func IsTargetLoggedIn(ip, target string, nsexec *lhns.Executor) bool {
scanner := bufio.NewScanner(strings.NewReader(output))
for scanner.Scan() {
line := scanner.Text()
if strings.Contains(line, ip+":") {
if strings.Contains(line, net.JoinHostPort(ip, "")) {
if strings.HasSuffix(line, " "+target) ||
strings.Contains(scanner.Text(), " "+target+" ") {
found = true
@ -253,7 +254,8 @@ func findScsiDevice(ip, target string, lun int, nsexec *lhns.Executor) (*lhtypes
*/
scanner := bufio.NewScanner(strings.NewReader(output))
targetLine := "Target: " + target
ipLine := " " + ip + ":"
ipLine := " " + net.JoinHostPort(ip, "")
lunLine := "Lun: " + strconv.Itoa(lun)
diskPrefix := "Attached scsi disk"
stateLine := "State:"

View File

@ -171,7 +171,7 @@ func ValidVolumeName(name string) bool {
}
func Volume2ISCSIName(name string) string {
return strings.Replace(name, "_", ":", -1)
return strings.ReplaceAll(name, "_", ":")
}
func Now() string {
@ -243,7 +243,11 @@ func ResolveBackingFilepath(fileOrDirpath string) (string, error) {
if err != nil {
return "", err
}
defer fileOrDir.Close()
defer func() {
if errClose := fileOrDir.Close(); errClose != nil {
logrus.WithError(errClose).Errorf("Failed to close file %v", fileOrDirpath)
}
}()
fileOrDirInfo, err := fileOrDir.Stat()
if err != nil {

View File

@ -74,6 +74,7 @@ type InstanceStatus struct {
StandbyTargetPortStart int32 `json:"standbyTargetPortStart"`
StandbyTargetPortEnd int32 `json:"standbyTargetPortEnd"`
UblkID int32 `json:"ublk_id"`
UUID string `json:"uuid"`
}
func RPCToInstanceStatus(obj *rpc.InstanceStatus) InstanceStatus {
@ -88,6 +89,7 @@ func RPCToInstanceStatus(obj *rpc.InstanceStatus) InstanceStatus {
StandbyTargetPortStart: obj.StandbyTargetPortStart,
StandbyTargetPortEnd: obj.StandbyTargetPortEnd,
UblkID: obj.UblkId,
UUID: obj.Uuid,
}
}

View File

@ -41,6 +41,7 @@ type ProcessStatus struct {
Conditions map[string]bool `json:"conditions"`
PortStart int32 `json:"portStart"`
PortEnd int32 `json:"portEnd"`
UUID string `json:"uuid"`
}
func RPCToProcessStatus(obj *rpc.ProcessStatus) ProcessStatus {
@ -50,6 +51,7 @@ func RPCToProcessStatus(obj *rpc.ProcessStatus) ProcessStatus {
Conditions: obj.Conditions,
PortStart: obj.PortStart,
PortEnd: obj.PortEnd,
UUID: obj.Uuid,
}
}

View File

@ -192,8 +192,8 @@ func (c *InstanceServiceClient) InstanceCreate(req *InstanceCreateRequest) (*api
return api.RPCToInstance(p), nil
}
// InstanceDelete deletes the instance by name.
func (c *InstanceServiceClient) InstanceDelete(dataEngine, name, instanceType, diskUUID string, cleanupRequired bool) (*api.Instance, error) {
// InstanceDelete deletes the instance by name. UUID will be validated if not empty.
func (c *InstanceServiceClient) InstanceDelete(dataEngine, name, uuid, instanceType, diskUUID string, cleanupRequired bool) (*api.Instance, error) {
if name == "" {
return nil, fmt.Errorf("failed to delete instance: missing required parameter name")
}
@ -209,6 +209,7 @@ func (c *InstanceServiceClient) InstanceDelete(dataEngine, name, instanceType, d
p, err := client.InstanceDelete(ctx, &rpc.InstanceDeleteRequest{
Name: name,
Uuid: uuid,
Type: instanceType,
// nolint:all replaced with DataEngine
BackendStoreDriver: rpc.BackendStoreDriver(driver),

View File

@ -116,7 +116,7 @@ func (c *ProcessManagerClient) ProcessCreate(name, binary string, portCount int,
})
}
func (c *ProcessManagerClient) ProcessDelete(name string) (*rpc.ProcessResponse, error) {
func (c *ProcessManagerClient) ProcessDelete(name, uuid string) (*rpc.ProcessResponse, error) {
if name == "" {
return nil, fmt.Errorf("failed to delete process: missing required parameter name")
}
@ -127,6 +127,7 @@ func (c *ProcessManagerClient) ProcessDelete(name string) (*rpc.ProcessResponse,
return client.ProcessDelete(ctx, &rpc.ProcessDeleteRequest{
Name: name,
Uuid: uuid,
})
}

View File

@ -37,6 +37,10 @@ func GetVolumeDevicePath(volumeName, dataEngine string, EncryptedDevice bool) st
}
return path.Join(MapperDevPath, volumeName)
}
return GetRawVolumeDevicePath(volumeName)
}
func GetRawVolumeDevicePath(volumeName string) string {
return filepath.Join(DevPath, "longhorn", volumeName)
}

View File

@ -7,6 +7,7 @@
package imrpc
import (
enginerpc "github.com/longhorn/types/pkg/generated/enginerpc"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
@ -794,45 +795,117 @@ func (x *DiskVersionResponse) GetInstanceManagerDiskServiceAPIMinVersion() int64
return 0
}
type DiskMetricsGetReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Metrics *enginerpc.Metrics `protobuf:"bytes,1,opt,name=metrics,proto3" json:"metrics,omitempty"`
}
func (x *DiskMetricsGetReply) Reset() {
*x = DiskMetricsGetReply{}
if protoimpl.UnsafeEnabled {
mi := &file_imrpc_disk_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DiskMetricsGetReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DiskMetricsGetReply) ProtoMessage() {}
func (x *DiskMetricsGetReply) ProtoReflect() protoreflect.Message {
mi := &file_imrpc_disk_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DiskMetricsGetReply.ProtoReflect.Descriptor instead.
func (*DiskMetricsGetReply) Descriptor() ([]byte, []int) {
return file_imrpc_disk_proto_rawDescGZIP(), []int{9}
}
func (x *DiskMetricsGetReply) GetMetrics() *enginerpc.Metrics {
if x != nil {
return x.Metrics
}
return nil
}
var File_imrpc_disk_proto protoreflect.FileDescriptor
var file_imrpc_disk_proto_rawDesc = []byte{
0x0a, 0x10, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x05, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x02, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75,
0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52,
0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72,
0x65, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x66,
0x72, 0x65, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c,
0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72,
0x65, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0a, 0x66, 0x72, 0x65, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62,
0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c,
0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a,
0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64,
0x72, 0x69, 0x76, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x0f, 0x52, 0x65,
0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x61,
0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12,
0x1b, 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01,
0x28, 0x04, 0x52, 0x08, 0x73, 0x70, 0x65, 0x63, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b,
0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x04, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xd8, 0x01,
0x0a, 0x11, 0x44, 0x69, 0x73, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0xc0, 0x02, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68,
0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69,
0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53,
0x69, 0x7a, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x66, 0x72, 0x65, 0x65, 0x53, 0x69, 0x7a, 0x65,
0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73,
0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x6c, 0x6f,
0x63, 0x6b, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63,
0x6b, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x66, 0x72, 0x65, 0x65, 0x42, 0x6c,
0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x69,
0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53,
0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73,
0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74,
0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1b,
0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64,
0x69, 0x73, 0x6b, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x64, 0x69, 0x73, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63,
0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x70, 0x65,
0x63, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f,
0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x75,
0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xd8, 0x01, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x6b, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09,
0x64, 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x0f, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65,
0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69,
0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64,
0x69, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f,
0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b,
0x55, 0x75, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x70, 0x61, 0x74,
0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x50, 0x61, 0x74,
0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65,
0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18,
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x44, 0x72, 0x69, 0x76, 0x65,
0x72, 0x22, 0x99, 0x01, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e,
0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79,
0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b,
0x64, 0x69, 0x73, 0x6b, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x22, 0xb9, 0x01,
0x0a, 0x11, 0x44, 0x69, 0x73, 0x6b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44,
0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70,
@ -841,122 +914,107 @@ var file_imrpc_disk_proto_rawDesc = []byte{
0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64,
0x69, 0x73, 0x6b, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x64, 0x69, 0x73, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63,
0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c,
0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f,
0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69,
0x73, 0x6b, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x22, 0x99, 0x01, 0x0a, 0x0e, 0x44, 0x69, 0x73,
0x6b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x64,
0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f,
0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52,
0x08, 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73,
0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69,
0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x70,
0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x50,
0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x64, 0x72, 0x69, 0x76,
0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x44, 0x72,
0x69, 0x76, 0x65, 0x72, 0x22, 0xb9, 0x01, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x6b, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x64, 0x69,
0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e,
0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08,
0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b,
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73,
0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, 0x75,
0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x55, 0x75,
0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x12,
0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72,
0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61,
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44,
0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70,
0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f,
0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x22,
0xe9, 0x01, 0x0a, 0x1f, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49,
0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x69,
0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c,
0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69,
0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x72, 0x65,
0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x5b,
0x0a, 0x15, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63,
0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdf, 0x01, 0x0a, 0x20,
0x64, 0x69, 0x73, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b,
0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64,
0x69, 0x73, 0x6b, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x44, 0x69,
0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09,
0x64, 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x0f, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65,
0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69,
0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64,
0x69, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f,
0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69,
0x73, 0x6b, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x22, 0xe9, 0x01, 0x0a, 0x1f, 0x44, 0x69, 0x73,
0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x11,
0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e,
0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x2c, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b,
0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b,
0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64,
0x69, 0x73, 0x6b, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x64, 0x69, 0x73, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x70, 0x6c,
0x63, 0x69, 0x61, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x70, 0x6c, 0x63, 0x69, 0x61,
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b,
0x64, 0x69, 0x73, 0x6b, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x22, 0x99, 0x02,
0x0a, 0x13, 0x44, 0x69, 0x73, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x1c, 0x0a, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a,
0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x24, 0x69,
0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x44, 0x69,
0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x24, 0x69, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,
0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x5b, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x6c, 0x69,
0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x16, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63,
0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x22, 0xdf, 0x01, 0x0a, 0x20, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70,
0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x64, 0x69, 0x73,
0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x69,
0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64,
0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b,
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, 0x75, 0x69,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x55, 0x75, 0x69,
0x64, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x70, 0x6c, 0x63, 0x69, 0x61, 0x5f, 0x69, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x13, 0x72, 0x65, 0x70, 0x6c, 0x63, 0x69, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x64, 0x72,
0x69, 0x76, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b,
0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x22, 0x99, 0x02, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x6b, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18,
0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x69, 0x74, 0x43,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74,
0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44,
0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64,
0x44, 0x61, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x24, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01,
0x28, 0x03, 0x52, 0x24, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61,
0x67, 0x65, 0x72, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x50,
0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x27, 0x69, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x44, 0x69, 0x73, 0x6b, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x50, 0x49, 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x27, 0x69, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x58, 0x0a, 0x27, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67,
0x65, 0x72, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x50, 0x49,
0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
0x52, 0x27, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
0x72, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x50, 0x49, 0x4d,
0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x25, 0x0a, 0x08, 0x44, 0x69, 0x73,
0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73,
0x74, 0x65, 0x6d, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x10, 0x01,
0x32, 0xbb, 0x03, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x12, 0x33, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x18,
0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63,
0x2e, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x3e, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x6b, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x07, 0x44, 0x69, 0x73, 0x6b, 0x47, 0x65, 0x74,
0x12, 0x15, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x47, 0x65, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e,
0x44, 0x69, 0x73, 0x6b, 0x12, 0x68, 0x0a, 0x17, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c,
0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12,
0x25, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c,
0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44,
0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x50, 0x49, 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x22, 0x40, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63,
0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x07, 0x6d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x74, 0x79,
0x70, 0x65, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x07, 0x6d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x73, 0x2a, 0x25, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65,
0x12, 0x0e, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x10, 0x00,
0x12, 0x09, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x10, 0x01, 0x32, 0xfc, 0x03, 0x0a, 0x0b,
0x44, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x44,
0x69, 0x73, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x69, 0x6d, 0x72, 0x70,
0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b,
0x12, 0x3e, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x6b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x18,
0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x12, 0x2d, 0x0a, 0x07, 0x44, 0x69, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x69, 0x6d,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x12,
0x68, 0x0a, 0x17, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x69, 0x6d, 0x72,
0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x26, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65,
0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x19, 0x44, 0x69, 0x73,
0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44,
0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c,
0x0a, 0x19, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x69, 0x6d,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49,
0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x0a,
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2f,
0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x6e,
0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f,
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x73, 0x47, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69,
0x73, 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x69,
0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x40, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a,
0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72,
0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
@ -972,7 +1030,7 @@ func file_imrpc_disk_proto_rawDescGZIP() []byte {
}
var file_imrpc_disk_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_imrpc_disk_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_imrpc_disk_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_imrpc_disk_proto_goTypes = []interface{}{
(DiskType)(0), // 0: imrpc.DiskType
(*Disk)(nil), // 1: imrpc.Disk
@ -984,34 +1042,39 @@ var file_imrpc_disk_proto_goTypes = []interface{}{
(*DiskReplicaInstanceListResponse)(nil), // 7: imrpc.DiskReplicaInstanceListResponse
(*DiskReplicaInstanceDeleteRequest)(nil), // 8: imrpc.DiskReplicaInstanceDeleteRequest
(*DiskVersionResponse)(nil), // 9: imrpc.DiskVersionResponse
nil, // 10: imrpc.DiskReplicaInstanceListResponse.ReplicaInstancesEntry
(*emptypb.Empty)(nil), // 11: google.protobuf.Empty
(*DiskMetricsGetReply)(nil), // 10: imrpc.DiskMetricsGetReply
nil, // 11: imrpc.DiskReplicaInstanceListResponse.ReplicaInstancesEntry
(*enginerpc.Metrics)(nil), // 12: ptypes.Metrics
(*emptypb.Empty)(nil), // 13: google.protobuf.Empty
}
var file_imrpc_disk_proto_depIdxs = []int32{
0, // 0: imrpc.DiskCreateRequest.disk_type:type_name -> imrpc.DiskType
0, // 1: imrpc.DiskGetRequest.disk_type:type_name -> imrpc.DiskType
0, // 2: imrpc.DiskDeleteRequest.disk_type:type_name -> imrpc.DiskType
0, // 3: imrpc.DiskReplicaInstanceListRequest.disk_type:type_name -> imrpc.DiskType
10, // 4: imrpc.DiskReplicaInstanceListResponse.replica_instances:type_name -> imrpc.DiskReplicaInstanceListResponse.ReplicaInstancesEntry
11, // 4: imrpc.DiskReplicaInstanceListResponse.replica_instances:type_name -> imrpc.DiskReplicaInstanceListResponse.ReplicaInstancesEntry
0, // 5: imrpc.DiskReplicaInstanceDeleteRequest.disk_type:type_name -> imrpc.DiskType
2, // 6: imrpc.DiskReplicaInstanceListResponse.ReplicaInstancesEntry.value:type_name -> imrpc.ReplicaInstance
3, // 7: imrpc.DiskService.DiskCreate:input_type -> imrpc.DiskCreateRequest
5, // 8: imrpc.DiskService.DiskDelete:input_type -> imrpc.DiskDeleteRequest
4, // 9: imrpc.DiskService.DiskGet:input_type -> imrpc.DiskGetRequest
6, // 10: imrpc.DiskService.DiskReplicaInstanceList:input_type -> imrpc.DiskReplicaInstanceListRequest
8, // 11: imrpc.DiskService.DiskReplicaInstanceDelete:input_type -> imrpc.DiskReplicaInstanceDeleteRequest
11, // 12: imrpc.DiskService.VersionGet:input_type -> google.protobuf.Empty
1, // 13: imrpc.DiskService.DiskCreate:output_type -> imrpc.Disk
11, // 14: imrpc.DiskService.DiskDelete:output_type -> google.protobuf.Empty
1, // 15: imrpc.DiskService.DiskGet:output_type -> imrpc.Disk
7, // 16: imrpc.DiskService.DiskReplicaInstanceList:output_type -> imrpc.DiskReplicaInstanceListResponse
11, // 17: imrpc.DiskService.DiskReplicaInstanceDelete:output_type -> google.protobuf.Empty
9, // 18: imrpc.DiskService.VersionGet:output_type -> imrpc.DiskVersionResponse
13, // [13:19] is the sub-list for method output_type
7, // [7:13] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
12, // 6: imrpc.DiskMetricsGetReply.metrics:type_name -> ptypes.Metrics
2, // 7: imrpc.DiskReplicaInstanceListResponse.ReplicaInstancesEntry.value:type_name -> imrpc.ReplicaInstance
3, // 8: imrpc.DiskService.DiskCreate:input_type -> imrpc.DiskCreateRequest
5, // 9: imrpc.DiskService.DiskDelete:input_type -> imrpc.DiskDeleteRequest
4, // 10: imrpc.DiskService.DiskGet:input_type -> imrpc.DiskGetRequest
6, // 11: imrpc.DiskService.DiskReplicaInstanceList:input_type -> imrpc.DiskReplicaInstanceListRequest
8, // 12: imrpc.DiskService.DiskReplicaInstanceDelete:input_type -> imrpc.DiskReplicaInstanceDeleteRequest
4, // 13: imrpc.DiskService.MetricsGet:input_type -> imrpc.DiskGetRequest
13, // 14: imrpc.DiskService.VersionGet:input_type -> google.protobuf.Empty
1, // 15: imrpc.DiskService.DiskCreate:output_type -> imrpc.Disk
13, // 16: imrpc.DiskService.DiskDelete:output_type -> google.protobuf.Empty
1, // 17: imrpc.DiskService.DiskGet:output_type -> imrpc.Disk
7, // 18: imrpc.DiskService.DiskReplicaInstanceList:output_type -> imrpc.DiskReplicaInstanceListResponse
13, // 19: imrpc.DiskService.DiskReplicaInstanceDelete:output_type -> google.protobuf.Empty
10, // 20: imrpc.DiskService.MetricsGet:output_type -> imrpc.DiskMetricsGetReply
9, // 21: imrpc.DiskService.VersionGet:output_type -> imrpc.DiskVersionResponse
15, // [15:22] is the sub-list for method output_type
8, // [8:15] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension extendee
0, // [0:8] is the sub-list for field type_name
}
func init() { file_imrpc_disk_proto_init() }
@ -1128,6 +1191,18 @@ func file_imrpc_disk_proto_init() {
return nil
}
}
file_imrpc_disk_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DiskMetricsGetReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -1135,7 +1210,7 @@ func file_imrpc_disk_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_imrpc_disk_proto_rawDesc,
NumEnums: 1,
NumMessages: 10,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -25,6 +25,7 @@ const (
DiskService_DiskGet_FullMethodName = "/imrpc.DiskService/DiskGet"
DiskService_DiskReplicaInstanceList_FullMethodName = "/imrpc.DiskService/DiskReplicaInstanceList"
DiskService_DiskReplicaInstanceDelete_FullMethodName = "/imrpc.DiskService/DiskReplicaInstanceDelete"
DiskService_MetricsGet_FullMethodName = "/imrpc.DiskService/MetricsGet"
DiskService_VersionGet_FullMethodName = "/imrpc.DiskService/VersionGet"
)
@ -37,6 +38,7 @@ type DiskServiceClient interface {
DiskGet(ctx context.Context, in *DiskGetRequest, opts ...grpc.CallOption) (*Disk, error)
DiskReplicaInstanceList(ctx context.Context, in *DiskReplicaInstanceListRequest, opts ...grpc.CallOption) (*DiskReplicaInstanceListResponse, error)
DiskReplicaInstanceDelete(ctx context.Context, in *DiskReplicaInstanceDeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
MetricsGet(ctx context.Context, in *DiskGetRequest, opts ...grpc.CallOption) (*DiskMetricsGetReply, error)
VersionGet(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DiskVersionResponse, error)
}
@ -93,6 +95,15 @@ func (c *diskServiceClient) DiskReplicaInstanceDelete(ctx context.Context, in *D
return out, nil
}
func (c *diskServiceClient) MetricsGet(ctx context.Context, in *DiskGetRequest, opts ...grpc.CallOption) (*DiskMetricsGetReply, error) {
out := new(DiskMetricsGetReply)
err := c.cc.Invoke(ctx, DiskService_MetricsGet_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *diskServiceClient) VersionGet(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DiskVersionResponse, error) {
out := new(DiskVersionResponse)
err := c.cc.Invoke(ctx, DiskService_VersionGet_FullMethodName, in, out, opts...)
@ -111,6 +122,7 @@ type DiskServiceServer interface {
DiskGet(context.Context, *DiskGetRequest) (*Disk, error)
DiskReplicaInstanceList(context.Context, *DiskReplicaInstanceListRequest) (*DiskReplicaInstanceListResponse, error)
DiskReplicaInstanceDelete(context.Context, *DiskReplicaInstanceDeleteRequest) (*emptypb.Empty, error)
MetricsGet(context.Context, *DiskGetRequest) (*DiskMetricsGetReply, error)
VersionGet(context.Context, *emptypb.Empty) (*DiskVersionResponse, error)
mustEmbedUnimplementedDiskServiceServer()
}
@ -134,6 +146,9 @@ func (UnimplementedDiskServiceServer) DiskReplicaInstanceList(context.Context, *
func (UnimplementedDiskServiceServer) DiskReplicaInstanceDelete(context.Context, *DiskReplicaInstanceDeleteRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DiskReplicaInstanceDelete not implemented")
}
func (UnimplementedDiskServiceServer) MetricsGet(context.Context, *DiskGetRequest) (*DiskMetricsGetReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method MetricsGet not implemented")
}
func (UnimplementedDiskServiceServer) VersionGet(context.Context, *emptypb.Empty) (*DiskVersionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method VersionGet not implemented")
}
@ -240,6 +255,24 @@ func _DiskService_DiskReplicaInstanceDelete_Handler(srv interface{}, ctx context
return interceptor(ctx, in, info, handler)
}
func _DiskService_MetricsGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DiskGetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiskServiceServer).MetricsGet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DiskService_MetricsGet_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiskServiceServer).MetricsGet(ctx, req.(*DiskGetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DiskService_VersionGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
@ -285,6 +318,10 @@ var DiskService_ServiceDesc = grpc.ServiceDesc{
MethodName: "DiskReplicaInstanceDelete",
Handler: _DiskService_DiskReplicaInstanceDelete_Handler,
},
{
MethodName: "MetricsGet",
Handler: _DiskService_MetricsGet_Handler,
},
{
MethodName: "VersionGet",
Handler: _DiskService_VersionGet_Handler,

View File

@ -110,6 +110,7 @@ type ProcessStatus struct {
PortStart int32 `protobuf:"varint,3,opt,name=port_start,json=portStart,proto3" json:"port_start,omitempty"`
PortEnd int32 `protobuf:"varint,4,opt,name=port_end,json=portEnd,proto3" json:"port_end,omitempty"`
Conditions map[string]bool `protobuf:"bytes,5,rep,name=conditions,proto3" json:"conditions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
Uuid string `protobuf:"bytes,6,opt,name=uuid,proto3" json:"uuid,omitempty"`
}
func (x *ProcessStatus) Reset() {
@ -179,6 +180,13 @@ func (x *ProcessStatus) GetConditions() map[string]bool {
return nil
}
func (x *ProcessStatus) GetUuid() string {
if x != nil {
return x.Uuid
}
return ""
}
type ProcessCreateRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -232,6 +240,7 @@ type ProcessDeleteRequest struct {
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"`
}
func (x *ProcessDeleteRequest) Reset() {
@ -273,6 +282,13 @@ func (x *ProcessDeleteRequest) GetName() string {
return ""
}
func (x *ProcessDeleteRequest) GetUuid() string {
if x != nil {
return x.Uuid
}
return ""
}
type ProcessGetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -726,7 +742,7 @@ var file_imrpc_imrpc_proto_rawDesc = []byte{
0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04,
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x72, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03,
0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x72, 0x67, 0x73, 0x22, 0xfb, 0x01, 0x0a,
0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x72, 0x67, 0x73, 0x22, 0x8f, 0x02, 0x0a,
0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14,
0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73,
0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73,
@ -738,108 +754,111 @@ var file_imrpc_imrpc_proto_rawDesc = []byte{
0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1e, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x43,
0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x38, 0x0a, 0x14, 0x50, 0x72,
0x6f, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x20, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0c, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04,
0x73, 0x70, 0x65, 0x63, 0x22, 0x2a, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0x27, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x75, 0x0a, 0x0f, 0x50, 0x72, 0x6f,
0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x04,
0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x6f,
0x63, 0x65, 0x73, 0x73, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x26,
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e,
0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06,
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64,
0x22, 0x14, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa8, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x63, 0x65,
0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41,
0x0a, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x23, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65,
0x73, 0x1a, 0x4e, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x22, 0x20, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x22, 0x64, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65,
0x70, 0x6c, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x04,
0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x6f,
0x63, 0x65, 0x73, 0x73, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x29,
0x0a, 0x10, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e,
0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e,
0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x22, 0x21, 0x0a, 0x0b, 0x4c, 0x6f, 0x67,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xff, 0x02, 0x0a,
0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x69,
0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67,
0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x75, 0x69, 0x6c,
0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69,
0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x19, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x69, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x1c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x41, 0x50, 0x49, 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1c, 0x69, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x41, 0x50, 0x49, 0x4d, 0x69,
0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x1e, 0x69, 0x6e, 0x73, 0x74,
0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75,
0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x1a,
0x3d, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x38,
0x0a, 0x14, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x70,
0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x3e, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x63,
0x65, 0x73, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x63,
0x65, 0x73, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x22, 0x75, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x70, 0x65, 0x63,
0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18,
0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x63,
0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa8,
0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73,
0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x50, 0x72, 0x6f, 0x63,
0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,
0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09,
0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x1a, 0x4e, 0x0a, 0x0e, 0x50, 0x72, 0x6f,
0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x50,
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x20, 0x0a, 0x0a, 0x4c, 0x6f, 0x67,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x64, 0x0a, 0x15, 0x50,
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x70, 0x65, 0x63,
0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e,
0x61, 0x74, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61,
0x6c, 0x22, 0x21, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6c, 0x69, 0x6e, 0x65, 0x22, 0xff, 0x02, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x12, 0x1c, 0x0a, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x3c,
0x0a, 0x19, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
0x72, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28,
0x03, 0x52, 0x19, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67,
0x65, 0x72, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x1c,
0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x41,
0x50, 0x49, 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01,
0x28, 0x03, 0x52, 0x1c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61,
0x67, 0x65, 0x72, 0x41, 0x50, 0x49, 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x46, 0x0a, 0x1e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61,
0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x50,
0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x21, 0x69, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79,
0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03,
0x52, 0x1e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x4c, 0x0a, 0x21, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61,
0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x50, 0x49, 0x4d, 0x69, 0x6e, 0x56, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x21, 0x69, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78,
0x79, 0x41, 0x50, 0x49, 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xe2,
0x03, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63,
0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x50, 0x72, 0x6f, 0x63,
0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x10, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x50,
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x34, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x47, 0x65, 0x74, 0x12, 0x12,
0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x10, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73,
0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x13, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c,
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x50, 0x72, 0x6f,
0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x12, 0x2b, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67,
0x12, 0x0b, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e,
0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12,
0x3c, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12,
0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x10, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3c, 0x0a,
0x0e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12,
0x16, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x0a, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
0x79, 0x1a, 0x10, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73,
0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x69,
0x6d, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x41, 0x50, 0x49, 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20,
0x01, 0x28, 0x03, 0x52, 0x21, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x6e,
0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x50, 0x49, 0x4d, 0x69, 0x6e, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xe2, 0x03, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x63, 0x65,
0x73, 0x73, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x12, 0x3a, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x12, 0x15, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65,
0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0d,
0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x15, 0x2e,
0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x63,
0x65, 0x73, 0x73, 0x47, 0x65, 0x74, 0x12, 0x12, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,
0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x50, 0x72, 0x6f,
0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a,
0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x13, 0x2e,
0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x14, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2b, 0x0a, 0x0a, 0x50, 0x72,
0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x0b, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3c, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x63, 0x65,
0x73, 0x73, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a,
0x10, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3c, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,
0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x16, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73,
0x73, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x10, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x47, 0x65,
0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x10, 0x2e, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2f, 0x5a, 0x2d, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f,
0x72, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -333,6 +333,7 @@ type InstanceStatus struct {
StandbyTargetPortStart int32 `protobuf:"varint,8,opt,name=standby_target_port_start,json=standbyTargetPortStart,proto3" json:"standby_target_port_start,omitempty"`
StandbyTargetPortEnd int32 `protobuf:"varint,9,opt,name=standby_target_port_end,json=standbyTargetPortEnd,proto3" json:"standby_target_port_end,omitempty"`
UblkId int32 `protobuf:"varint,10,opt,name=ublk_id,json=ublkId,proto3" json:"ublk_id,omitempty"`
Uuid string `protobuf:"bytes,11,opt,name=uuid,proto3" json:"uuid,omitempty"`
}
func (x *InstanceStatus) Reset() {
@ -437,6 +438,13 @@ func (x *InstanceStatus) GetUblkId() int32 {
return 0
}
func (x *InstanceStatus) GetUuid() string {
if x != nil {
return x.Uuid
}
return ""
}
type InstanceCreateRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -498,6 +506,7 @@ type InstanceDeleteRequest struct {
DiskUuid string `protobuf:"bytes,4,opt,name=disk_uuid,json=diskUuid,proto3" json:"disk_uuid,omitempty"`
CleanupRequired bool `protobuf:"varint,5,opt,name=cleanup_required,json=cleanupRequired,proto3" json:"cleanup_required,omitempty"`
DataEngine DataEngine `protobuf:"varint,6,opt,name=data_engine,json=dataEngine,proto3,enum=imrpc.DataEngine" json:"data_engine,omitempty"`
Uuid string `protobuf:"bytes,7,opt,name=uuid,proto3" json:"uuid,omitempty"`
}
func (x *InstanceDeleteRequest) Reset() {
@ -575,6 +584,13 @@ func (x *InstanceDeleteRequest) GetDataEngine() DataEngine {
return DataEngine_DATA_ENGINE_V1
}
func (x *InstanceDeleteRequest) GetUuid() string {
if x != nil {
return x.Uuid
}
return ""
}
type InstanceGetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -1522,7 +1538,7 @@ var file_imrpc_instance_proto_rawDesc = []byte{
0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72,
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65,
0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xe2,
0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xf6,
0x03, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75,
0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72,
@ -1549,220 +1565,222 @@ var file_imrpc_instance_proto_rawDesc = []byte{
0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x62, 0x79, 0x54, 0x61,
0x72, 0x67, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75,
0x62, 0x6c, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x62,
0x6c, 0x6b, 0x49, 0x64, 0x1a, 0x3d, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x02, 0x38, 0x01, 0x22, 0x40, 0x0a, 0x15, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x04,
0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x69, 0x6d, 0x72,
0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52,
0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x8c, 0x02, 0x0a, 0x15, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x4f, 0x0a, 0x14, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65,
0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e,
0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x6f,
0x72, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x62, 0x61,
0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b,
0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73,
0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70,
0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52,
0x0f, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18,
0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61,
0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e,
0x67, 0x69, 0x6e, 0x65, 0x22, 0xc1, 0x01, 0x0a, 0x12, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x14, 0x62,
0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x72, 0x69,
0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x69, 0x6d, 0x72, 0x70,
0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x72,
0x69, 0x76, 0x65, 0x72, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e,
0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x74, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67,
0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70,
0x6c, 0x6b, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x1a, 0x3d, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x64,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x40, 0x0a, 0x15, 0x49, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x27, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13,
0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53,
0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xa0, 0x02, 0x0a, 0x15, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x14, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x73,
0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x19, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e,
0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x02, 0x18, 0x01,
0x52, 0x12, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x72,
0x69, 0x76, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09,
0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x64, 0x69, 0x73, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6c, 0x65,
0x61, 0x6e, 0x75, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20,
0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75,
0x69, 0x72, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67,
0x69, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70,
0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61,
0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x10, 0x49, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a,
0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x69, 0x6d,
0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63,
0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49,
0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22,
0xb7, 0x01, 0x0a, 0x14, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x69, 0x6d,
0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x73, 0x1a, 0x55, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc1, 0x01, 0x0a, 0x12, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x4f, 0x0a, 0x14, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x6f, 0x72,
0x65, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19,
0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, 0x74,
0x6f, 0x72, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x62,
0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65,
0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74,
0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11,
0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e,
0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x6c, 0x0a,
0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63,
0x12, 0x29, 0x0a, 0x10, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x69,
0x67, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x65, 0x72, 0x6d,
0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x22, 0x74, 0x0a, 0x16, 0x49,
0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e,
0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72,
0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64,
0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0x73, 0x0a, 0x15, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73,
0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61,
0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69,
0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x1f, 0x49, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x63, 0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4f, 0x76, 0x65, 0x72, 0x54, 0x61, 0x72,
0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61,
0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69,
0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x79, 0x0a,
0x1b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54,
0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x0b,
0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64,
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xc1, 0x01, 0x0a,
0x12, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x14, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x73,
0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x19, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e,
0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x02, 0x18, 0x01,
0x52, 0x12, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x72,
0x69, 0x76, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x0b,
0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e,
0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x5e, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x53,
0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32,
0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61,
0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69,
0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x5e, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x53,
0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32,
0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61,
0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69,
0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x48, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x47,
0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32,
0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61,
0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69,
0x6e, 0x65, 0x22, 0x2b, 0x0a, 0x13, 0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65,
0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76,
0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22,
0x48, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e,
0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72,
0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64,
0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x2b, 0x0a, 0x13, 0x4c, 0x6f, 0x67,
0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x32, 0x93, 0x09, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x69,
0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x6d, 0x72,
0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e,
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x43, 0x0a, 0x0b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x47, 0x65, 0x74, 0x12,
0x19, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x6d, 0x72,
0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e,
0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69,
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b,
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x12, 0x19, 0x2e, 0x69, 0x6d,
0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x0d, 0x49, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x63, 0x65, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x22, 0x84, 0x01, 0x0a, 0x10, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x2d,
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15,
0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a,
0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0xb7, 0x01, 0x0a, 0x14, 0x49, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x55, 0x0a, 0x0e, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x22, 0xc1, 0x01, 0x0a, 0x12, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x6f,
0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x14, 0x62, 0x61, 0x63, 0x6b,
0x65, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x42,
0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65,
0x72, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, 0x74,
0x6f, 0x72, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44,
0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x45,
0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x6c, 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x27, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e,
0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70,
0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x65, 0x72, 0x6d,
0x69, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67,
0x6e, 0x61, 0x6c, 0x22, 0x74, 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53,
0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a,
0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45,
0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x73, 0x0a, 0x15, 0x49, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e,
0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61,
0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79,
0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa4,
0x01, 0x0a, 0x1f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x77, 0x69, 0x74, 0x63,
0x68, 0x4f, 0x76, 0x65, 0x72, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e,
0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61,
0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79,
0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x25,
0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x64,
0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x79, 0x0a, 0x1b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67,
0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70,
0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61,
0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x22, 0x5e, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65,
0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a,
0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65,
0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c,
0x22, 0x5e, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65,
0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a,
0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c,
0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73,
0x22, 0x48, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65,
0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a,
0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x2b, 0x0a, 0x13, 0x4c, 0x6f,
0x67, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x48, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x47, 0x65,
0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a,
0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x11, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45,
0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x67, 0x69, 0x6e,
0x65, 0x22, 0x2b, 0x0a, 0x13, 0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67,
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x32, 0x93,
0x09, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a,
0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,
0x1c, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0b, 0x49, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x63, 0x65, 0x47, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e,
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a,
0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x4c, 0x6f, 0x67, 0x12, 0x19, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c,
0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01,
0x12, 0x43, 0x0a, 0x0d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x61, 0x74, 0x63,
0x68, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x30, 0x01, 0x12, 0x4b, 0x0a,
0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65,
0x12, 0x1d, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x17, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0f, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x1d, 0x2e,
0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x75,
0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63,
0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00,
0x12, 0x5c, 0x0a, 0x18, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x77, 0x69, 0x74,
0x63, 0x68, 0x4f, 0x76, 0x65, 0x72, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x69,
0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x77, 0x69,
0x74, 0x63, 0x68, 0x4f, 0x76, 0x65, 0x72, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71,
0x79, 0x22, 0x00, 0x30, 0x01, 0x12, 0x4b, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63,
0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e,
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x75,
0x73, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x1d, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x54,
0x0a, 0x14, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49,
0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72,
0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x74, 0x4c, 0x65,
0x76, 0x65, 0x6c, 0x12, 0x19, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x53,
0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x48,
0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65,
0x12, 0x1c, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
0x65, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x74,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x18, 0x49, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x63, 0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4f, 0x76, 0x65, 0x72, 0x54, 0x61,
0x72, 0x67, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4f, 0x76, 0x65, 0x72, 0x54,
0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x14, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x22,
0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0b,
0x4c, 0x6f, 0x67, 0x53, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x2e, 0x69, 0x6d,
0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x40,
0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x19, 0x2e,
0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x12, 0x44, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12,
0x19, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74, 0x4c, 0x65,
0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x69, 0x6d, 0x72,
0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74,
0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f,
0x67, 0x53, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x47,
0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e,
0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x47, 0x65,
0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44,
0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x19, 0x2e,
0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63,
0x2e, 0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x47,
0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x10, 0x2e, 0x56, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2f, 0x5a, 0x2d,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x68,
0x6f, 0x72, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x67, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1a, 0x2e, 0x69, 0x6d, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x47, 0x65, 0x74, 0x46,
0x6c, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0a,
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x1a, 0x10, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65,
0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f,
0x69, 0x6d, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

File diff suppressed because it is too large Load Diff

View File

@ -47,6 +47,7 @@ const (
ProxyEngineService_ReplicaAdd_FullMethodName = "/imrpc.ProxyEngineService/ReplicaAdd"
ProxyEngineService_ReplicaList_FullMethodName = "/imrpc.ProxyEngineService/ReplicaList"
ProxyEngineService_ReplicaRebuildingStatus_FullMethodName = "/imrpc.ProxyEngineService/ReplicaRebuildingStatus"
ProxyEngineService_ReplicaRebuildingQosSet_FullMethodName = "/imrpc.ProxyEngineService/ReplicaRebuildingQosSet"
ProxyEngineService_ReplicaVerifyRebuild_FullMethodName = "/imrpc.ProxyEngineService/ReplicaVerifyRebuild"
ProxyEngineService_ReplicaRemove_FullMethodName = "/imrpc.ProxyEngineService/ReplicaRemove"
ProxyEngineService_ReplicaModeUpdate_FullMethodName = "/imrpc.ProxyEngineService/ReplicaModeUpdate"
@ -90,6 +91,7 @@ type ProxyEngineServiceClient interface {
ReplicaAdd(ctx context.Context, in *EngineReplicaAddRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ReplicaList(ctx context.Context, in *ProxyEngineRequest, opts ...grpc.CallOption) (*EngineReplicaListProxyResponse, error)
ReplicaRebuildingStatus(ctx context.Context, in *ProxyEngineRequest, opts ...grpc.CallOption) (*EngineReplicaRebuildStatusProxyResponse, error)
ReplicaRebuildingQosSet(ctx context.Context, in *EngineReplicaRebuildingQosSetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ReplicaVerifyRebuild(ctx context.Context, in *EngineReplicaVerifyRebuildRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ReplicaRemove(ctx context.Context, in *EngineReplicaRemoveRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ReplicaModeUpdate(ctx context.Context, in *EngineReplicaModeUpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
@ -353,6 +355,15 @@ func (c *proxyEngineServiceClient) ReplicaRebuildingStatus(ctx context.Context,
return out, nil
}
func (c *proxyEngineServiceClient) ReplicaRebuildingQosSet(ctx context.Context, in *EngineReplicaRebuildingQosSetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, ProxyEngineService_ReplicaRebuildingQosSet_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *proxyEngineServiceClient) ReplicaVerifyRebuild(ctx context.Context, in *EngineReplicaVerifyRebuildRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, ProxyEngineService_ReplicaVerifyRebuild_FullMethodName, in, out, opts...)
@ -497,6 +508,7 @@ type ProxyEngineServiceServer interface {
ReplicaAdd(context.Context, *EngineReplicaAddRequest) (*emptypb.Empty, error)
ReplicaList(context.Context, *ProxyEngineRequest) (*EngineReplicaListProxyResponse, error)
ReplicaRebuildingStatus(context.Context, *ProxyEngineRequest) (*EngineReplicaRebuildStatusProxyResponse, error)
ReplicaRebuildingQosSet(context.Context, *EngineReplicaRebuildingQosSetRequest) (*emptypb.Empty, error)
ReplicaVerifyRebuild(context.Context, *EngineReplicaVerifyRebuildRequest) (*emptypb.Empty, error)
ReplicaRemove(context.Context, *EngineReplicaRemoveRequest) (*emptypb.Empty, error)
ReplicaModeUpdate(context.Context, *EngineReplicaModeUpdateRequest) (*emptypb.Empty, error)
@ -595,6 +607,9 @@ func (UnimplementedProxyEngineServiceServer) ReplicaList(context.Context, *Proxy
func (UnimplementedProxyEngineServiceServer) ReplicaRebuildingStatus(context.Context, *ProxyEngineRequest) (*EngineReplicaRebuildStatusProxyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicaRebuildingStatus not implemented")
}
func (UnimplementedProxyEngineServiceServer) ReplicaRebuildingQosSet(context.Context, *EngineReplicaRebuildingQosSetRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicaRebuildingQosSet not implemented")
}
func (UnimplementedProxyEngineServiceServer) ReplicaVerifyRebuild(context.Context, *EngineReplicaVerifyRebuildRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicaVerifyRebuild not implemented")
}
@ -1124,6 +1139,24 @@ func _ProxyEngineService_ReplicaRebuildingStatus_Handler(srv interface{}, ctx co
return interceptor(ctx, in, info, handler)
}
func _ProxyEngineService_ReplicaRebuildingQosSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EngineReplicaRebuildingQosSetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProxyEngineServiceServer).ReplicaRebuildingQosSet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ProxyEngineService_ReplicaRebuildingQosSet_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProxyEngineServiceServer).ReplicaRebuildingQosSet(ctx, req.(*EngineReplicaRebuildingQosSetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ProxyEngineService_ReplicaVerifyRebuild_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EngineReplicaVerifyRebuildRequest)
if err := dec(in); err != nil {
@ -1422,6 +1455,10 @@ var ProxyEngineService_ServiceDesc = grpc.ServiceDesc{
MethodName: "ReplicaRebuildingStatus",
Handler: _ProxyEngineService_ReplicaRebuildingStatus_Handler,
},
{
MethodName: "ReplicaRebuildingQosSet",
Handler: _ProxyEngineService_ReplicaRebuildingQosSet_Handler,
},
{
MethodName: "ReplicaVerifyRebuild",
Handler: _ProxyEngineService_ReplicaVerifyRebuild_Handler,

File diff suppressed because it is too large Load Diff

View File

@ -20,73 +20,76 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
SPDKService_ReplicaCreate_FullMethodName = "/spdkrpc.SPDKService/ReplicaCreate"
SPDKService_ReplicaDelete_FullMethodName = "/spdkrpc.SPDKService/ReplicaDelete"
SPDKService_ReplicaGet_FullMethodName = "/spdkrpc.SPDKService/ReplicaGet"
SPDKService_ReplicaSnapshotCreate_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotCreate"
SPDKService_ReplicaSnapshotDelete_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotDelete"
SPDKService_ReplicaSnapshotRevert_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotRevert"
SPDKService_ReplicaSnapshotPurge_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotPurge"
SPDKService_ReplicaSnapshotHash_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotHash"
SPDKService_ReplicaSnapshotHashStatus_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotHashStatus"
SPDKService_ReplicaSnapshotHashCancel_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotHashCancel"
SPDKService_ReplicaSnapshotHashLockState_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotHashLockState"
SPDKService_ReplicaList_FullMethodName = "/spdkrpc.SPDKService/ReplicaList"
SPDKService_ReplicaWatch_FullMethodName = "/spdkrpc.SPDKService/ReplicaWatch"
SPDKService_ReplicaRebuildingSrcStart_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingSrcStart"
SPDKService_ReplicaRebuildingSrcFinish_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingSrcFinish"
SPDKService_ReplicaRebuildingSrcShallowCopyStart_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingSrcShallowCopyStart"
SPDKService_ReplicaRebuildingSrcShallowCopyCheck_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingSrcShallowCopyCheck"
SPDKService_ReplicaRebuildingDstStart_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingDstStart"
SPDKService_ReplicaRebuildingDstFinish_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingDstFinish"
SPDKService_ReplicaRebuildingDstShallowCopyStart_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingDstShallowCopyStart"
SPDKService_ReplicaRebuildingDstShallowCopyCheck_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingDstShallowCopyCheck"
SPDKService_ReplicaRebuildingDstSnapshotCreate_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingDstSnapshotCreate"
SPDKService_ReplicaBackupCreate_FullMethodName = "/spdkrpc.SPDKService/ReplicaBackupCreate"
SPDKService_ReplicaBackupStatus_FullMethodName = "/spdkrpc.SPDKService/ReplicaBackupStatus"
SPDKService_ReplicaBackupRestore_FullMethodName = "/spdkrpc.SPDKService/ReplicaBackupRestore"
SPDKService_ReplicaRestoreStatus_FullMethodName = "/spdkrpc.SPDKService/ReplicaRestoreStatus"
SPDKService_EngineCreate_FullMethodName = "/spdkrpc.SPDKService/EngineCreate"
SPDKService_EngineDelete_FullMethodName = "/spdkrpc.SPDKService/EngineDelete"
SPDKService_EngineGet_FullMethodName = "/spdkrpc.SPDKService/EngineGet"
SPDKService_EngineSuspend_FullMethodName = "/spdkrpc.SPDKService/EngineSuspend"
SPDKService_EngineResume_FullMethodName = "/spdkrpc.SPDKService/EngineResume"
SPDKService_EngineSwitchOverTarget_FullMethodName = "/spdkrpc.SPDKService/EngineSwitchOverTarget"
SPDKService_EngineDeleteTarget_FullMethodName = "/spdkrpc.SPDKService/EngineDeleteTarget"
SPDKService_EngineSnapshotCreate_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotCreate"
SPDKService_EngineSnapshotDelete_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotDelete"
SPDKService_EngineSnapshotRevert_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotRevert"
SPDKService_EngineSnapshotPurge_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotPurge"
SPDKService_EngineSnapshotHash_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotHash"
SPDKService_EngineSnapshotHashStatus_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotHashStatus"
SPDKService_EngineSnapshotHashCancel_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotHashCancel"
SPDKService_EngineSnapshotHashLockState_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotHashLockState"
SPDKService_EngineList_FullMethodName = "/spdkrpc.SPDKService/EngineList"
SPDKService_EngineWatch_FullMethodName = "/spdkrpc.SPDKService/EngineWatch"
SPDKService_EngineReplicaList_FullMethodName = "/spdkrpc.SPDKService/EngineReplicaList"
SPDKService_EngineReplicaAdd_FullMethodName = "/spdkrpc.SPDKService/EngineReplicaAdd"
SPDKService_EngineReplicaDelete_FullMethodName = "/spdkrpc.SPDKService/EngineReplicaDelete"
SPDKService_EngineBackupCreate_FullMethodName = "/spdkrpc.SPDKService/EngineBackupCreate"
SPDKService_EngineBackupStatus_FullMethodName = "/spdkrpc.SPDKService/EngineBackupStatus"
SPDKService_EngineBackupRestore_FullMethodName = "/spdkrpc.SPDKService/EngineBackupRestore"
SPDKService_EngineBackupRestoreFinish_FullMethodName = "/spdkrpc.SPDKService/EngineBackupRestoreFinish"
SPDKService_EngineRestoreStatus_FullMethodName = "/spdkrpc.SPDKService/EngineRestoreStatus"
SPDKService_BackingImageCreate_FullMethodName = "/spdkrpc.SPDKService/BackingImageCreate"
SPDKService_BackingImageDelete_FullMethodName = "/spdkrpc.SPDKService/BackingImageDelete"
SPDKService_BackingImageGet_FullMethodName = "/spdkrpc.SPDKService/BackingImageGet"
SPDKService_BackingImageList_FullMethodName = "/spdkrpc.SPDKService/BackingImageList"
SPDKService_BackingImageWatch_FullMethodName = "/spdkrpc.SPDKService/BackingImageWatch"
SPDKService_BackingImageExpose_FullMethodName = "/spdkrpc.SPDKService/BackingImageExpose"
SPDKService_BackingImageUnexpose_FullMethodName = "/spdkrpc.SPDKService/BackingImageUnexpose"
SPDKService_DiskCreate_FullMethodName = "/spdkrpc.SPDKService/DiskCreate"
SPDKService_DiskDelete_FullMethodName = "/spdkrpc.SPDKService/DiskDelete"
SPDKService_DiskGet_FullMethodName = "/spdkrpc.SPDKService/DiskGet"
SPDKService_LogSetLevel_FullMethodName = "/spdkrpc.SPDKService/LogSetLevel"
SPDKService_LogSetFlags_FullMethodName = "/spdkrpc.SPDKService/LogSetFlags"
SPDKService_LogGetLevel_FullMethodName = "/spdkrpc.SPDKService/LogGetLevel"
SPDKService_LogGetFlags_FullMethodName = "/spdkrpc.SPDKService/LogGetFlags"
SPDKService_VersionDetailGet_FullMethodName = "/spdkrpc.SPDKService/VersionDetailGet"
SPDKService_MetricsGet_FullMethodName = "/spdkrpc.SPDKService/MetricsGet"
SPDKService_ReplicaCreate_FullMethodName = "/spdkrpc.SPDKService/ReplicaCreate"
SPDKService_ReplicaDelete_FullMethodName = "/spdkrpc.SPDKService/ReplicaDelete"
SPDKService_ReplicaGet_FullMethodName = "/spdkrpc.SPDKService/ReplicaGet"
SPDKService_ReplicaSnapshotCreate_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotCreate"
SPDKService_ReplicaSnapshotDelete_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotDelete"
SPDKService_ReplicaSnapshotRevert_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotRevert"
SPDKService_ReplicaSnapshotPurge_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotPurge"
SPDKService_ReplicaSnapshotHash_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotHash"
SPDKService_ReplicaSnapshotHashStatus_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotHashStatus"
SPDKService_ReplicaSnapshotHashCancel_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotHashCancel"
SPDKService_ReplicaSnapshotHashLockState_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotHashLockState"
SPDKService_ReplicaSnapshotRangeHashGet_FullMethodName = "/spdkrpc.SPDKService/ReplicaSnapshotRangeHashGet"
SPDKService_ReplicaList_FullMethodName = "/spdkrpc.SPDKService/ReplicaList"
SPDKService_ReplicaWatch_FullMethodName = "/spdkrpc.SPDKService/ReplicaWatch"
SPDKService_ReplicaRebuildingSrcStart_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingSrcStart"
SPDKService_ReplicaRebuildingSrcFinish_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingSrcFinish"
SPDKService_ReplicaRebuildingSrcShallowCopyStart_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingSrcShallowCopyStart"
SPDKService_ReplicaRebuildingSrcRangeShallowCopyStart_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingSrcRangeShallowCopyStart"
SPDKService_ReplicaRebuildingSrcShallowCopyCheck_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingSrcShallowCopyCheck"
SPDKService_ReplicaRebuildingDstStart_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingDstStart"
SPDKService_ReplicaRebuildingDstFinish_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingDstFinish"
SPDKService_ReplicaRebuildingDstShallowCopyStart_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingDstShallowCopyStart"
SPDKService_ReplicaRebuildingDstShallowCopyCheck_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingDstShallowCopyCheck"
SPDKService_ReplicaRebuildingDstSnapshotCreate_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingDstSnapshotCreate"
SPDKService_ReplicaRebuildingDstSetQosLimit_FullMethodName = "/spdkrpc.SPDKService/ReplicaRebuildingDstSetQosLimit"
SPDKService_ReplicaBackupCreate_FullMethodName = "/spdkrpc.SPDKService/ReplicaBackupCreate"
SPDKService_ReplicaBackupStatus_FullMethodName = "/spdkrpc.SPDKService/ReplicaBackupStatus"
SPDKService_ReplicaBackupRestore_FullMethodName = "/spdkrpc.SPDKService/ReplicaBackupRestore"
SPDKService_ReplicaRestoreStatus_FullMethodName = "/spdkrpc.SPDKService/ReplicaRestoreStatus"
SPDKService_EngineCreate_FullMethodName = "/spdkrpc.SPDKService/EngineCreate"
SPDKService_EngineDelete_FullMethodName = "/spdkrpc.SPDKService/EngineDelete"
SPDKService_EngineGet_FullMethodName = "/spdkrpc.SPDKService/EngineGet"
SPDKService_EngineSuspend_FullMethodName = "/spdkrpc.SPDKService/EngineSuspend"
SPDKService_EngineResume_FullMethodName = "/spdkrpc.SPDKService/EngineResume"
SPDKService_EngineSwitchOverTarget_FullMethodName = "/spdkrpc.SPDKService/EngineSwitchOverTarget"
SPDKService_EngineDeleteTarget_FullMethodName = "/spdkrpc.SPDKService/EngineDeleteTarget"
SPDKService_EngineSnapshotCreate_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotCreate"
SPDKService_EngineSnapshotDelete_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotDelete"
SPDKService_EngineSnapshotRevert_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotRevert"
SPDKService_EngineSnapshotPurge_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotPurge"
SPDKService_EngineSnapshotHash_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotHash"
SPDKService_EngineSnapshotHashStatus_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotHashStatus"
SPDKService_EngineSnapshotHashCancel_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotHashCancel"
SPDKService_EngineSnapshotHashLockState_FullMethodName = "/spdkrpc.SPDKService/EngineSnapshotHashLockState"
SPDKService_EngineList_FullMethodName = "/spdkrpc.SPDKService/EngineList"
SPDKService_EngineWatch_FullMethodName = "/spdkrpc.SPDKService/EngineWatch"
SPDKService_EngineReplicaList_FullMethodName = "/spdkrpc.SPDKService/EngineReplicaList"
SPDKService_EngineReplicaAdd_FullMethodName = "/spdkrpc.SPDKService/EngineReplicaAdd"
SPDKService_EngineReplicaDelete_FullMethodName = "/spdkrpc.SPDKService/EngineReplicaDelete"
SPDKService_EngineBackupCreate_FullMethodName = "/spdkrpc.SPDKService/EngineBackupCreate"
SPDKService_EngineBackupStatus_FullMethodName = "/spdkrpc.SPDKService/EngineBackupStatus"
SPDKService_EngineBackupRestore_FullMethodName = "/spdkrpc.SPDKService/EngineBackupRestore"
SPDKService_EngineBackupRestoreFinish_FullMethodName = "/spdkrpc.SPDKService/EngineBackupRestoreFinish"
SPDKService_EngineRestoreStatus_FullMethodName = "/spdkrpc.SPDKService/EngineRestoreStatus"
SPDKService_BackingImageCreate_FullMethodName = "/spdkrpc.SPDKService/BackingImageCreate"
SPDKService_BackingImageDelete_FullMethodName = "/spdkrpc.SPDKService/BackingImageDelete"
SPDKService_BackingImageGet_FullMethodName = "/spdkrpc.SPDKService/BackingImageGet"
SPDKService_BackingImageList_FullMethodName = "/spdkrpc.SPDKService/BackingImageList"
SPDKService_BackingImageWatch_FullMethodName = "/spdkrpc.SPDKService/BackingImageWatch"
SPDKService_BackingImageExpose_FullMethodName = "/spdkrpc.SPDKService/BackingImageExpose"
SPDKService_BackingImageUnexpose_FullMethodName = "/spdkrpc.SPDKService/BackingImageUnexpose"
SPDKService_DiskCreate_FullMethodName = "/spdkrpc.SPDKService/DiskCreate"
SPDKService_DiskDelete_FullMethodName = "/spdkrpc.SPDKService/DiskDelete"
SPDKService_DiskGet_FullMethodName = "/spdkrpc.SPDKService/DiskGet"
SPDKService_LogSetLevel_FullMethodName = "/spdkrpc.SPDKService/LogSetLevel"
SPDKService_LogSetFlags_FullMethodName = "/spdkrpc.SPDKService/LogSetFlags"
SPDKService_LogGetLevel_FullMethodName = "/spdkrpc.SPDKService/LogGetLevel"
SPDKService_LogGetFlags_FullMethodName = "/spdkrpc.SPDKService/LogGetFlags"
SPDKService_VersionDetailGet_FullMethodName = "/spdkrpc.SPDKService/VersionDetailGet"
SPDKService_MetricsGet_FullMethodName = "/spdkrpc.SPDKService/MetricsGet"
)
// SPDKServiceClient is the client API for SPDKService service.
@ -104,17 +107,20 @@ type SPDKServiceClient interface {
ReplicaSnapshotHashStatus(ctx context.Context, in *SnapshotHashStatusRequest, opts ...grpc.CallOption) (*ReplicaSnapshotHashStatusResponse, error)
ReplicaSnapshotHashCancel(ctx context.Context, in *SnapshotHashCancelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ReplicaSnapshotHashLockState(ctx context.Context, in *SnapshotHashLockStateRequest, opts ...grpc.CallOption) (*SnapshotHashLockStateResponse, error)
ReplicaSnapshotRangeHashGet(ctx context.Context, in *ReplicaSnapshotRangeHashGetRequest, opts ...grpc.CallOption) (*ReplicaSnapshotRangeHashGetResponse, error)
ReplicaList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ReplicaListResponse, error)
ReplicaWatch(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (SPDKService_ReplicaWatchClient, error)
ReplicaRebuildingSrcStart(ctx context.Context, in *ReplicaRebuildingSrcStartRequest, opts ...grpc.CallOption) (*ReplicaRebuildingSrcStartResponse, error)
ReplicaRebuildingSrcFinish(ctx context.Context, in *ReplicaRebuildingSrcFinishRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ReplicaRebuildingSrcShallowCopyStart(ctx context.Context, in *ReplicaRebuildingSrcShallowCopyStartRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ReplicaRebuildingSrcRangeShallowCopyStart(ctx context.Context, in *ReplicaRebuildingSrcRangeShallowCopyStartRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ReplicaRebuildingSrcShallowCopyCheck(ctx context.Context, in *ReplicaRebuildingSrcShallowCopyCheckRequest, opts ...grpc.CallOption) (*ReplicaRebuildingSrcShallowCopyCheckResponse, error)
ReplicaRebuildingDstStart(ctx context.Context, in *ReplicaRebuildingDstStartRequest, opts ...grpc.CallOption) (*ReplicaRebuildingDstStartResponse, error)
ReplicaRebuildingDstFinish(ctx context.Context, in *ReplicaRebuildingDstFinishRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ReplicaRebuildingDstShallowCopyStart(ctx context.Context, in *ReplicaRebuildingDstShallowCopyStartRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ReplicaRebuildingDstShallowCopyCheck(ctx context.Context, in *ReplicaRebuildingDstShallowCopyCheckRequest, opts ...grpc.CallOption) (*ReplicaRebuildingDstShallowCopyCheckResponse, error)
ReplicaRebuildingDstSnapshotCreate(ctx context.Context, in *SnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ReplicaRebuildingDstSetQosLimit(ctx context.Context, in *ReplicaRebuildingDstSetQosLimitRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ReplicaBackupCreate(ctx context.Context, in *BackupCreateRequest, opts ...grpc.CallOption) (*BackupCreateResponse, error)
ReplicaBackupStatus(ctx context.Context, in *BackupStatusRequest, opts ...grpc.CallOption) (*BackupStatusResponse, error)
ReplicaBackupRestore(ctx context.Context, in *ReplicaBackupRestoreRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
@ -269,6 +275,15 @@ func (c *sPDKServiceClient) ReplicaSnapshotHashLockState(ctx context.Context, in
return out, nil
}
func (c *sPDKServiceClient) ReplicaSnapshotRangeHashGet(ctx context.Context, in *ReplicaSnapshotRangeHashGetRequest, opts ...grpc.CallOption) (*ReplicaSnapshotRangeHashGetResponse, error) {
out := new(ReplicaSnapshotRangeHashGetResponse)
err := c.cc.Invoke(ctx, SPDKService_ReplicaSnapshotRangeHashGet_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sPDKServiceClient) ReplicaList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ReplicaListResponse, error) {
out := new(ReplicaListResponse)
err := c.cc.Invoke(ctx, SPDKService_ReplicaList_FullMethodName, in, out, opts...)
@ -337,6 +352,15 @@ func (c *sPDKServiceClient) ReplicaRebuildingSrcShallowCopyStart(ctx context.Con
return out, nil
}
func (c *sPDKServiceClient) ReplicaRebuildingSrcRangeShallowCopyStart(ctx context.Context, in *ReplicaRebuildingSrcRangeShallowCopyStartRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, SPDKService_ReplicaRebuildingSrcRangeShallowCopyStart_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sPDKServiceClient) ReplicaRebuildingSrcShallowCopyCheck(ctx context.Context, in *ReplicaRebuildingSrcShallowCopyCheckRequest, opts ...grpc.CallOption) (*ReplicaRebuildingSrcShallowCopyCheckResponse, error) {
out := new(ReplicaRebuildingSrcShallowCopyCheckResponse)
err := c.cc.Invoke(ctx, SPDKService_ReplicaRebuildingSrcShallowCopyCheck_FullMethodName, in, out, opts...)
@ -391,6 +415,15 @@ func (c *sPDKServiceClient) ReplicaRebuildingDstSnapshotCreate(ctx context.Conte
return out, nil
}
func (c *sPDKServiceClient) ReplicaRebuildingDstSetQosLimit(ctx context.Context, in *ReplicaRebuildingDstSetQosLimitRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, SPDKService_ReplicaRebuildingDstSetQosLimit_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sPDKServiceClient) ReplicaBackupCreate(ctx context.Context, in *BackupCreateRequest, opts ...grpc.CallOption) (*BackupCreateResponse, error) {
out := new(BackupCreateResponse)
err := c.cc.Invoke(ctx, SPDKService_ReplicaBackupCreate_FullMethodName, in, out, opts...)
@ -857,17 +890,20 @@ type SPDKServiceServer interface {
ReplicaSnapshotHashStatus(context.Context, *SnapshotHashStatusRequest) (*ReplicaSnapshotHashStatusResponse, error)
ReplicaSnapshotHashCancel(context.Context, *SnapshotHashCancelRequest) (*emptypb.Empty, error)
ReplicaSnapshotHashLockState(context.Context, *SnapshotHashLockStateRequest) (*SnapshotHashLockStateResponse, error)
ReplicaSnapshotRangeHashGet(context.Context, *ReplicaSnapshotRangeHashGetRequest) (*ReplicaSnapshotRangeHashGetResponse, error)
ReplicaList(context.Context, *emptypb.Empty) (*ReplicaListResponse, error)
ReplicaWatch(*emptypb.Empty, SPDKService_ReplicaWatchServer) error
ReplicaRebuildingSrcStart(context.Context, *ReplicaRebuildingSrcStartRequest) (*ReplicaRebuildingSrcStartResponse, error)
ReplicaRebuildingSrcFinish(context.Context, *ReplicaRebuildingSrcFinishRequest) (*emptypb.Empty, error)
ReplicaRebuildingSrcShallowCopyStart(context.Context, *ReplicaRebuildingSrcShallowCopyStartRequest) (*emptypb.Empty, error)
ReplicaRebuildingSrcRangeShallowCopyStart(context.Context, *ReplicaRebuildingSrcRangeShallowCopyStartRequest) (*emptypb.Empty, error)
ReplicaRebuildingSrcShallowCopyCheck(context.Context, *ReplicaRebuildingSrcShallowCopyCheckRequest) (*ReplicaRebuildingSrcShallowCopyCheckResponse, error)
ReplicaRebuildingDstStart(context.Context, *ReplicaRebuildingDstStartRequest) (*ReplicaRebuildingDstStartResponse, error)
ReplicaRebuildingDstFinish(context.Context, *ReplicaRebuildingDstFinishRequest) (*emptypb.Empty, error)
ReplicaRebuildingDstShallowCopyStart(context.Context, *ReplicaRebuildingDstShallowCopyStartRequest) (*emptypb.Empty, error)
ReplicaRebuildingDstShallowCopyCheck(context.Context, *ReplicaRebuildingDstShallowCopyCheckRequest) (*ReplicaRebuildingDstShallowCopyCheckResponse, error)
ReplicaRebuildingDstSnapshotCreate(context.Context, *SnapshotRequest) (*emptypb.Empty, error)
ReplicaRebuildingDstSetQosLimit(context.Context, *ReplicaRebuildingDstSetQosLimitRequest) (*emptypb.Empty, error)
ReplicaBackupCreate(context.Context, *BackupCreateRequest) (*BackupCreateResponse, error)
ReplicaBackupStatus(context.Context, *BackupStatusRequest) (*BackupStatusResponse, error)
ReplicaBackupRestore(context.Context, *ReplicaBackupRestoreRequest) (*emptypb.Empty, error)
@ -953,6 +989,9 @@ func (UnimplementedSPDKServiceServer) ReplicaSnapshotHashCancel(context.Context,
func (UnimplementedSPDKServiceServer) ReplicaSnapshotHashLockState(context.Context, *SnapshotHashLockStateRequest) (*SnapshotHashLockStateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicaSnapshotHashLockState not implemented")
}
func (UnimplementedSPDKServiceServer) ReplicaSnapshotRangeHashGet(context.Context, *ReplicaSnapshotRangeHashGetRequest) (*ReplicaSnapshotRangeHashGetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicaSnapshotRangeHashGet not implemented")
}
func (UnimplementedSPDKServiceServer) ReplicaList(context.Context, *emptypb.Empty) (*ReplicaListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicaList not implemented")
}
@ -968,6 +1007,9 @@ func (UnimplementedSPDKServiceServer) ReplicaRebuildingSrcFinish(context.Context
func (UnimplementedSPDKServiceServer) ReplicaRebuildingSrcShallowCopyStart(context.Context, *ReplicaRebuildingSrcShallowCopyStartRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicaRebuildingSrcShallowCopyStart not implemented")
}
func (UnimplementedSPDKServiceServer) ReplicaRebuildingSrcRangeShallowCopyStart(context.Context, *ReplicaRebuildingSrcRangeShallowCopyStartRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicaRebuildingSrcRangeShallowCopyStart not implemented")
}
func (UnimplementedSPDKServiceServer) ReplicaRebuildingSrcShallowCopyCheck(context.Context, *ReplicaRebuildingSrcShallowCopyCheckRequest) (*ReplicaRebuildingSrcShallowCopyCheckResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicaRebuildingSrcShallowCopyCheck not implemented")
}
@ -986,6 +1028,9 @@ func (UnimplementedSPDKServiceServer) ReplicaRebuildingDstShallowCopyCheck(conte
func (UnimplementedSPDKServiceServer) ReplicaRebuildingDstSnapshotCreate(context.Context, *SnapshotRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicaRebuildingDstSnapshotCreate not implemented")
}
func (UnimplementedSPDKServiceServer) ReplicaRebuildingDstSetQosLimit(context.Context, *ReplicaRebuildingDstSetQosLimitRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicaRebuildingDstSetQosLimit not implemented")
}
func (UnimplementedSPDKServiceServer) ReplicaBackupCreate(context.Context, *BackupCreateRequest) (*BackupCreateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplicaBackupCreate not implemented")
}
@ -1332,6 +1377,24 @@ func _SPDKService_ReplicaSnapshotHashLockState_Handler(srv interface{}, ctx cont
return interceptor(ctx, in, info, handler)
}
func _SPDKService_ReplicaSnapshotRangeHashGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReplicaSnapshotRangeHashGetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SPDKServiceServer).ReplicaSnapshotRangeHashGet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SPDKService_ReplicaSnapshotRangeHashGet_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SPDKServiceServer).ReplicaSnapshotRangeHashGet(ctx, req.(*ReplicaSnapshotRangeHashGetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SPDKService_ReplicaList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
@ -1425,6 +1488,24 @@ func _SPDKService_ReplicaRebuildingSrcShallowCopyStart_Handler(srv interface{},
return interceptor(ctx, in, info, handler)
}
func _SPDKService_ReplicaRebuildingSrcRangeShallowCopyStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReplicaRebuildingSrcRangeShallowCopyStartRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SPDKServiceServer).ReplicaRebuildingSrcRangeShallowCopyStart(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SPDKService_ReplicaRebuildingSrcRangeShallowCopyStart_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SPDKServiceServer).ReplicaRebuildingSrcRangeShallowCopyStart(ctx, req.(*ReplicaRebuildingSrcRangeShallowCopyStartRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SPDKService_ReplicaRebuildingSrcShallowCopyCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReplicaRebuildingSrcShallowCopyCheckRequest)
if err := dec(in); err != nil {
@ -1533,6 +1614,24 @@ func _SPDKService_ReplicaRebuildingDstSnapshotCreate_Handler(srv interface{}, ct
return interceptor(ctx, in, info, handler)
}
func _SPDKService_ReplicaRebuildingDstSetQosLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReplicaRebuildingDstSetQosLimitRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SPDKServiceServer).ReplicaRebuildingDstSetQosLimit(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SPDKService_ReplicaRebuildingDstSetQosLimit_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SPDKServiceServer).ReplicaRebuildingDstSetQosLimit(ctx, req.(*ReplicaRebuildingDstSetQosLimitRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SPDKService_ReplicaBackupCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BackupCreateRequest)
if err := dec(in); err != nil {
@ -2400,6 +2499,10 @@ var SPDKService_ServiceDesc = grpc.ServiceDesc{
MethodName: "ReplicaSnapshotHashLockState",
Handler: _SPDKService_ReplicaSnapshotHashLockState_Handler,
},
{
MethodName: "ReplicaSnapshotRangeHashGet",
Handler: _SPDKService_ReplicaSnapshotRangeHashGet_Handler,
},
{
MethodName: "ReplicaList",
Handler: _SPDKService_ReplicaList_Handler,
@ -2416,6 +2519,10 @@ var SPDKService_ServiceDesc = grpc.ServiceDesc{
MethodName: "ReplicaRebuildingSrcShallowCopyStart",
Handler: _SPDKService_ReplicaRebuildingSrcShallowCopyStart_Handler,
},
{
MethodName: "ReplicaRebuildingSrcRangeShallowCopyStart",
Handler: _SPDKService_ReplicaRebuildingSrcRangeShallowCopyStart_Handler,
},
{
MethodName: "ReplicaRebuildingSrcShallowCopyCheck",
Handler: _SPDKService_ReplicaRebuildingSrcShallowCopyCheck_Handler,
@ -2440,6 +2547,10 @@ var SPDKService_ServiceDesc = grpc.ServiceDesc{
MethodName: "ReplicaRebuildingDstSnapshotCreate",
Handler: _SPDKService_ReplicaRebuildingDstSnapshotCreate_Handler,
},
{
MethodName: "ReplicaRebuildingDstSetQosLimit",
Handler: _SPDKService_ReplicaRebuildingDstSetQosLimit_Handler,
},
{
MethodName: "ReplicaBackupCreate",
Handler: _SPDKService_ReplicaBackupCreate_Handler,

View File

@ -6,6 +6,7 @@ package controller
import (
"context"
"errors"
"fmt"
"strings"
"sync"
@ -38,6 +39,11 @@ func (h HandlerFunc) OnChange(key string, obj runtime.Object) error {
return h(key, obj)
}
type retryAfterError struct {
error
duration time.Duration
}
type Controller interface {
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, delay time.Duration)
@ -50,6 +56,7 @@ type controller struct {
startLock sync.Mutex
name string
ctxID string
workqueue workqueue.RateLimitingInterface
rateLimiter workqueue.RateLimiter
informer cache.SharedIndexInformer
@ -174,6 +181,7 @@ func (c *controller) Start(ctx context.Context, workers int) error {
return fmt.Errorf("failed to wait for caches to sync")
}
c.ctxID = metrics.ContextID(ctx)
go c.run(workers, ctx.Done())
c.started = true
return nil
@ -215,6 +223,11 @@ func (c *controller) processSingleItem(obj interface{}) error {
return nil
}
if err := c.syncHandler(key); err != nil {
var retryAfter *retryAfterError
if errors.As(err, &retryAfter) {
c.workqueue.AddAfter(key, retryAfter.duration)
return retryAfter.error
}
c.workqueue.AddRateLimited(key)
return fmt.Errorf("error syncing '%s': %s, requeuing", key, err.Error())
}
@ -226,7 +239,7 @@ func (c *controller) processSingleItem(obj interface{}) error {
func (c *controller) syncHandler(key string) error {
obj, exists, err := c.informer.GetStore().GetByKey(key)
if err != nil {
metrics.IncTotalHandlerExecutions(c.name, "", true)
metrics.IncTotalHandlerExecutions(c.ctxID, c.name, "", true)
return err
}
if !exists {

View File

@ -7,6 +7,7 @@ import (
"github.com/rancher/lasso/pkg/cache"
"github.com/rancher/lasso/pkg/client"
"github.com/rancher/lasso/pkg/metrics"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
cachetools "k8s.io/client-go/tools/cache"
@ -93,6 +94,7 @@ func (s *sharedController) Start(ctx context.Context, workers int) error {
return nil
}
s.handler.CtxID = metrics.ContextID(ctx)
if err := s.controller.Start(ctx, workers); err != nil {
return err
}

View File

@ -182,7 +182,7 @@ func (s *sharedControllerFactory) ForResourceKind(gvr schema.GroupVersionResourc
client := s.sharedCacheFactory.SharedClientFactory().ForResourceKind(gvr, kind, namespaced)
handler := &SharedHandler{controllerGVR: gvr.String()}
handler := &SharedHandler{ControllerName: gvr.String()}
controllerResult = &sharedController{
deferredController: func() (Controller, error) {

View File

@ -13,6 +13,14 @@ import (
"github.com/rancher/lasso/pkg/metrics"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/cache"
)
const (
// recentDeletionCacheExpiration configures the duration for keeping a history of recently deleted object UIDs
recentDeletionCacheExpiration = 1 * time.Minute
// retryPeriodForRecentlyDeletedObject is the time to wait before retrying enqueuing a key that was just deleted but still present in the informer store
retryPeriodForRecentlyDeletedObject = 10 * time.Second
)
var (
@ -26,18 +34,27 @@ type handlerEntry struct {
}
type SharedHandler struct {
// keep first because arm32 needs atomic.AddInt64 target to be mem aligned
idCounter int64
controllerGVR string
// Used for metrics recording
// They are exported because this SharedHandler is sometimes embedded used as a field in other packages, like dynamic
ControllerName string
CtxID string
lock sync.RWMutex
handlers []handlerEntry
// keep first because arm32 needs atomic.AddInt64 target to be mem aligned
idCounter int64
lock sync.RWMutex
handlers []handlerEntry
recentDeletions *cache.Expiring
}
func (h *SharedHandler) Register(ctx context.Context, name string, handler SharedControllerHandler) {
h.lock.Lock()
defer h.lock.Unlock()
if h.recentDeletions == nil {
h.recentDeletions = cache.NewExpiring()
}
id := atomic.AddInt64(&h.idCounter, 1)
h.handlers = append(h.handlers, handlerEntry{
id: id,
@ -61,13 +78,19 @@ func (h *SharedHandler) Register(ctx context.Context, name string, handler Share
}
func (h *SharedHandler) OnChange(key string, obj runtime.Object) error {
var (
errs errorList
)
// early skip for a special case: objects that were just deleted but still not updated in the informer cache.
// modifications performed by early chained handlers also cause a new enqueue of the processed key, while later late handlers modifications
// could cause the definitive deletion of the object (by removing a finalizer). If this happens fast enough, it creates a race condition where handlers receive an out-of-date version of the object.
// See https://github.com/rancher/rancher/issues/49328 for more details.
if obj != nil && h.deletedInPreviousExecution(obj) {
return &retryAfterError{duration: retryPeriodForRecentlyDeletedObject}
}
h.lock.RLock()
handlers := h.handlers
h.lock.RUnlock()
var errs errorList
for _, handler := range handlers {
var hasError bool
reconcileStartTS := time.Now()
@ -80,9 +103,9 @@ func (h *SharedHandler) OnChange(key string, obj runtime.Object) error {
})
hasError = true
}
metrics.IncTotalHandlerExecutions(h.controllerGVR, handler.name, hasError)
metrics.IncTotalHandlerExecutions(h.CtxID, h.ControllerName, handler.name, hasError)
reconcileTime := time.Since(reconcileStartTS)
metrics.ReportReconcileTime(h.controllerGVR, handler.name, hasError, reconcileTime.Seconds())
metrics.ReportReconcileTime(h.CtxID, h.ControllerName, handler.name, hasError, reconcileTime.Seconds())
if newObj != nil && !reflect.ValueOf(newObj).IsNil() {
meta, err := meta.Accessor(newObj)
@ -96,9 +119,60 @@ func (h *SharedHandler) OnChange(key string, obj runtime.Object) error {
}
}
if obj != nil && wasFinalized(obj) {
h.observeDeletedObjectAfterFinalize(obj)
}
return errs.ToErr()
}
// wasFinalized determines if an object which initially had finalizers got them removed, hence unblocking its erasure by Kubernetes
// Caveats: deletionTimestamp is never set for objects without finalizers, as Kubernetes will directly delete the object instead
func wasFinalized(obj runtime.Object) bool {
meta, err := meta.Accessor(obj)
if err != nil {
return false
}
return meta.GetDeletionTimestamp() != nil && len(meta.GetFinalizers()) == 0
}
// observeDeletedObjectAfterFinalize will temporarily store the UID of an object, so successive executions of the handlers have "memory" of this event
func (h *SharedHandler) observeDeletedObjectAfterFinalize(obj runtime.Object) {
// Corner-case: Register was never called, so recentDeletions was not initialized
// Currently, since there is no constructor for SharedHandler, the only place where we can initialize this cache is the Register hook
if h.recentDeletions == nil {
return
}
meta, err := meta.Accessor(obj)
if err != nil {
return
}
h.recentDeletions.Set(meta.GetUID(), struct{}{}, recentDeletionCacheExpiration)
}
// deletedInPreviousExecution returns whether an object has been deleted in earlier executions of the controller.
func (h *SharedHandler) deletedInPreviousExecution(obj runtime.Object) bool {
// Corner-case: Register was never called, so recentDeletions was not initialized
// Currently, since there is no constructor for SharedHandler, the only place where we can initialize this cache is the Register hook
if h.recentDeletions == nil {
return false
}
meta, err := meta.Accessor(obj)
if err != nil {
return false
}
// avoid checking the cache for objects not marked for deletion
if meta.GetDeletionTimestamp() == nil {
return false
}
_, ok := h.recentDeletions.Get(meta.GetUID())
return ok
}
type errorList []error
func (e errorList) Error() string {

View File

@ -10,6 +10,7 @@ import (
"github.com/rancher/lasso/pkg/client"
"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/lasso/pkg/log"
"github.com/rancher/lasso/pkg/metrics"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -54,6 +55,8 @@ type Controller struct {
func (c *Controller) Register(ctx context.Context, factory controller.SharedControllerFactory) error {
c.ctx = ctx
c.handler.CtxID = metrics.ContextID(ctx)
c.handler.ControllerName = "dynamic.Controller"
c.cacheFactory = factory.SharedCacheFactory()
c.clientFactory = factory.SharedCacheFactory().SharedClientFactory()
return watchGVKS(ctx, c.discovery, factory, c.OnGVKs)

View File

@ -2,6 +2,7 @@ package dynamic
import (
"context"
"fmt"
"sync"
"sync/atomic"
"time"
@ -75,7 +76,11 @@ func (g *gvkWatcher) queueRefresh() {
func (g *gvkWatcher) getGVKs() (result []schema.GroupVersionKind, _ error) {
_, resources, err := g.client.ServerGroupsAndResources()
if err != nil {
return nil, err
if gd, ok := err.(*discovery.ErrGroupDiscoveryFailed); ok {
klog.Warning("Failed to read API for groups: ", gd.Groups)
} else {
return nil, fmt.Errorf("getGVKs: %w", err)
}
}
for _, resource := range resources {
for _, apiResource := range resource.APIResources {

View File

@ -45,7 +45,7 @@ var (
Name: "total_handler_execution",
Help: "Total count of handler executions",
},
[]string{controllerNameLabel, handlerNameLabel, hasErrorLabel},
[]string{contextLabel, controllerNameLabel, handlerNameLabel, hasErrorLabel},
)
TotalCachedObjects = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
@ -62,13 +62,14 @@ var (
Subsystem: lassoSubsystem,
Name: "reconcile_time_seconds",
Help: "Histogram of the durations per reconciliation per controller",
}, []string{controllerNameLabel, handlerNameLabel, hasErrorLabel})
}, []string{contextLabel, controllerNameLabel, handlerNameLabel, hasErrorLabel})
)
func IncTotalHandlerExecutions(controllerName, handlerName string, hasError bool) {
func IncTotalHandlerExecutions(ctxID, controllerName, handlerName string, hasError bool) {
if prometheusMetrics {
TotalControllerExecutions.With(
prometheus.Labels{
contextLabel: ctxID,
controllerNameLabel: controllerName,
handlerNameLabel: handlerName,
hasErrorLabel: strconv.FormatBool(hasError),
@ -105,10 +106,11 @@ func DelTotalCachedObjects(ctxID string, gvk schema.GroupVersionKind) {
}
}
func ReportReconcileTime(controllerName, handlerName string, hasError bool, observeTime float64) {
func ReportReconcileTime(ctxID, controllerName, handlerName string, hasError bool, observeTime float64) {
if prometheusMetrics {
reconcileTime.With(
prometheus.Labels{
contextLabel: ctxID,
controllerNameLabel: controllerName,
handlerNameLabel: handlerName,
hasErrorLabel: strconv.FormatBool(hasError),

View File

@ -41,41 +41,50 @@ func GetValue(data map[string]interface{}, keys ...string) (interface{}, bool) {
return nil, false
}
// GetValueFromAny retrieves a value from the provided collection, which must be a map[string]interface or a []interface.
// GetValueFromAny retrieves a value from the provided collection, which must be a map[string]interface, []interface, or []string (as a final value)
// Keys are always strings.
// For a map, a key denotes the key in the map whose value we want to retrieve.
// For the slice, it denotes the index (starting at 0) of the value we want to retrieve.
// Returns the retrieved value (if any) and a bool indicating if the value was found.
func GetValueFromAny(data interface{}, keys ...string) (interface{}, bool) {
for i, key := range keys {
if i == len(keys)-1 {
if dataMap, ok := data.(map[string]interface{}); ok {
val, ok := dataMap[key]
return val, ok
}
if dataSlice, ok := data.([]interface{}); ok {
return itemByIndex(dataSlice, key)
if len(keys) == 0 {
return nil, false
}
for _, key := range keys {
if d2, ok := data.(map[string]interface{}); ok {
data, ok = d2[key]
if !ok {
return nil, false
}
continue
}
if dataMap, ok := data.(map[string]interface{}); ok {
data, _ = dataMap[key]
} else if dataSlice, ok := data.([]interface{}); ok {
data, _ = itemByIndex(dataSlice, key)
// So it must be an array. Verify the index and then continue
// with a type-assertion switch block for the two different types of arrays we expect
keyInt, err := strconv.Atoi(key)
if err != nil || keyInt < 0 {
return nil, false
}
switch node := data.(type) {
case []interface{}:
if keyInt >= len(node) {
return nil, false
}
data = node[keyInt]
case []string:
if keyInt >= len(node) {
return nil, false
}
data = node[keyInt]
// If we're at the end of the keys, we'll return the value at the end of this function
// Otherwise we'll try to index into the string and hit the default case,
// and return <nil, false>
// See the "keys nested too far on a string array" test.
default:
return nil, false
}
}
return nil, false
}
func itemByIndex(dataSlice []interface{}, key string) (interface{}, bool) {
keyInt, err := strconv.Atoi(key)
if err != nil {
return nil, false
}
if keyInt >= len(dataSlice) || keyInt < 0 {
return nil, false
}
return dataSlice[keyInt], true
return data, true
}
// PutValue updates the value of a given map at the index specified by keys that denote the path to the value in the

View File

@ -2,6 +2,7 @@ package generic
import (
"context"
"fmt"
"sync"
"time"
@ -103,8 +104,15 @@ func (c *Factory) setControllerFactoryWithLock() error {
func (c *Factory) Sync(ctx context.Context) error {
if c.cacheFactory != nil {
_ = c.cacheFactory.Start(ctx)
c.cacheFactory.WaitForCacheSync(ctx)
if err := c.cacheFactory.Start(ctx); err != nil {
return err
}
syncStatus := c.cacheFactory.WaitForCacheSync(ctx)
for informerType, synced := range syncStatus {
if !synced {
return fmt.Errorf("cache sync failed for informer %s", informerType.Kind)
}
}
}
return nil
}

View File

@ -0,0 +1,3 @@
# Semconv v1.26.0
[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.26.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.26.0)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
// Package semconv implements OpenTelemetry semantic conventions.
//
// OpenTelemetry semantic conventions are agreed standardized naming
// patterns for OpenTelemetry things. This package represents the v1.26.0
// version of the OpenTelemetry semantic conventions.
package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0"

View File

@ -0,0 +1,9 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0"
const (
// ExceptionEventName is the name of the Span event representing an exception.
ExceptionEventName = "exception"
)

1307
vendor/go.opentelemetry.io/otel/semconv/v1.26.0/metric.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0"
// SchemaURL is the schema URL that matches the version of the semantic conventions
// that this package defines. Semconv packages starting from v1.4.0 must declare
// non-empty schema URL in the form https://opentelemetry.io/schemas/<version>
const SchemaURL = "https://opentelemetry.io/schemas/1.26.0"

661
vendor/go.opentelemetry.io/otel/trace/auto.go generated vendored Normal file
View File

@ -0,0 +1,661 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package trace // import "go.opentelemetry.io/otel/trace"
import (
"context"
"encoding/json"
"fmt"
"math"
"os"
"reflect"
"runtime"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"unicode/utf8"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
"go.opentelemetry.io/otel/trace/embedded"
"go.opentelemetry.io/otel/trace/internal/telemetry"
)
// newAutoTracerProvider returns an auto-instrumentable [trace.TracerProvider].
// If an [go.opentelemetry.io/auto.Instrumentation] is configured to instrument
// the process using the returned TracerProvider, all of the telemetry it
// produces will be processed and handled by that Instrumentation. By default,
// if no Instrumentation instruments the TracerProvider it will not generate
// any trace telemetry.
func newAutoTracerProvider() TracerProvider { return tracerProviderInstance }
var tracerProviderInstance = new(autoTracerProvider)
type autoTracerProvider struct{ embedded.TracerProvider }
var _ TracerProvider = autoTracerProvider{}
func (p autoTracerProvider) Tracer(name string, opts ...TracerOption) Tracer {
cfg := NewTracerConfig(opts...)
return autoTracer{
name: name,
version: cfg.InstrumentationVersion(),
schemaURL: cfg.SchemaURL(),
}
}
type autoTracer struct {
embedded.Tracer
name, schemaURL, version string
}
var _ Tracer = autoTracer{}
func (t autoTracer) Start(ctx context.Context, name string, opts ...SpanStartOption) (context.Context, Span) {
var psc SpanContext
sampled := true
span := new(autoSpan)
// Ask eBPF for sampling decision and span context info.
t.start(ctx, span, &psc, &sampled, &span.spanContext)
span.sampled.Store(sampled)
ctx = ContextWithSpan(ctx, span)
if sampled {
// Only build traces if sampled.
cfg := NewSpanStartConfig(opts...)
span.traces, span.span = t.traces(name, cfg, span.spanContext, psc)
}
return ctx, span
}
// Expected to be implemented in eBPF.
//
//go:noinline
func (t *autoTracer) start(
ctx context.Context,
spanPtr *autoSpan,
psc *SpanContext,
sampled *bool,
sc *SpanContext,
) {
start(ctx, spanPtr, psc, sampled, sc)
}
// start is used for testing.
var start = func(context.Context, *autoSpan, *SpanContext, *bool, *SpanContext) {}
func (t autoTracer) traces(name string, cfg SpanConfig, sc, psc SpanContext) (*telemetry.Traces, *telemetry.Span) {
span := &telemetry.Span{
TraceID: telemetry.TraceID(sc.TraceID()),
SpanID: telemetry.SpanID(sc.SpanID()),
Flags: uint32(sc.TraceFlags()),
TraceState: sc.TraceState().String(),
ParentSpanID: telemetry.SpanID(psc.SpanID()),
Name: name,
Kind: spanKind(cfg.SpanKind()),
}
span.Attrs, span.DroppedAttrs = convCappedAttrs(maxSpan.Attrs, cfg.Attributes())
links := cfg.Links()
if limit := maxSpan.Links; limit == 0 {
n := int64(len(links))
if n > 0 {
span.DroppedLinks = uint32(min(n, math.MaxUint32)) // nolint: gosec // Bounds checked.
}
} else {
if limit > 0 {
n := int64(max(len(links)-limit, 0))
span.DroppedLinks = uint32(min(n, math.MaxUint32)) // nolint: gosec // Bounds checked.
links = links[n:]
}
span.Links = convLinks(links)
}
if t := cfg.Timestamp(); !t.IsZero() {
span.StartTime = cfg.Timestamp()
} else {
span.StartTime = time.Now()
}
return &telemetry.Traces{
ResourceSpans: []*telemetry.ResourceSpans{
{
ScopeSpans: []*telemetry.ScopeSpans{
{
Scope: &telemetry.Scope{
Name: t.name,
Version: t.version,
},
Spans: []*telemetry.Span{span},
SchemaURL: t.schemaURL,
},
},
},
},
}, span
}
func spanKind(kind SpanKind) telemetry.SpanKind {
switch kind {
case SpanKindInternal:
return telemetry.SpanKindInternal
case SpanKindServer:
return telemetry.SpanKindServer
case SpanKindClient:
return telemetry.SpanKindClient
case SpanKindProducer:
return telemetry.SpanKindProducer
case SpanKindConsumer:
return telemetry.SpanKindConsumer
}
return telemetry.SpanKind(0) // undefined.
}
type autoSpan struct {
embedded.Span
spanContext SpanContext
sampled atomic.Bool
mu sync.Mutex
traces *telemetry.Traces
span *telemetry.Span
}
func (s *autoSpan) SpanContext() SpanContext {
if s == nil {
return SpanContext{}
}
// s.spanContext is immutable, do not acquire lock s.mu.
return s.spanContext
}
func (s *autoSpan) IsRecording() bool {
if s == nil {
return false
}
return s.sampled.Load()
}
func (s *autoSpan) SetStatus(c codes.Code, msg string) {
if s == nil || !s.sampled.Load() {
return
}
s.mu.Lock()
defer s.mu.Unlock()
if s.span.Status == nil {
s.span.Status = new(telemetry.Status)
}
s.span.Status.Message = msg
switch c {
case codes.Unset:
s.span.Status.Code = telemetry.StatusCodeUnset
case codes.Error:
s.span.Status.Code = telemetry.StatusCodeError
case codes.Ok:
s.span.Status.Code = telemetry.StatusCodeOK
}
}
func (s *autoSpan) SetAttributes(attrs ...attribute.KeyValue) {
if s == nil || !s.sampled.Load() {
return
}
s.mu.Lock()
defer s.mu.Unlock()
limit := maxSpan.Attrs
if limit == 0 {
// No attributes allowed.
n := int64(len(attrs))
if n > 0 {
s.span.DroppedAttrs += uint32(min(n, math.MaxUint32)) // nolint: gosec // Bounds checked.
}
return
}
m := make(map[string]int)
for i, a := range s.span.Attrs {
m[a.Key] = i
}
for _, a := range attrs {
val := convAttrValue(a.Value)
if val.Empty() {
s.span.DroppedAttrs++
continue
}
if idx, ok := m[string(a.Key)]; ok {
s.span.Attrs[idx] = telemetry.Attr{
Key: string(a.Key),
Value: val,
}
} else if limit < 0 || len(s.span.Attrs) < limit {
s.span.Attrs = append(s.span.Attrs, telemetry.Attr{
Key: string(a.Key),
Value: val,
})
m[string(a.Key)] = len(s.span.Attrs) - 1
} else {
s.span.DroppedAttrs++
}
}
}
// convCappedAttrs converts up to limit attrs into a []telemetry.Attr. The
// number of dropped attributes is also returned.
func convCappedAttrs(limit int, attrs []attribute.KeyValue) ([]telemetry.Attr, uint32) {
n := len(attrs)
if limit == 0 {
var out uint32
if n > 0 {
out = uint32(min(int64(n), math.MaxUint32)) // nolint: gosec // Bounds checked.
}
return nil, out
}
if limit < 0 {
// Unlimited.
return convAttrs(attrs), 0
}
if n < 0 {
n = 0
}
limit = min(n, limit)
return convAttrs(attrs[:limit]), uint32(n - limit) // nolint: gosec // Bounds checked.
}
func convAttrs(attrs []attribute.KeyValue) []telemetry.Attr {
if len(attrs) == 0 {
// Avoid allocations if not necessary.
return nil
}
out := make([]telemetry.Attr, 0, len(attrs))
for _, attr := range attrs {
key := string(attr.Key)
val := convAttrValue(attr.Value)
if val.Empty() {
continue
}
out = append(out, telemetry.Attr{Key: key, Value: val})
}
return out
}
func convAttrValue(value attribute.Value) telemetry.Value {
switch value.Type() {
case attribute.BOOL:
return telemetry.BoolValue(value.AsBool())
case attribute.INT64:
return telemetry.Int64Value(value.AsInt64())
case attribute.FLOAT64:
return telemetry.Float64Value(value.AsFloat64())
case attribute.STRING:
v := truncate(maxSpan.AttrValueLen, value.AsString())
return telemetry.StringValue(v)
case attribute.BOOLSLICE:
slice := value.AsBoolSlice()
out := make([]telemetry.Value, 0, len(slice))
for _, v := range slice {
out = append(out, telemetry.BoolValue(v))
}
return telemetry.SliceValue(out...)
case attribute.INT64SLICE:
slice := value.AsInt64Slice()
out := make([]telemetry.Value, 0, len(slice))
for _, v := range slice {
out = append(out, telemetry.Int64Value(v))
}
return telemetry.SliceValue(out...)
case attribute.FLOAT64SLICE:
slice := value.AsFloat64Slice()
out := make([]telemetry.Value, 0, len(slice))
for _, v := range slice {
out = append(out, telemetry.Float64Value(v))
}
return telemetry.SliceValue(out...)
case attribute.STRINGSLICE:
slice := value.AsStringSlice()
out := make([]telemetry.Value, 0, len(slice))
for _, v := range slice {
v = truncate(maxSpan.AttrValueLen, v)
out = append(out, telemetry.StringValue(v))
}
return telemetry.SliceValue(out...)
}
return telemetry.Value{}
}
// truncate returns a truncated version of s such that it contains less than
// the limit number of characters. Truncation is applied by returning the limit
// number of valid characters contained in s.
//
// If limit is negative, it returns the original string.
//
// UTF-8 is supported. When truncating, all invalid characters are dropped
// before applying truncation.
//
// If s already contains less than the limit number of bytes, it is returned
// unchanged. No invalid characters are removed.
func truncate(limit int, s string) string {
// This prioritize performance in the following order based on the most
// common expected use-cases.
//
// - Short values less than the default limit (128).
// - Strings with valid encodings that exceed the limit.
// - No limit.
// - Strings with invalid encodings that exceed the limit.
if limit < 0 || len(s) <= limit {
return s
}
// Optimistically, assume all valid UTF-8.
var b strings.Builder
count := 0
for i, c := range s {
if c != utf8.RuneError {
count++
if count > limit {
return s[:i]
}
continue
}
_, size := utf8.DecodeRuneInString(s[i:])
if size == 1 {
// Invalid encoding.
b.Grow(len(s) - 1)
_, _ = b.WriteString(s[:i])
s = s[i:]
break
}
}
// Fast-path, no invalid input.
if b.Cap() == 0 {
return s
}
// Truncate while validating UTF-8.
for i := 0; i < len(s) && count < limit; {
c := s[i]
if c < utf8.RuneSelf {
// Optimization for single byte runes (common case).
_ = b.WriteByte(c)
i++
count++
continue
}
_, size := utf8.DecodeRuneInString(s[i:])
if size == 1 {
// We checked for all 1-byte runes above, this is a RuneError.
i++
continue
}
_, _ = b.WriteString(s[i : i+size])
i += size
count++
}
return b.String()
}
func (s *autoSpan) End(opts ...SpanEndOption) {
if s == nil || !s.sampled.Swap(false) {
return
}
// s.end exists so the lock (s.mu) is not held while s.ended is called.
s.ended(s.end(opts))
}
func (s *autoSpan) end(opts []SpanEndOption) []byte {
s.mu.Lock()
defer s.mu.Unlock()
cfg := NewSpanEndConfig(opts...)
if t := cfg.Timestamp(); !t.IsZero() {
s.span.EndTime = cfg.Timestamp()
} else {
s.span.EndTime = time.Now()
}
b, _ := json.Marshal(s.traces) // TODO: do not ignore this error.
return b
}
// Expected to be implemented in eBPF.
//
//go:noinline
func (*autoSpan) ended(buf []byte) { ended(buf) }
// ended is used for testing.
var ended = func([]byte) {}
func (s *autoSpan) RecordError(err error, opts ...EventOption) {
if s == nil || err == nil || !s.sampled.Load() {
return
}
cfg := NewEventConfig(opts...)
attrs := cfg.Attributes()
attrs = append(attrs,
semconv.ExceptionType(typeStr(err)),
semconv.ExceptionMessage(err.Error()),
)
if cfg.StackTrace() {
buf := make([]byte, 2048)
n := runtime.Stack(buf, false)
attrs = append(attrs, semconv.ExceptionStacktrace(string(buf[0:n])))
}
s.mu.Lock()
defer s.mu.Unlock()
s.addEvent(semconv.ExceptionEventName, cfg.Timestamp(), attrs)
}
func typeStr(i any) string {
t := reflect.TypeOf(i)
if t.PkgPath() == "" && t.Name() == "" {
// Likely a builtin type.
return t.String()
}
return fmt.Sprintf("%s.%s", t.PkgPath(), t.Name())
}
func (s *autoSpan) AddEvent(name string, opts ...EventOption) {
if s == nil || !s.sampled.Load() {
return
}
cfg := NewEventConfig(opts...)
s.mu.Lock()
defer s.mu.Unlock()
s.addEvent(name, cfg.Timestamp(), cfg.Attributes())
}
// addEvent adds an event with name and attrs at tStamp to the span. The span
// lock (s.mu) needs to be held by the caller.
func (s *autoSpan) addEvent(name string, tStamp time.Time, attrs []attribute.KeyValue) {
limit := maxSpan.Events
if limit == 0 {
s.span.DroppedEvents++
return
}
if limit > 0 && len(s.span.Events) == limit {
// Drop head while avoiding allocation of more capacity.
copy(s.span.Events[:limit-1], s.span.Events[1:])
s.span.Events = s.span.Events[:limit-1]
s.span.DroppedEvents++
}
e := &telemetry.SpanEvent{Time: tStamp, Name: name}
e.Attrs, e.DroppedAttrs = convCappedAttrs(maxSpan.EventAttrs, attrs)
s.span.Events = append(s.span.Events, e)
}
func (s *autoSpan) AddLink(link Link) {
if s == nil || !s.sampled.Load() {
return
}
l := maxSpan.Links
s.mu.Lock()
defer s.mu.Unlock()
if l == 0 {
s.span.DroppedLinks++
return
}
if l > 0 && len(s.span.Links) == l {
// Drop head while avoiding allocation of more capacity.
copy(s.span.Links[:l-1], s.span.Links[1:])
s.span.Links = s.span.Links[:l-1]
s.span.DroppedLinks++
}
s.span.Links = append(s.span.Links, convLink(link))
}
func convLinks(links []Link) []*telemetry.SpanLink {
out := make([]*telemetry.SpanLink, 0, len(links))
for _, link := range links {
out = append(out, convLink(link))
}
return out
}
func convLink(link Link) *telemetry.SpanLink {
l := &telemetry.SpanLink{
TraceID: telemetry.TraceID(link.SpanContext.TraceID()),
SpanID: telemetry.SpanID(link.SpanContext.SpanID()),
TraceState: link.SpanContext.TraceState().String(),
Flags: uint32(link.SpanContext.TraceFlags()),
}
l.Attrs, l.DroppedAttrs = convCappedAttrs(maxSpan.LinkAttrs, link.Attributes)
return l
}
func (s *autoSpan) SetName(name string) {
if s == nil || !s.sampled.Load() {
return
}
s.mu.Lock()
defer s.mu.Unlock()
s.span.Name = name
}
func (*autoSpan) TracerProvider() TracerProvider { return newAutoTracerProvider() }
// maxSpan are the span limits resolved during startup.
var maxSpan = newSpanLimits()
type spanLimits struct {
// Attrs is the number of allowed attributes for a span.
//
// This is resolved from the environment variable value for the
// OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT key if it exists. Otherwise, the
// environment variable value for OTEL_ATTRIBUTE_COUNT_LIMIT, or 128 if
// that is not set, is used.
Attrs int
// AttrValueLen is the maximum attribute value length allowed for a span.
//
// This is resolved from the environment variable value for the
// OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT key if it exists. Otherwise, the
// environment variable value for OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, or -1
// if that is not set, is used.
AttrValueLen int
// Events is the number of allowed events for a span.
//
// This is resolved from the environment variable value for the
// OTEL_SPAN_EVENT_COUNT_LIMIT key, or 128 is used if that is not set.
Events int
// EventAttrs is the number of allowed attributes for a span event.
//
// The is resolved from the environment variable value for the
// OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT key, or 128 is used if that is not set.
EventAttrs int
// Links is the number of allowed Links for a span.
//
// This is resolved from the environment variable value for the
// OTEL_SPAN_LINK_COUNT_LIMIT, or 128 is used if that is not set.
Links int
// LinkAttrs is the number of allowed attributes for a span link.
//
// This is resolved from the environment variable value for the
// OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, or 128 is used if that is not set.
LinkAttrs int
}
func newSpanLimits() spanLimits {
return spanLimits{
Attrs: firstEnv(
128,
"OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT",
"OTEL_ATTRIBUTE_COUNT_LIMIT",
),
AttrValueLen: firstEnv(
-1, // Unlimited.
"OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT",
"OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT",
),
Events: firstEnv(128, "OTEL_SPAN_EVENT_COUNT_LIMIT"),
EventAttrs: firstEnv(128, "OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT"),
Links: firstEnv(128, "OTEL_SPAN_LINK_COUNT_LIMIT"),
LinkAttrs: firstEnv(128, "OTEL_LINK_ATTRIBUTE_COUNT_LIMIT"),
}
}
// firstEnv returns the parsed integer value of the first matching environment
// variable from keys. The defaultVal is returned if the value is not an
// integer or no match is found.
func firstEnv(defaultVal int, keys ...string) int {
for _, key := range keys {
strV := os.Getenv(key)
if strV == "" {
continue
}
v, err := strconv.Atoi(strV)
if err == nil {
return v
}
// Ignore invalid environment variable.
}
return defaultVal
}

View File

@ -0,0 +1,58 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
// Attr is a key-value pair.
type Attr struct {
Key string `json:"key,omitempty"`
Value Value `json:"value,omitempty"`
}
// String returns an Attr for a string value.
func String(key, value string) Attr {
return Attr{key, StringValue(value)}
}
// Int64 returns an Attr for an int64 value.
func Int64(key string, value int64) Attr {
return Attr{key, Int64Value(value)}
}
// Int returns an Attr for an int value.
func Int(key string, value int) Attr {
return Int64(key, int64(value))
}
// Float64 returns an Attr for a float64 value.
func Float64(key string, value float64) Attr {
return Attr{key, Float64Value(value)}
}
// Bool returns an Attr for a bool value.
func Bool(key string, value bool) Attr {
return Attr{key, BoolValue(value)}
}
// Bytes returns an Attr for a []byte value.
// The passed slice must not be changed after it is passed.
func Bytes(key string, value []byte) Attr {
return Attr{key, BytesValue(value)}
}
// Slice returns an Attr for a []Value value.
// The passed slice must not be changed after it is passed.
func Slice(key string, value ...Value) Attr {
return Attr{key, SliceValue(value...)}
}
// Map returns an Attr for a map value.
// The passed slice must not be changed after it is passed.
func Map(key string, value ...Attr) Attr {
return Attr{key, MapValue(value...)}
}
// Equal returns if a is equal to b.
func (a Attr) Equal(b Attr) bool {
return a.Key == b.Key && a.Value.Equal(b.Value)
}

View File

@ -0,0 +1,8 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
/*
Package telemetry provides a lightweight representations of OpenTelemetry
telemetry that is compatible with the OTLP JSON protobuf encoding.
*/
package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"

View File

@ -0,0 +1,103 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
import (
"encoding/hex"
"errors"
"fmt"
)
const (
traceIDSize = 16
spanIDSize = 8
)
// TraceID is a custom data type that is used for all trace IDs.
type TraceID [traceIDSize]byte
// String returns the hex string representation form of a TraceID.
func (tid TraceID) String() string {
return hex.EncodeToString(tid[:])
}
// IsEmpty returns false if id contains at least one non-zero byte.
func (tid TraceID) IsEmpty() bool {
return tid == [traceIDSize]byte{}
}
// MarshalJSON converts the trace ID into a hex string enclosed in quotes.
func (tid TraceID) MarshalJSON() ([]byte, error) {
if tid.IsEmpty() {
return []byte(`""`), nil
}
return marshalJSON(tid[:])
}
// UnmarshalJSON inflates the trace ID from hex string, possibly enclosed in
// quotes.
func (tid *TraceID) UnmarshalJSON(data []byte) error {
*tid = [traceIDSize]byte{}
return unmarshalJSON(tid[:], data)
}
// SpanID is a custom data type that is used for all span IDs.
type SpanID [spanIDSize]byte
// String returns the hex string representation form of a SpanID.
func (sid SpanID) String() string {
return hex.EncodeToString(sid[:])
}
// IsEmpty returns true if the span ID contains at least one non-zero byte.
func (sid SpanID) IsEmpty() bool {
return sid == [spanIDSize]byte{}
}
// MarshalJSON converts span ID into a hex string enclosed in quotes.
func (sid SpanID) MarshalJSON() ([]byte, error) {
if sid.IsEmpty() {
return []byte(`""`), nil
}
return marshalJSON(sid[:])
}
// UnmarshalJSON decodes span ID from hex string, possibly enclosed in quotes.
func (sid *SpanID) UnmarshalJSON(data []byte) error {
*sid = [spanIDSize]byte{}
return unmarshalJSON(sid[:], data)
}
// marshalJSON converts id into a hex string enclosed in quotes.
func marshalJSON(id []byte) ([]byte, error) {
// Plus 2 quote chars at the start and end.
hexLen := hex.EncodedLen(len(id)) + 2
b := make([]byte, hexLen)
hex.Encode(b[1:hexLen-1], id)
b[0], b[hexLen-1] = '"', '"'
return b, nil
}
// unmarshalJSON inflates trace id from hex string, possibly enclosed in quotes.
func unmarshalJSON(dst []byte, src []byte) error {
if l := len(src); l >= 2 && src[0] == '"' && src[l-1] == '"' {
src = src[1 : l-1]
}
nLen := len(src)
if nLen == 0 {
return nil
}
if len(dst) != hex.DecodedLen(nLen) {
return errors.New("invalid length for ID")
}
_, err := hex.Decode(dst, src)
if err != nil {
return fmt.Errorf("cannot unmarshal ID from string '%s': %w", string(src), err)
}
return nil
}

View File

@ -0,0 +1,67 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
import (
"encoding/json"
"strconv"
)
// protoInt64 represents the protobuf encoding of integers which can be either
// strings or integers.
type protoInt64 int64
// Int64 returns the protoInt64 as an int64.
func (i *protoInt64) Int64() int64 { return int64(*i) }
// UnmarshalJSON decodes both strings and integers.
func (i *protoInt64) UnmarshalJSON(data []byte) error {
if data[0] == '"' {
var str string
if err := json.Unmarshal(data, &str); err != nil {
return err
}
parsedInt, err := strconv.ParseInt(str, 10, 64)
if err != nil {
return err
}
*i = protoInt64(parsedInt)
} else {
var parsedInt int64
if err := json.Unmarshal(data, &parsedInt); err != nil {
return err
}
*i = protoInt64(parsedInt)
}
return nil
}
// protoUint64 represents the protobuf encoding of integers which can be either
// strings or integers.
type protoUint64 uint64
// Int64 returns the protoUint64 as a uint64.
func (i *protoUint64) Uint64() uint64 { return uint64(*i) }
// UnmarshalJSON decodes both strings and integers.
func (i *protoUint64) UnmarshalJSON(data []byte) error {
if data[0] == '"' {
var str string
if err := json.Unmarshal(data, &str); err != nil {
return err
}
parsedUint, err := strconv.ParseUint(str, 10, 64)
if err != nil {
return err
}
*i = protoUint64(parsedUint)
} else {
var parsedUint uint64
if err := json.Unmarshal(data, &parsedUint); err != nil {
return err
}
*i = protoUint64(parsedUint)
}
return nil
}

View File

@ -0,0 +1,66 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
)
// Resource information.
type Resource struct {
// Attrs are the set of attributes that describe the resource. Attribute
// keys MUST be unique (it is not allowed to have more than one attribute
// with the same key).
Attrs []Attr `json:"attributes,omitempty"`
// DroppedAttrs is the number of dropped attributes. If the value
// is 0, then no attributes were dropped.
DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"`
}
// UnmarshalJSON decodes the OTLP formatted JSON contained in data into r.
func (r *Resource) UnmarshalJSON(data []byte) error {
decoder := json.NewDecoder(bytes.NewReader(data))
t, err := decoder.Token()
if err != nil {
return err
}
if t != json.Delim('{') {
return errors.New("invalid Resource type")
}
for decoder.More() {
keyIface, err := decoder.Token()
if err != nil {
if errors.Is(err, io.EOF) {
// Empty.
return nil
}
return err
}
key, ok := keyIface.(string)
if !ok {
return fmt.Errorf("invalid Resource field: %#v", keyIface)
}
switch key {
case "attributes":
err = decoder.Decode(&r.Attrs)
case "droppedAttributesCount", "dropped_attributes_count":
err = decoder.Decode(&r.DroppedAttrs)
default:
// Skip unknown.
}
if err != nil {
return err
}
}
return nil
}

View File

@ -0,0 +1,67 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
)
// Scope is the identifying values of the instrumentation scope.
type Scope struct {
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
Attrs []Attr `json:"attributes,omitempty"`
DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"`
}
// UnmarshalJSON decodes the OTLP formatted JSON contained in data into r.
func (s *Scope) UnmarshalJSON(data []byte) error {
decoder := json.NewDecoder(bytes.NewReader(data))
t, err := decoder.Token()
if err != nil {
return err
}
if t != json.Delim('{') {
return errors.New("invalid Scope type")
}
for decoder.More() {
keyIface, err := decoder.Token()
if err != nil {
if errors.Is(err, io.EOF) {
// Empty.
return nil
}
return err
}
key, ok := keyIface.(string)
if !ok {
return fmt.Errorf("invalid Scope field: %#v", keyIface)
}
switch key {
case "name":
err = decoder.Decode(&s.Name)
case "version":
err = decoder.Decode(&s.Version)
case "attributes":
err = decoder.Decode(&s.Attrs)
case "droppedAttributesCount", "dropped_attributes_count":
err = decoder.Decode(&s.DroppedAttrs)
default:
// Skip unknown.
}
if err != nil {
return err
}
}
return nil
}

Some files were not shown because too many files have changed in this diff Show More