Comment 16 for bug 1665143

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: [Bug 1665143] Re: commissioning does not discover block devices on HP ProLiant DL360 Gen9 servers

On Thu, Feb 23, 2017 at 9:26 AM, Dan Streetman <
<email address hidden>> wrote:

> > Checking that path [/dev/nvme0n1] and is same as link [nvme-nvme.8086-
> > 43564d44343334353030424e34303041474e-494e54454c205353445045444d4534
> 30304734-00000001]
>
> this is the wwid symlink, created by:
> SYMLINK+="disk/by-id/nvme-$attr{wwid}"
>
> > Checking that path [/dev/nvme0n1] and is same as link [nvme-
> > INTEL_SSDPEDME400G4_CVMD434500BN400AGN]
>
> this is the model/serial symlink, created by:
> ENV{ID_SERIAL}="$attr{model}_$env{ID_SERIAL_SHORT}",
> SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}"
>
What seems strange to me is that both links above completely differ in
format from those of a 'scsi' device, which is why I was comparing these to:

For example:

 sdb's [wwn-0x600508b1001c29aef10ecd96f5df2342] vs nvme's [nvme-nvme.
8086-43564d44343334353030424e34303041474e-494e54454c205353445045444d4534
30304734-00000001]

or

sdb's [scsi-3600508b1001c29aef10ecd96f5df2342] vs nmve's [nvme-INTEL_
SSDPEDME400G4_CVMD434500BN400AGN].

This seems a bit inconsistent to me, for example the symlink for sdb's does
not include Model/Serial, where as they do for nvme's. That alone is a
format difference on how the symlinks are being created and which is why I
was asking, as it seems weird to me.

Thanks.

>
>
> > This is the script that gathers the block devices. I looked into it and
> it seems that it is
> > doing the right thing as it is getting the by-id link based on the
> /dev/nvme* path.
>
> def _path_to_idpath(path):
> """Searches dev_disk_byid for a device symlinked to /dev/[path]"""
> if os.path.exists(dev_disk_byid):
> for link in os.listdir(dev_disk_byid):
> if os.path.exists(path) and os.path.samefile(
> os.path.join(dev_disk_byid, link), path):
> return os.path.join(dev_disk_byid, link)
> return None
>
>
> this just searches all the symlinks in /dev/disk/by-id/ and uses the first
> one that points to the target device or partition. That's fine if you
> don't actually care about which of the symlinks you use.
>
> > The result is being rejected because the file path is currently to
> long for the field.
>
> well the max path size needs to be increased then.
>
> --
> You received this bug notification because you are subscribed to MAAS.
> https://bugs.launchpad.net/bugs/1665143
>
> Title:
> commissioning does not discover block devices on HP ProLiant DL360
> Gen9 servers
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1665143/+subscriptions
>

--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer