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

User created flag #115

Merged
merged 2 commits into from
Feb 26, 2024
Merged

User created flag #115

merged 2 commits into from
Feb 26, 2024

Conversation

DamiaSan
Copy link
Contributor

Which issue(s) this PR fixes:

Issue #7578

What this PR does / why we need it:

Special notes for your reviewer:

Additional documentation or context

This PR replace the PR #106, all requested changes have been addressed.

Longhorn 7578

Signed-off-by: Damiano Cipriani <[email protected]>
Longhorn 7578

Signed-off-by: Damiano Cipriani <[email protected]>
Copy link
Member

@innobead innobead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@@ -36,7 +36,7 @@ RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/i
ENV HUGEMEM=1024
RUN echo "vm.nr_hugepages=$((HUGEMEM/2))" >> /etc/sysctl.conf
ENV SPDK_DIR /usr/src/spdk
ENV SPDK_COMMIT_ID 72b7762674cc35262086b185a455a8a30f46432d
ENV SPDK_COMMIT_ID 7a25c3c5a102dfb2d8715f9bf090691176de5ef7
Copy link
Member

@innobead innobead Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DamiaSan remember to update the latest revision later, 6925ca6543e4ad5a5e3a5db09217ae16bf939831.

@innobead innobead merged commit 29a04f4 into longhorn:main Feb 26, 2024
4 checks passed
@derekbit
Copy link
Member

@DamiaSan

I found c2ba0e8 makes the unit test failed. Can you help check it?

Step to reproduce:

git clone https://github.com/longhorn/longhorn-spdk-engine.git
git checkout 29a04f44d5be5c1484c3e97d2551b65c6f411656
echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
modprobe uio_pci_generic
modprobe nvme-tcp
make

Then, you can see the errors

........

