Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to wait until volume/snapshot is deleted #91

Merged
merged 3 commits into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
go-version: [ '1.19' ]
go-version: [ '1.20' ]
steps:
- name: Checkout velero-plugin-for-openstack
uses: actions/checkout@v3
Expand All @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
go-version: [ '1.19' ]
go-version: [ '1.20' ]
env:
VELERO_CLI_VERSION: 1.11.0
# Contains Velero 1.11.0
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,18 @@ configuration:
cloneTimeout: 5m
backupTimeout: 5m
imageTimeout: 5m
# ensures that the Cinder volume/snapshot is removed
# if an original snapshot volume was marked to be deleted, the volume may
# end up in "error_deleting" status.
# if the volume/snapshot is in "error_deleting" status, the plugin will try to reset
# its status (usually extra admin permissions are required) and delete it again
# within the defined "snapshotTimeout" or "cloneTimeout"
ensureDeleted: "true"
# a delay to wait between delete/reset actions when "ensureDeleted" is enabled
ensureDeletedDelay: 10s
# deletes all dependent volume resources (i.e. snapshots) before deleting
# the clone volume (works only, when a snapshot method is set to clone)
cascadeDelete: "true"
# for Manila shared filesystem storage
- name: manila
provider: community.openstack.org/openstack-manila
Expand All @@ -313,6 +325,18 @@ configuration:
shareTimeout: 5m
snapshotTimeout: 5m
cloneTimeout: 5m
# ensures that the Manila share/snapshot is removed
# this is a workaround to the https://bugs.launchpad.net/manila/+bug/2025641 and
# https://bugs.launchpad.net/manila/+bug/1960239 bugs
# if the share/snapshot is in "error_deleting" status, the plugin will try to reset
# its status (usually extra admin permissions are required) and delete it again
# within the defined "snapshotTimeout" or "cloneTimeout"
ensureDeleted: "true"
# a delay to wait between delete/reset actions when "ensureDeleted" is enabled
ensureDeletedDelay: 10s
# deletes all dependent share resources (i.e. snapshots) before deleting
# the clone share (works only, when a snapshot method is set to clone)
cascadeDelete: "true"
initContainers:
- name: velero-plugin-openstack
image: lirt/velero-plugin-for-openstack:v0.5.2
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.3

# --- First stage
FROM --platform=$BUILDPLATFORM golang:1.19-alpine AS build
FROM --platform=$BUILDPLATFORM golang:1.20-alpine AS build

ARG REPOSITORY=Lirt
ARG PLUGIN=velero-plugin-for-openstack
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/Lirt/velero-plugin-for-openstack

go 1.19
go 1.20

require (
github.com/gophercloud/gophercloud v1.3.1-0.20230331133731-6e0b5eac8554
github.com/gophercloud/gophercloud v1.5.1-0.20230728133231-6e4dbe89f68c
github.com/gophercloud/utils v0.0.0-20220927104426-4113af8d2663
github.com/sirupsen/logrus v1.9.0
github.com/spf13/pflag v1.0.5
Expand Down Expand Up @@ -47,7 +47,7 @@ require (
github.com/spf13/cobra v1.4.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect
Expand Down
12 changes: 5 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gophercloud/gophercloud v0.20.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
github.com/gophercloud/gophercloud v1.3.1-0.20230331133731-6e0b5eac8554 h1:NITuyeCL/cDy/CSR38VaiY3sWBKJPGtt2yBWjPes4cU=
github.com/gophercloud/gophercloud v1.3.1-0.20230331133731-6e0b5eac8554/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM=
github.com/gophercloud/gophercloud v1.5.1-0.20230728133231-6e4dbe89f68c h1:Xi8w6F63iRjGDDTo2TZFprPUsIn80Sf3sr7TEwlJWzs=
github.com/gophercloud/gophercloud v1.5.1-0.20230728133231-6e4dbe89f68c/go.mod h1:bYBFIrBndFWHemcJZPYaEy9AuMcWFqvKDtAmzptnlmE=
github.com/gophercloud/utils v0.0.0-20220927104426-4113af8d2663 h1:cHUPA6mgL0RGwopSxYRil6v8mK4ab6yefs1PJRXPXUE=
github.com/gophercloud/utils v0.0.0-20220927104426-4113af8d2663/go.mod h1:qOGlfG6OIJ193/c3Xt/XjOfHataNZdQcVgiu93LxBUM=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
Expand Down Expand Up @@ -277,8 +277,7 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
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.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM=
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
Expand Down Expand Up @@ -339,7 +338,6 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
Expand Down Expand Up @@ -398,8 +396,8 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
Expand Down
Loading