Skip to contentSkip to conversation

nvmetcli: ANA configuration support

PATCH New Hannes Reinecke 3 participants 6 messages Jul 27, 2018 – Nov 8, 2018 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvmetcli: ANA configuration support

Add support for ANA configuration.

Signed-off-by Hannes Reinecke <hare at suse.com>
---
 nvmet/__init__.py |  2 +-
 nvmet/nvme.py     | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 nvmetcli          | 61 +++++++++++++++++++++++++++++++++-
 3 files changed, 160 insertions(+), 2 deletions(-)
nvmet/__init__.py +1 -1
index 6542d87..ca05de4 100644
@@ -1 +1 @@
-from .nvme import Root, Subsystem, Namespace, Port, Host, Referral
+from .nvme import Root, Subsystem, Namespace, Port, Host, Referral, ANAGroup
nvmet/nvme.py +99 -0

145 lines not on this page · raw message

nvmetcli +60 -1

88 lines not on this page · raw message

Signature · 1 line
2.13.7
#1 lore raw

PATCH 1/1 nvmetcli: ANA configuration support

I just wanted to apply this in preparation of a new nvmetcli release once Linux 4.19 is released with ANA support, but the code does not seem to work well on kernel without multipath support. E.g.:

Traceback (most recent call last):
File "./nvmetcli", line 735, in <module>

    main()
  File "./nvmetcli", line 717, in main
    funcs[sys.argv[1]](savefile)
  File "./nvmetcli", line 684, in clear
    nvme.Root().clear_existing()
  File "/root/nvmetcli/nvmet/nvme.py", line 315, in clear_existing
    p.delete()
  File "/root/nvmetcli/nvmet/nvme.py", line 676, in delete
    a.delete()

File "/root/nvmetcli/nvmet/nvme.py", line 200, in delete
os.rmdir(self.path)
PermissionError: [Errno 1] Operation not permitted: '/sys/kernel/config/nvmet/ports/2/ana_groups/1'

The new ANA code will probably need similar exception handling as the inline_data_size attribute.

#2 lore raw

PATCH 1/1 nvmetcli: ANA configuration support

Quoted 15 lines · Christoph Hellwig

I just wanted to apply this in preparation of a new nvmetcli release once Linux 4.19 is released with ANA support, but the code does not seem to work well on kernel without multipath support. E.g.:

Traceback (most recent call last):
File "./nvmetcli", line 735, in <module>

    main()
  File "./nvmetcli", line 717, in main
    funcs[sys.argv[1]](savefile)
  File "./nvmetcli", line 684, in clear
    nvme.Root().clear_existing()
  File "/root/nvmetcli/nvmet/nvme.py", line 315, in clear_existing
    p.delete()
  File "/root/nvmetcli/nvmet/nvme.py", line 676, in delete
    a.delete()
Quoted 7 lines

File "/root/nvmetcli/nvmet/nvme.py", line 200, in delete
os.rmdir(self.path)
PermissionError: [Errno 1] Operation not permitted: '/sys/kernel/config/nvmet/ports/2/ana_groups/1'

The new ANA code will probably need similar exception handling as the inline_data_size attribute.

Okay, will be fixing it up.

Cheers,

Hannes

#3 lore raw

PATCH 1/1 nvmetcli: ANA configuration support

Quoted 4 lines · Hannes Reinecke
Quoted 3 lines

The new ANA code will probably need similar exception handling as the inline_data_size attribute.

Okay, will be fixing it up.

Any chance to get a fixed version in the next days? I'd like to cut a new release with it not too long after the 4.19 release so that people can easily use the ANA code.

#4 lore raw

PATCH 1/1 nvmetcli: ANA configuration support

Quoted 9 lines · Christoph Hellwig
Quoted 4 lines · Hannes Reinecke
Quoted 3 lines

The new ANA code will probably need similar exception handling as the inline_data_size attribute.

Okay, will be fixing it up.

Any chance to get a fixed version in the next days? I'd like to cut a new release with it not too long after the 4.19 release so that people can easily use the ANA code.

Do you still plan to resubmit this code?

#5 lore raw

PATCH 1/1 nvmetcli: ANA configuration support

Quoted 5 lines · Christoph Hellwig
Quoted 4 lines · Christoph Hellwig
Quoted 3 lines · Hannes Reinecke
Quoted 3 lines

The new ANA code will probably need similar exception handling as the inline_data_size attribute.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Okay, will be fixing it up.

Any chance to get a fixed version in the next days? I'd like to cut a new release with it not too long after the 4.19 release so that people can easily use the ANA code.

Do you still plan to resubmit this code?

Yes, I'm just testing the changes.
Should be ready by the end of the week.

Cheers,

Hannes