goroutine 32908 [select]:
github.com/longhorn/go-spdk-helper/pkg/jsonrpc.(*Client).SendMsgAsyncWithTimeout(0xc003275860, {0xe9314b, 0x13}, {0xdf5720, 0xc01a654e00}, 0x0?)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/github.com/longhorn/go-spdk-helper/pkg/jsonrpc/client.go:290 +0x911
github.com/longhorn/go-spdk-helper/pkg/jsonrpc.(*Client).SendCommand(...)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/github.com/longhorn/go-spdk-helper/pkg/jsonrpc/client.go:315
github.com/longhorn/go-spdk-helper/pkg/spdk/client.(*Client).BdevLvolGetXattr(0xc001998288, {0x0, 0x0}, {0xe924f0, 0x12})
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/client/basic.go:218 +0xff
github.com/longhorn/go-spdk-helper/pkg/spdk/client.(*Client).BdevLvolGet(0xc001998288, {0x0, 0x0}, 0x0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/client/basic.go:275 +0x127b
github.com/longhorn/longhorn-spdk-engine/pkg/spdk.GetBdevLvolMap(0xc001998288?)
        /go/src/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/types.go:96 +0x45
github.com/longhorn/longhorn-spdk-engine/pkg/spdk.(*Replica).RebuildingDstSnapshotRevert(0xc00e389a20, 0xc0049ed530?, {0xc01943ed2a, 0x6})
        /go/src/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/replica.go:1528 +0xaea
github.com/longhorn/longhorn-spdk-engine/pkg/spdk.(*Server).ReplicaRebuildingDstSnapshotRevert(0xc000258d20, {0xc01943d3b0?, 0x448985?}, 0xc01943d3b0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/server.go:682 +0x372
github.com/longhorn/longhorn-spdk-engine/proto/spdkrpc._SPDKService_ReplicaRebuildingDstSnapshotRevert_Handler({0xe7f540?, 0xc000258d20}, {0xfc39a8, 0xc019443650}, 0xc0183bf680, 0x0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/proto/spdkrpc/spdk.pb.go:5783 +0x231
google.golang.org/grpc.(*Server).processUnaryRPC(0xc003d75400, {0xfc39a8, 0xc0194435c0}, {0xfc6d78, 0xc0110fa4e0}, 0xc01942d7a0, 0xc0042ac0c0, 0x1450d28, 0x0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/google.golang.org/grpc/server.go:1372 +0x1903
google.golang.org/grpc.(*Server).handleStream(0xc003d75400, {0xfc6d78, 0xc0110fa4e0}, 0xc01942d7a0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/google.golang.org/grpc/server.go:1783 +0x19b2
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/google.golang.org/grpc/server.go:1016 +0xb9
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 31197
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/google.golang.org/grpc/server.go:1027 +0x205

goroutine 32927 [select]:
github.com/longhorn/go-spdk-helper/pkg/jsonrpc.(*Client).SendMsgAsyncWithTimeout(0xc003275860, {0xe9314b, 0x13}, {0xdf5720, 0xc01a654d60}, 0x0?)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/github.com/longhorn/go-spdk-helper/pkg/jsonrpc/client.go:290 +0x911
github.com/longhorn/go-spdk-helper/pkg/jsonrpc.(*Client).SendCommand(...)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/github.com/longhorn/go-spdk-helper/pkg/jsonrpc/client.go:315
github.com/longhorn/go-spdk-helper/pkg/spdk/client.(*Client).BdevLvolGetXattr(0xc001998288, {0x0, 0x0}, {0xe924f0, 0x12})
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/client/basic.go:218 +0xff
github.com/longhorn/go-spdk-helper/pkg/spdk/client.(*Client).BdevLvolGet(0xc001998288, {0x0, 0x0}, 0x0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/client/basic.go:275 +0x127b
github.com/longhorn/longhorn-spdk-engine/pkg/spdk.GetBdevLvolMap(0xc001998288?)
        /go/src/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/types.go:96 +0x45
github.com/longhorn/longhorn-spdk-engine/pkg/spdk.(*Replica).RebuildingDstSnapshotRevert(0xc004237a20, 0xc0049ed530?, {0xc01957f7ca, 0x6})
        /go/src/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/replica.go:1528 +0xaea
github.com/longhorn/longhorn-spdk-engine/pkg/spdk.(*Server).ReplicaRebuildingDstSnapshotRevert(0xc000258d20, {0xc019650eb0?, 0x448985?}, 0xc019650eb0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/server.go:682 +0x372
github.com/longhorn/longhorn-spdk-engine/proto/spdkrpc._SPDKService_ReplicaRebuildingDstSnapshotRevert_Handler({0xe7f540?, 0xc000258d20}, {0xfc39a8, 0xc019658b70}, 0xc01824d200, 0x0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/proto/spdkrpc/spdk.pb.go:5783 +0x231
google.golang.org/grpc.(*Server).processUnaryRPC(0xc003d75400, {0xfc39a8, 0xc019658ae0}, {0xfc6d78, 0xc012bd3520}, 0xc0196530e0, 0xc0042ac0c0, 0x1450d28, 0x0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/google.golang.org/grpc/server.go:1372 +0x1903
google.golang.org/grpc.(*Server).handleStream(0xc003d75400, {0xfc6d78, 0xc012bd3520}, 0xc0196530e0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/google.golang.org/grpc/server.go:1783 +0x19b2
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/google.golang.org/grpc/server.go:1016 +0xb9
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 30096
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/google.golang.org/grpc/server.go:1027 +0x205

goroutine 32897 [select]:
github.com/longhorn/go-spdk-helper/pkg/jsonrpc.(*Client).SendMsgAsyncWithTimeout(0xc003275860, {0xe9314b, 0x13}, {0xdf5720, 0xc01a654e80}, 0x0?)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/github.com/longhorn/go-spdk-helper/pkg/jsonrpc/client.go:290 +0x911
github.com/longhorn/go-spdk-helper/pkg/jsonrpc.(*Client).SendCommand(...)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/github.com/longhorn/go-spdk-helper/pkg/jsonrpc/client.go:315
github.com/longhorn/go-spdk-helper/pkg/spdk/client.(*Client).BdevLvolGetXattr(0xc001998288, {0x0, 0x0}, {0xe8dedf, 0xc})
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/client/basic.go:218 +0xff
github.com/longhorn/go-spdk-helper/pkg/spdk/client.(*Client).BdevLvolGet(0xc001998288, {0x0, 0x0}, 0x0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/client/basic.go:271 +0x1187
github.com/longhorn/longhorn-spdk-engine/pkg/spdk.GetBdevLvolMap(0xc001998288?)
        /go/src/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/types.go:96 +0x45
github.com/longhorn/longhorn-spdk-engine/pkg/spdk.(*Replica).RebuildingDstSnapshotRevert(0xc00fd72dc0, 0xc0049ed530?, {0xc01a328baa, 0x6})
        /go/src/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/replica.go:1528 +0xaea
github.com/longhorn/longhorn-spdk-engine/pkg/spdk.(*Server).ReplicaRebuildingDstSnapshotRevert(0xc000258d20, {0xc01a3273b0?, 0x448985?}, 0xc01a3273b0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/server.go:682 +0x372
github.com/longhorn/longhorn-spdk-engine/proto/spdkrpc._SPDKService_ReplicaRebuildingDstSnapshotRevert_Handler({0xe7f540?, 0xc000258d20}, {0xfc39a8, 0xc01a330ba0}, 0xc0176fba80, 0x0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/proto/spdkrpc/spdk.pb.go:5783 +0x231
google.golang.org/grpc.(*Server).processUnaryRPC(0xc003d75400, {0xfc39a8, 0xc01a330ae0}, {0xfc6d78, 0xc0112cd380}, 0xc019e079e0, 0xc0042ac0c0, 0x1450d28, 0x0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/google.golang.org/grpc/server.go:1372 +0x1903
google.golang.org/grpc.(*Server).handleStream(0xc003d75400, {0xfc6d78, 0xc0112cd380}, 0xc019e079e0)
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/google.golang.org/grpc/server.go:1783 +0x19b2
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/google.golang.org/grpc/server.go:1016 +0xb9
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 31384
        /go/src/github.com/longhorn/longhorn-spdk-engine/vendor/google.golang.org/grpc/server.go:1027 +0x205
FAIL    github.com/longhorn/longhorn-spdk-engine/pkg    300.525s
=== RUN   Test 
OK: 1 passed <====== IGNORE THIS LINE!
--- PASS: Test (0.00s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants