Discussion:
[Review Request] 1765: assert triggered in libzfs_import.c trying to import pool name beginning with a number
Prasad Joshi
2013-08-08 14:31:32 UTC
Permalink
Hello All,

Importing a pool with name starting with number followed by alphabet
fails assertion error.

# zpool import 12a
Assertion failed: import->poolname == 0 || import->guid == 0, file
../common/libzfs_import.c, line 1467, function zpool_search_import
Abort (core dumped)

zpool import works with poolname as well as guid of the pool. The
function zpool_do_import(), which is responsible for importing the
pool, by default assumes importing pool using GUID. However, if the
given string, has alphabets, it assumes import using poolname.
However, in this case the extracted part of GUID is not reset and
therefore it asserts in pool search.

Webrev: http://cr.illumos.org/~webrev/Prasad/illumos-1765-wenrev/
Issue Tracker: https://illumos.org/issues/1765

Thanks and Regards,
Prasad
Prasad Joshi
2013-08-09 18:44:22 UTC
Permalink
Post by Prasad Joshi
Hello All,
Importing a pool with name starting with number followed by alphabet
fails assertion error.
# zpool import 12a
Assertion failed: import->poolname == 0 || import->guid == 0, file
../common/libzfs_import.c, line 1467, function zpool_search_import
Abort (core dumped)
zpool import works with poolname as well as guid of the pool. The
function zpool_do_import(), which is responsible for importing the
pool, by default assumes importing pool using GUID. However, if the
given string, has alphabets, it assumes import using poolname.
However, in this case the extracted part of GUID is not reset and
therefore it asserts in pool search.
Webrev: http://cr.illumos.org/~webrev/Prasad/illumos-1765-wenrev/
Issue Tracker: https://illumos.org/issues/1765
Can anyone please review this?

Thanks in advance.
Prasad
Post by Prasad Joshi
Thanks and Regards,
Prasad
Garrett D'Amore
2013-08-09 19:13:19 UTC
Permalink
Looks reasonable to me.

- Garrett
Post by Prasad Joshi
Post by Prasad Joshi
Hello All,
Importing a pool with name starting with number followed by alphabet
fails assertion error.
# zpool import 12a
Assertion failed: import->poolname == 0 || import->guid == 0, file
../common/libzfs_import.c, line 1467, function zpool_search_import
Abort (core dumped)
zpool import works with poolname as well as guid of the pool. The
function zpool_do_import(), which is responsible for importing the
pool, by default assumes importing pool using GUID. However, if the
given string, has alphabets, it assumes import using poolname.
However, in this case the extracted part of GUID is not reset and
therefore it asserts in pool search.
Webrev: http://cr.illumos.org/~webrev/Prasad/illumos-1765-wenrev/
Issue Tracker: https://illumos.org/issues/1765
Can anyone please review this?
Thanks in advance.
Prasad
Post by Prasad Joshi
Thanks and Regards,
Prasad
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/22035932-85c5d227
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
Matthew Ahrens
2013-08-10 17:16:32 UTC
Permalink
Looks good, thanks for fixing this Prasad.

--matt
Post by Prasad Joshi
Hello All,
Importing a pool with name starting with number followed by alphabet
fails assertion error.
# zpool import 12a
Assertion failed: import->poolname == 0 || import->guid == 0, file
../common/libzfs_import.c, line 1467, function zpool_search_import
Abort (core dumped)
zpool import works with poolname as well as guid of the pool. The
function zpool_do_import(), which is responsible for importing the
pool, by default assumes importing pool using GUID. However, if the
given string, has alphabets, it assumes import using poolname.
However, in this case the extracted part of GUID is not reset and
therefore it asserts in pool search.
Webrev: http://cr.illumos.org/~webrev/Prasad/illumos-1765-wenrev/
Issue Tracker: https://illumos.org/issues/1765
Thanks and Regards,
Prasad
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/21635000-ebd1d460
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com

Loading...