Skip to content

osd nfs enumerate and osd nfs inspect <volume> commands raise exception #2047

@katkalov

Description

@katkalov

Is this a BUG REPORT or FEATURE REQUEST?:
BUG

What happened:
Calling osd nfs enumerate raises exception with nfs volume driver enabled:

[panic: reflect.Value.Interface: cannot return value obtained from unexported field or method

goroutine 1 [running]:
reflect.valueInterface({0x21ef260, 0xc0002fe300, 0x36}, 0x1)
	/usr/local/go/src/reflect/value.go:1441 +0x225
reflect.Value.Interface({0x21ef260, 0xc0002fe300, 0x36})
	/usr/local/go/src/reflect/value.go:1430 +0x45
github.com/libopenstorage/openstorage/pkg/jsonpb.(*Marshaler).marshalValue(0x3290970, 0xc00068ce60, 0xc000612320, {0x23fdce0, 0xc0002fe300, 0x1b9}, {0x0, 0x0})
	/tmp/openstorage/pkg/jsonpb/jsonpb.go:307 +0x5f4
github.com/libopenstorage/openstorage/pkg/jsonpb.(*Marshaler).marshalField(0x3290970, 0xc00068ce60, 0xc000612320, {0x23fdce0, 0xc0002fe300, 0x1b9}, {0x0, 0x0})
	/tmp/openstorage/pkg/jsonpb/jsonpb.go:231 +0x19c
github.com/libopenstorage/openstorage/pkg/jsonpb.(*Marshaler).marshalObject(0x3290970, 0xc00068ce60, {0x2727228, 0xc0002fe300}, {0x0, 0x0})
	/tmp/openstorage/pkg/jsonpb/jsonpb.go:162 +0x60c
github.com/libopenstorage/openstorage/pkg/jsonpb.(*Marshaler).Marshal(0x3290970, {0x27159a0, 0xc00057def0}, {0x2727228, 0xc0002fe300})
	/tmp/openstorage/pkg/jsonpb/jsonpb.go:98 +0xe6
github.com/libopenstorage/openstorage/pkg/jsonpb.(*Marshaler).MarshalToString(0x3290970, {0x2727228, 0xc0002fe300})
	/tmp/openstorage/pkg/jsonpb/jsonpb.go:104 +0xa7
github.com/libopenstorage/openstorage/cli.cmdMarshalProto({0x2727228, 0xc0002fe300}, 0x0)
	/tmp/openstorage/cli/messages.go:98 +0xb4
github.com/libopenstorage/openstorage/cli.cmdOutputVolumes({0xc0000c4af0, 0x7, 0x9}, 0x0)
	/tmp/openstorage/cli/volumes.go:553 +0x148
github.com/libopenstorage/openstorage/cli.(*volDriver).volumeEnumerate(0xc0001522a0, 0xc000178640)
	/tmp/openstorage/cli/volumes.go:262 +0x319
github.com/codegangsta/cli.Command.Run({{0x254682f, 0x9}, {0x0, 0x0}, {0xc0003230e0, 0x1, 0x1}, {0x2552238, 0x11}, {0x0, ...}, ...}, ...)
	/tmp/openstorage/vendor/github.com/codegangsta/cli/command.go:179 +0x1543
github.com/codegangsta/cli.(*App).RunAsSubcommand(0xc000327b80, 0xc000178280)
	/tmp/openstorage/vendor/github.com/codegangsta/cli/app.go:307 +0xd45
github.com/codegangsta/cli.Command.startApp({{0x253f336, 0x3}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0xc000054768, 0x12}, {0x0, ...}, ...}, ...)
	/tmp/openstorage/vendor/github.com/codegangsta/cli/command.go:261 +0x894
github.com/codegangsta/cli.Command.Run({{0x253f336, 0x3}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0xc000054768, 0x12}, {0x0, ...}, ...}, ...)
	/tmp/openstorage/vendor/github.com/codegangsta/cli/command.go:70 +0x7c
github.com/codegangsta/cli.(*App).Run(0xc000327a20, {0xc00012a150, 0x3, 0x3})
	/tmp/openstorage/vendor/github.com/codegangsta/cli/app.go:196 +0x1138
main.main()
	/tmp/openstorage/cmd/osd/main.go:257 +0x19af

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):
config.yml:

---
osd:
  cluster:
    nodeid: "1"
    clusterid: "deadbeeef"
  drivers:
    nfs:
      server: "192.168.1.1"
      path: "/nfs"

Run osd daemon:
osd -d -f config.yaml

Create a volume:
osd nfs create 100 --size 100

Try to enumerate:
osd nfs enumerate <- the exception raises here

Try to inspect:
osd nfs inspect 100 <- the exception raises here

Anything else we need to know?:

Environment:

  • Container Orchestrator and version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
Linux 5.4.0-1061-kvm #64-Ubuntu SMP Thu Mar 24 20:55:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions