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

fix(disk): Fix serial_from_device for virtio-block disks #1208

Merged
merged 2 commits into from May 15, 2018
Merged

Conversation

themylogin
Copy link
Contributor

Ticket: #33237

output = (await p1.communicate())[0].decode()
search = re.search(r'Serial Number:\s+(?P<serial>.+)', output, re.I)
if search:
return search.group('serial')
Copy link
Member

Choose a reason for hiding this comment

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

If smart cant be detected I would think we have to try and get the serial using geom.

virtio-block can have serials which in this case would be empty.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@william-gr why not always use geom in the first place then?

Copy link
Member

Choose a reason for hiding this comment

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

@themylogin because geom cannot get the serial from "especial" devices (e.g. mfid, rocket raid, etc)

Copy link
Member

@william-gr william-gr left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@themylogin themylogin merged commit b57f49b into master May 15, 2018
@themylogin themylogin deleted the FIX-33237 branch May 15, 2018 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants