threefoldtech / 0-db-fs

Apache License 2.0
2 stars 1 forks source link

Manually specifying namespaces no longer works #45

Open scottyeager opened 3 weeks ago

scottyeager commented 3 weeks ago

I noticed that in v0.1.11, trying to set namespaces individually and manually no longer works:

# /usr/local/bin/zdbfs \
  -o mh=2a02:1802:5e:0:c11:7dff:fe8e:83bb \
  -o mp=9900 \
  -o mn=18-622157-meta0 \
  -o ms=password \
  -o dh=2a02:1802:5e:0:c11:7dff:fe8e:83bb \
  -o dp=9900 \
  -o dn=18-622159-data0 \
  -o ds=password \
  -o th=2a02:1802:5e:0:c11:7dff:fe8e:83bb \
  -o tp=9900 \
  -o tn=18-622158-temp0 \
  -o ts=password \
  /mnt
[+] initializing zdbfs v0.1.11
[+] blocks cache size: 4096 KB
[+] virtual filesystem size: 10.0 GB
[-] zdb: select: zdbfs-meta: Namespace not found

It works as expected in v0.1.10, so I guess this has to do with the supported added for specifying the host, port, and socket universally.

scottyeager commented 3 weeks ago

I see the issue now. To facilitate the global options, the code that sets defaults was moved to after the call to the parsing function. While this is needed for options that have a global, and will be handled properly, for the other options it means the default is always used.