Git Product home page Git Product logo

blivet's People

Contributors

adamwill avatar alexanderlaw avatar aszlig avatar atodorov avatar bcl avatar berrange avatar clumens avatar damarlin avatar dashea avatar dwlehman avatar hamzy avatar japokorn avatar jkonecny12 avatar jsafrane avatar jstodola avatar kellinm avatar m4rtink avatar mulkieran avatar nullr0ute avatar poncovka avatar rvykydal avatar sharkcz avatar sharpenedblade avatar snbueno avatar tbzatek avatar vathpela avatar vladimirslavik avatar vojtechtrefny avatar vpodzime avatar wgwoods avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blivet's Issues

error handling consistency

Establish some conventions for error handling, document them, and implement them.

Some ideas:

  • don't raise built-in python exceptions like ValueError
    • expand blivet.errors as needed
  • when to raise an exception versus returning an error code
    • return values would make unit testing cleaner/easier than exn regex
  • when/whether to log exceptions (before raise -v- in except)
  • audit exception messages for clarity/accuracy
    • blivet.partitioning could use some improved clarity and accuracy

document blivet's public API

Since we're switching to a python-tailored variation on semver we need to document the full API. We talked about this already, including whether to use a blacklist or a whitelist. As I recall, we tentatively leaned toward a blacklist. As I'm writing this I'm still on the fence, as part of me thinks we should be both explicit and aggressive by specifying the full API as a whitelist.

contributing guidelines are way too long

I have serious doubts about anyone actually reading it because of its length. Surely we can reduce it to a manageable size. People submit PRs every day, and they aren't very different from other projects' PRs.

pvscan will fail if it is created new volume group on OS without lvm cache.

I work with LVM with openlmi-storage which uses python-blivet.
Many tests finished successfully. But I found one moment:
CreateOrModifyVG from openlmi-storage calling blivet functions failed with some text:
"Creating volume group newvolume...
PercentComplete: 100%
Errors: 1
CIMStatusCode: 1
ErrorSourceFormat: 0
Message: pvscan failed for /dev/sda3: running lvm pvscan --cache /dev/sda3 --config devices { preferred_names=["^/dev/mapper/", "^/dev/md/", "^/dev/sd"] } failed
MessageArguments: []
RecommendedActions: []"

Text with "pvscan failed ..." came from blivet.

Conditions of this moment:
a. The clear OS (not Fedora) on VBox 4.2.18.
b. I create volume group with /dev/sda1, /dev/sda3, /dev/sda3 (for example).
c. The lvm daemon is absent and lvm doesn't have the cache because I do nothing with LVM utils.
I have other tests and the test with CreateOrModifyVG and existing cache finished successfully.

Reason of this behavior is in package python-blivet-1.0.5, lvmpv.py, function create():
<..>
try:
DeviceFormat.create(self, **kwargs)
# Consider use of -Z|--zero
# -f|--force or -y|--yes may be required

        # lvm has issues with persistence of metadata, so here comes the
        # hammer...
        DeviceFormat.destroy(self, **kwargs)
        #lvm.pvscan(self.device)
        lvm.pvcreate(self.device, data_alignment=self.dataAlignment)
    except Exception:
        raise
    finally:
        #lvm.pvscan(self.device)
        pass

<..>
I commented string with lvm.pvscan(self.device) and the new volume group was created successfully.
I find new versions of blivet which contain the similar code in new versions.
But I don't test new package and in new versions find the comment with "hammer..."
Do you find some variant why I mustn't comment and have a good solution on clear system without lvm cache?

No handlers could be found for logger "program"

Hi I am trying to start "blivet-gui" and python-blivet library throws an exception

[anatol@argo python2-blivet]$ sudo blivet-gui 
No handlers could be found for logger "program"
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/blivetgui/main.py", line 101, in <module>
    if  __name__ =='__main__':main()
  File "/usr/lib/python2.7/site-packages/blivetgui/main.py", line 95, in main
    MainWindow = main_window()
  File "/usr/lib/python2.7/site-packages/blivetgui/main_window.py", line 59, in main_window
    l = ListDevices(MainWindow, builder, kickstart)
  File "/usr/lib/python2.7/site-packages/blivetgui/list_devices.py", line 64, in __init__
    self.b = BlivetUtils(self.main_window, kickstart)
  File "/usr/lib/python2.7/site-packages/blivetgui/utils.py", line 155, in __init__
    self.storage.reset()
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 426, in reset
    self.devicetree.populate(cleanupOnly=cleanupOnly)
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 2033, in populate
    self._populate()
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 2092, in _populate
    self.addUdevDevice(dev)
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1131, in addUdevDevice
    device = self.addUdevDiskDevice(info)
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 996, in addUdevDiskDevice
    if devicelibs.mpath.is_multipath_member(device.path):
  File "/usr/lib/python2.7/site-packages/blivet/devicelibs/mpath.py", line 14, in is_multipath_member
    return (util.run_program(["multipath", "-c", path]) == 0)
  File "/usr/lib/python2.7/site-packages/blivet/util.py", line 59, in run_program
    return _run_program(*args, **kwargs)[0]
  File "/usr/lib/python2.7/site-packages/blivet/util.py", line 43, in _run_program
    preexec_fn=chroot, cwd=root, env=env)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Anaconda crashes on f22 and f23 cobbler installation with lvm: Volume group given physical extent size of "4 MiB", but must be one of: 1 KiB

Here you have validation, at https://github.com/rhinstaller/anaconda/blob/f23-branch/pyanaconda/kickstart.py (1790-1795 lines):

possible_extents = LVMVolumeGroupDevice.get_supported_pe_sizes()
if pesize not in possible_extents:
raise KickstartValueError(formatErrorMsg(self.lineno,
msg=_("Volume group given physical extent size of "%(extentSize)s", but must be one of:\n%(validExtentSizes)s.") %
{"extentSize": pesize, "validExtentSizes": ", ".join(str(e) for e in possible_extents)}))

trying to investigate it, i found out that:
from blivet.devices.lvm import LVMVolumeGroupDevice

moving forward, from blivet(https://github.com/rhinstaller/blivet/blob/f23-branch/blivet/devices/lvm.py):
def get_supported_pe_sizes():
return [Size(pe_size) for pe_size in blockdev.lvm.get_supported_pe_sizes()]

and blockdev is imported as:

import gi
gi.require_version("BlockDev", "1.0")

from gi.repository import BlockDev as blockdev

when i tried it out, i got something like this:

from gi.repository import BlockDev
dir(BlockDev)
['BTRFS_MAIN_VOLUME_ID', 'BTRFS_MIN_MEMBER_SIZE', 'BlockDevError', 'BlockDevNotImplementedError', 'BtrfsDeviceInfo', 'BtrfsError', 'BtrfsFilesystemInfo', 'BtrfsSubvolumeInfo', 'CRYPTO_LUKS_METADATA_SIZE', 'CryptoError', 'DMError', 'InitError', 'LVMError', 'LVMLVdata', 'LVMPVdata', 'LVMVGdata', 'LVM_DEFAULT_PE_SIZE', 'LVM_DEFAULT_PE_START', 'LVM_MAX_LV_SIZE', 'LVM_MAX_PE_SIZE', 'LVM_MAX_THPOOL_CHUNK_SIZE', 'LVM_MAX_THPOOL_MD_SIZE', 'LVM_MIN_PE_SIZE', 'LVM_MIN_THPOOL_CHUNK_SIZE', 'LVM_MIN_THPOOL_MD_SIZE', 'LoopError', 'MDDetailData', 'MDError', 'MDExamineData', 'MDRaidError', 'MD_CHUNK_SIZE', 'MD_SUPERBLOCK_SIZE', 'MpathError', 'Plugin', 'PluginSpec', 'SwapError', 'UtilsError', 'UtilsExecError', 'UtilsSizeError', 'class', 'delattr', 'dict', 'dir', 'doc', 'file', 'format', 'getattr', 'getattribute', 'hash', 'init', 'loader', 'module', 'name', 'new', 'path', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'weakref', '_introspection_module', '_load', '_namespace', '_overrides_module', '_version', 'btrfs', 'btrfs_add_device', 'btrfs_change_label', 'btrfs_check', 'btrfs_create_snapshot', 'btrfs_create_subvolume', 'btrfs_create_volume', 'btrfs_delete_subvolume', 'btrfs_filesystem_info', 'btrfs_get_default_subvolume_id', 'btrfs_list_devices', 'btrfs_list_subvolumes', 'btrfs_mkfs', 'btrfs_remove_device', 'btrfs_repair', 'btrfs_resize', 'btrfs_set_default_subvolume', 'crypto', 'crypto_device_is_luks', 'crypto_escrow_device', 'crypto_generate_backup_passphrase', 'crypto_luks_add_key', 'crypto_luks_change_key', 'crypto_luks_close', 'crypto_luks_format', 'crypto_luks_open', 'crypto_luks_remove_key', 'crypto_luks_resize', 'crypto_luks_status', 'crypto_luks_uuid', 'dm', 'dm_activate_raid_set', 'dm_create_linear', 'dm_deactivate_raid_set', 'dm_get_member_raid_sets', 'dm_get_raid_set_type', 'dm_map_exists', 'dm_name_from_node', 'dm_node_from_name', 'dm_remove', 'func_available', 'get_available_plugin_names', 'init', 'is_initialized', 'is_plugin_available', 'loop', 'loop_get_backing_file', 'loop_get_loop_name', 'loop_setup', 'loop_teardown', 'lvm', 'lvm_get_global_config', 'lvm_get_lv_physical_size', 'lvm_get_max_lv_size', 'lvm_get_supported_pe_sizes', 'lvm_get_thpool_padding', 'lvm_is_supported_pe_size', 'lvm_is_valid_thpool_chunk_size', 'lvm_is_valid_thpool_md_size', 'lvm_lvactivate', 'lvm_lvcreate', 'lvm_lvdeactivate', 'lvm_lvinfo', 'lvm_lvorigin', 'lvm_lvremove', 'lvm_lvresize', 'lvm_lvs', 'lvm_lvsnapshotcreate', 'lvm_lvsnapshotmerge', 'lvm_pvcreate', 'lvm_pvinfo', 'lvm_pvmove', 'lvm_pvremove', 'lvm_pvresize', 'lvm_pvs', 'lvm_pvscan', 'lvm_round_size_to_pe', 'lvm_set_global_config', 'lvm_thlvcreate', 'lvm_thlvpoolname', 'lvm_thpoolcreate', 'lvm_thsnapshotcreate', 'lvm_vgactivate', 'lvm_vgcreate', 'lvm_vgdeactivate', 'lvm_vgextend', 'lvm_vginfo', 'lvm_vgreduce', 'lvm_vgremove', 'lvm_vgs', 'md', 'md_activate', 'md_add', 'md_canonicalize_uuid', 'md_create', 'md_deactivate', 'md_denominate', 'md_destroy', 'md_detail', 'md_examine', 'md_get_md_uuid', 'md_get_superblock_size', 'md_name_from_node', 'md_node_from_name', 'md_nominate', 'md_remove', 'md_run', 'mpath', 'mpath_flush_mpaths', 'mpath_is_mpath_member', 'mpath_set_friendly_names', 'plugin_specs_from_names', 'reinit', 'swap', 'swap_mkswap', 'swap_swapoff', 'swap_swapon', 'swap_swapstatus', 'try_init', 'utils', 'utils_check_util_version', 'utils_exec_and_capture_output', 'utils_exec_and_report_error', 'utils_init_logging', 'utils_size_from_spec', 'utils_size_human_readable', 'utils_version_cmp']
dir(BlockDev.lvm)
['get_global_config', 'get_lv_physical_size', 'get_max_lv_size', 'get_supported_pe_sizes', 'get_thpool_padding', 'is_supported_pe_size', 'is_valid_thpool_chunk_size', 'is_valid_thpool_md_size', 'lvactivate', 'lvcreate', 'lvdeactivate', 'lvinfo', 'lvorigin', 'lvremove', 'lvresize', 'lvs', 'lvsnapshotcreate', 'lvsnapshotmerge', 'pvcreate', 'pvinfo', 'pvmove', 'pvremove', 'pvresize', 'pvs', 'pvscan', 'round_size_to_pe', 'set_global_config', 'thlvcreate', 'thlvpoolname', 'thpoolcreate', 'thsnapshotcreate', 'vgactivate', 'vgcreate', 'vgdeactivate', 'vgextend', 'vginfo', 'vgreduce', 'vgremove', 'vgs']

BlockDev.lvm.get_supported_pe_sizes()

** (process:32694): CRITICAL **: The function 'bd_lvm_get_supported_pe_sizes' called, but not implemented!
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/site-packages/gi/overrides/BlockDev.py", line 376, in wrapped
raise self._xrules[e_type].new_exc(msg)
gi.overrides.BlockDev.BlockDevNotImplementedError: The function 'bd_lvm_get_supported_pe_sizes' called, but not implemented!

So, it should be implemented first, or validation based on this function should not used in production stage. If i made some mistakes, please correct me.

Regards, slavikvin.

release archives are unusable for rpm build

The archives are useless for several reasons. The release tagged blivet-0.61 has an associated archive with a top-level of blivet-blivet-0.61/. Also, there are no translations in the archive tarballs. It looks like we can add something to the Makefile to upload our own release tarballs to github -- see here.

Luckily this has not been a problem due to dist-git storing and using the tarballs we provide instead of grabbing Source0 from the spec file.

integrate with libblockdev

Once libblockdev is complete we will want to replace most, if not all, of blivet.devicelibs with calls to libblockdev.

rename program.log to external.log

Now that libblockdev may use DBus for LVM instead of running binaries it may log DBus calls instead of information about spawning processes. Thus external.log is a more appropriate name than program.log.

SSD awareness

Add support for detection and intelligent use of SSDs.

Motivation

SSD are increasingly common and are known to be good for some things (eg: /usr, /etc) and not so good for other things (eg: swap, /home). It would be useful if blivet could make intelligent decisions when creating storage layouts on systems that include an SSD.

Requirements
  1. be able to differentiate SSD from spinning disks or removable flash drives
    • (optionally) also differentiate locally-attached disks from network-attached disks
  2. make intelligent use of SSD when allocating partitions
    • avoid SSD: swap, /home
    • prefer SSD: /usr, /
  3. (optionally) extend these concepts to factor in relative cost of local versus network-attached disks when
    allocating partitions
    • eg: avoid putting swap on networked storage

This should be confined to a couple of methods/properties in StorageDevice and some additional logic in blivet.partitioning. LVM is going to make it slightly more complicated: we might have to start specifying which PV to allocate certain LVs' extents from or even create multiple VGs.

We can also explore the possibility of adding another class for USB since they are generally slower than other local disks.

Related: issue 19 (cache lv support)

make test failures with Python2

I executed this as regular user (not root) using the code in the master branch (checked out today) on a system which was updated from Rawhide repos before running the tests.

======================================================================
ERROR: testAvailabilityMDRAIDplugin (devices_test.dependencies_test.MockingDeviceDependenciesTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/devices_test/dependencies_test.py", line 64, in testAvailabilityMDRAIDplugin
    self.assertIsNotNone(ActionCreateFormat(self.luks, fmt=getFormat("macefi")))
  File "blivet/deviceaction.py", line 530, in __init__
    raise ValueError("resource to create this format %s is unavailable" % fmt)
ValueError: resource to create this format non-existent macefi filesystem is unavailable

======================================================================
ERROR: testGetLabelArgs (formats_test.labeling_test.MethodsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/labeling_test.py", line 73, in testGetLabelArgs
    reiserfs = self.fs["reiserfs"]
KeyError: 'reiserfs'

======================================================================
ERROR: testActionDependencies (action_test.DeviceActionTestCase)
Verify correct functioning of action dependencies.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/action_test.py", line 944, in testActionDependencies
    format_lv = ActionCreateFormat(testlv, fmt)
  File "blivet/deviceaction.py", line 530, in __init__
    raise ValueError("resource to create this format %s is unavailable" % fmt)
ValueError: resource to create this format non-existent None is unavailable

======================================================================
ERROR: testContainerActions (action_test.DeviceActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/action_test.py", line 1122, in testContainerActions
    fmt=new_lv_format)
  File "tests/storagetestcase.py", line 245, in scheduleCreateFormat
    action = blivet.deviceaction.ActionCreateFormat(device, fmt)
  File "blivet/deviceaction.py", line 530, in __init__
    raise ValueError("resource to create this format %s is unavailable" % fmt)
ValueError: resource to create this format non-existent xfs filesystem is unavailable

----------------------------------------------------------------------
Ran 467 tests in 3.673s

FAILED (errors=4, skipped=399)

allow user-specified options to mkfs

This will work like the mountopts. That is, if the user specifies format options we do not use any of the defaults we normally use. The user/caller is responsible for making sure the options they provide are adequate.

It might be necessary to move some things around to make a coherent model that can accommodate both setup/mount options and create/mkfs options.

uevent handling

Add support for monitoring and handling of uevents. It is important to differentiate between deactivation and actual removal.

NOTE: This implies making blivet thread-safe, which is not necessarily trivial.

The operations to support initially are as follows:

  • device create
  • device destroy
  • device resize
  • device rename
  • format create
  • format destroy

Other operations that may not be initially supported:

  • format resize
  • container device member set changes (vgextend, btrfs add, &c)
  • md management (reshaping, failed member, spare management, &c)

We also want to be able to dynamically track active mounts in the system, but I think that will be accomplished through a separate enhancement.

remove device-mapper from disk image stacks

It should be possible to use file+loop without dm. The only drawback is that users will no longer be able to specify the names of their disk images, which could be a problem since I can imagine kickstart users relying on the ability to specify a name for each disk image for use in storage-related kickstart commands.

Raise more specific exceptions in devices/lvm.py

The lvm.py raising the ValueError exception on everything. IMO two things should be changed here.

  1. Use other exception than basic ValueError, could be a subclass of the ValueError exception.
  2. Use more different types of an exceptions not just one.

The second point is because now you have:
ValueError("not enough free space in volume group")
and
ValueError("new size must of type Size")

both are ValueError but one of those can be just a bad settings and second is clearly an programming error. It would be nice to have some lead what is what. Now you can't easily decide how to handle errors.

action_test broken

For two reasons:

  • When systemMountpoint was introduced to replace _mountpoint, that meant reality was being consulted. Names in action_test are quite realistic, so they can coincide with actual names in /proc/mounts that systemMountpoint consults. This may lead to incorrect status values, with a fmt appearing to be mounted even when not. It may lead to the opposite problem as well, I'm not sure.
  • "msdos" is not a recognized format in blivet, and ActionCreateFormat() doesn't think its reasonable to create unknown formats (since tasks branch and since DeviceFormat.formattable is False).

resize encrypted devices

Support resize of encrypted (LUKS) block devices

Motivation

Many people resize devices and many people encrypt devices. Since it is possible to resize encrypted block devices it makes sense for blivet to be able to do so.

Requirements
  1. be able to resize any encrypted block device that contains formatting considered resizeable by blivet
Scope

This should amount to a resize method in blivet.formats.LUKS, some expansion of the logic in Blivet.resizeDevice, and adaptation of any anaconda code that schedules resize actions directly.

Notes

Since we do not currently support resize of LVM PVs (and therefore VGs) there is no need to be concerned with this use case.

handling for external dependencies

  • Be aware of what external dependencies exist for a given area of functionality
  • Missing external dependencies should result in disabled functions -- not crashes
  • In many cases, package-level granularity is sufficient (most device-level support)
  • In other cases, finer granularity is required (most filesystem support)

Basically, we need to be able to determine the following for each type of device and format:

  • can we activate/deactivate?
  • can we create/destroy/resize?

We may also need to add something like:

  • can we use this device normally? ("Is it suitable for normal I/O?")

Cleanup/update LVM size calculations and expectations

Blivet's LVM code contains many (often magic) calculations focused on free space left or required by LVM (e.g. "How much space is this LV going to take from a disk?" or "How much space there will be for LVM on top of RAIDn?"). Many of these calculations come from the lvm1 (called simply lvm) era and many are based on some empirical testing or just experience without any clear inspectable explanation. Also lvm2 has different size limitations than lvm1 used to have so we need to update these pieces of code/numbers too.

Get rid of the ephemeral (py)parted objects

The parted objects cause us many troubles (e.g. what's tracked in the PR #289) because they are not persistent and we never know if we are working with the current real values or some stale objects. It should be easy to get rid of those objects and use them only when reading and writing (committing) the data from/to disk. There's no point to use the (py)parted's objects to store some of the data with something being mirrored and something extra in our objects.

L10N - Too many version in Zanata

Hi there,

can you please clean unneeded version from Zanata and tell us what is the version for F25 ? Master ?

thanks for your help

impose some restrictions on action registration

  • disallow registration of multiple actions of a given type on a given device
  • disallow registration of actions that create loops (eg: destruction of a non-existent device)

For this to be viable, we'll have to make sure that all the actions can be reliably cancelled. Unit tests should be able to provide some certainty here.

leave block devices active during anaconda installation

During an anaconda installation blivet repeatedly activates and deactivates block devices in an attempt to maintain a default state of deactivation. This seems unnecessary.

We need to be able to deactivate everything if we're going to make changes to active devices. It might be problematic to delay that if we cannot handle getting things deactivated when the time comes. The most obvious potential problem is a mounted filesystem, possibly in use by some process (cwd or other) . In that case we could either force the issue (are there cases where this isn't possible?) or present the user with a fix/retry/quit choice in anaconda.

Does this seem like something to pursue?

resolve_glob() does not work correctly

The resolve_glob() function from the Blivet udev module seems to be only able to handle basic globs like this one:

vd* -> this will correctly cover /dev/vda, /dev/vdb, /dev/vdc, etc.

Unfortunately the function can't handle more "advanced" paths like /dev/disk/by-id/ata-SATA_SSD* or even just /dev/vd*.

Formatting of Mac install disk (RHEL 7, CentOS 7)

I have been reporting an error where the CentOS 7 install on Mac quits after throwing an 'No such file or directory' error caused by a formatting error.
Report:
https://bugs.centos.org/view.php?id=7244&nbn=2
Full Bug report from Anaconda:
https://bugs.centos.org/file_download.php?file_id=1704&type=bug

The same error seems to be reported here:
https://access.redhat.com/site/discussions/658253
and seems to be worked around by:

  1. Boot to installation media.
  2. Switch to vt2. (ctrl-alt-f2).
  3. Run parted. Delete all partitions.
  4. Edit /usr/lib/python2.7/site-packages/blivet/arch.py. Modify isMactel() function
    to always return False.
  5. Run restart-anaconda.

Is there a reason why the special Mac handling causes such an error and is there something that can be done about it?

Thanks! :-)

Wolf


First 29 lines from anaconda 19.31.79-1 exception report, anaconda-tb file in the bug report found in the link above:
options: [anaconda 19.31.79-1 exception report
Traceback (most recent call first):
File "/usr/lib/python2.7/site-packages/blivet/formats/fs.py", line 390, in doFormat
raise FormatCreateError(e, self.device)
File "/usr/lib/python2.7/site-packages/blivet/formats/fs.py", line 812, in create
return self.doFormat(_args, *_kwargs)
File "/usr/lib/python2.7/site-packages/blivet/deviceaction.py", line 472, in execute
options=self.device.formatArgs)
File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 237, in processActions
action.execute()
File "/usr/lib/python2.7/site-packages/blivet/init.py", line 310, in doIt
self.devicetree.processActions()
File "/usr/lib/python2.7/site-packages/blivet/init.py", line 170, in turnOnFilesystems
storage.doIt()
File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 150, in doInstall
turnOnFilesystems(storage, mountOnly=flags.flags.dirInstall)
File "/usr/lib64/python2.7/threading.py", line 764, in run
self.__target(_self.__args, *_self.__kwargs)
File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 211, in run
threading.Thread.run(self, _args, *_kwargs)
FormatCreateError: (OSError(2, 'No such file or directory'), '/dev/sda1')

Local variables in innermost frame:
e: [Errno 2] No such file or directory
self: non-existent hfs+ filesystem mounted at /boot/efi
args: ()
argv: ['/dev/sda1']
kwargs: {'device': '/dev/sda1', 'options': []}

]

move installer-specific functions into a separate module

Move the following into anaconda since that's the only place they will ever be used:

formats.swap.swapSuggestion
partitioning._scheduleImplicitPartitions
partitioning._schedulePartitions
partitioning._scheduleVolumes
partitioning.doAutoPartition
Blivet.shouldClear
Blivet.clearPartitions
releaseFromRedhatRelease
releaseFromOsRelease
findExistingInstallations
parseFSTab

add support for cache lvs

This has several fairly large sub-tasks:

  • differentiate between fast and slow media (SSD -v- spinning local disk -v- SAN)
  • intelligence in autopart and devicefactory for selecting appropriate disk for cache, swap, fs
  • establish a high-level abstraction for cache devices (suitable for bcache as well as dm-cache)

Identify and correctly handle global state

Blivet has several pieces of global state:

  • iSCSI targets
  • FCoE NICs/SANs
  • zFCP disks
  • LUKS passphrases
  • cached LVM PV/LV data

We should not be copying this data as part of any copy operation on a blivet class instance, nor should we have to pass them around from one class to another.

Some are already using singleton classes defined in blivet.iscsi, blivet.fcoe, blivet.zfcp. The others are currently passed around as attributes of Blivet, DeviceTree, and/or Populator.

Side note: I'm not sure if blivet.zfcp even needs to exist -- it may be enough to add a blivet.devicelibs.zfcp with functions to online/offline a device and another to write out the zfcp.conf based on a list of known devices.

I would like to add some construct(s) to make it clear that these pieces of data are global state and therefore should be accessed as such. I'm thinking of something like a singleton class or decorator. Once blivet is using the class/decorator for all these things, we can start simply importing the global instance of each piece of data where it is needed. That means removing the following attributes:

  • Blivet.iscsi
  • Blivet.zfcp
  • Blivet.fcoe
  • Blivet.__luksDevs
  • DeviceTree.iscsi
  • DeviceTree.zfcp
  • DeviceTree.fcoe
  • DeviceTree.__luksDevs
  • DeviceTree.__passphrases
  • DeviceTree.lvInfo
  • DeviceTree.pvInfo

In blivet/populator.py, for example, we would simply add the following line to the global imports:

from .iscsi import iscsi

and then use it as needed without passing it around as a parameter or storing it as an attribute.

NOTE: Some addiitonal consideration may be needed to minimally protect users' passphrases.

Use storaged's iSCI API instead of libiscsi

Python bindings for libiscsi are a hack on top of huge hack (the libiscsi itself). Hopefully the situation will get better soon with libiscsi. In the meantime, we should at least stop using the python bindings and replace calls to them with calls to the new iSCSI DBus API of storaged [1] [2] which would hide the implementation details from us.

[1] https://storaged-project.github.io/doc/latest/gdbus-org.storaged.Storaged.Manager.ISCSI.Initiator.html

[2] https://storaged-project.github.io/doc/latest/storaged-StoragedISCSISession.html

Hard to reproduce failure in tests/devices_test/device_packages_test.py - DevicePackagesTestCase

With Python3 I sometimes get this error:

======================================================================
FAIL: testPackages (device_packages_test.DevicePackagesTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/www/html/blivet/tests/devices_test/device_packages_test.py", line 26, in testPackages
    self.assertListEqual(packages, list(set(packages)))
AssertionError: Lists differ: ['cryptsetup', 'mdadm'] != ['mdadm', 'cryptsetup']

First differing element 0:
cryptsetup
mdadm

- ['cryptsetup', 'mdadm']
+ ['mdadm', 'cryptsetup']

I've managed to isolate the issue down to the conversion from list to set and then back to list.

Initially packages is ['cryptsetup', 'mdadm'], then set(packages) becomes {'mdadm', 'cryptsetup'} which later becomes the list ['mdadm', 'cryptsetup'] and the assert fails. Converting to set under Python3 sometimes reverses the order of the elements but not always. Any ideas how to reproduce reliably or why that happens ?

DiskDevice instances report no model

Probably since the commit 73d9c99 all DiskDevice instances report no model since they have self._model unset and it is no longer updated from their self.partedDevice attribute. I tried looking at the udev info we get at the point where we create DiskDevice instances, but the model is not there and udev.device_get_model(info) returns None. So I don't really have any idea how to get the model back.

blivet crashes if it cannot find partitions on a disk

I run list_devices.py included in the examples directory, but it crashes:

Traceback (most recent call last):
  File "list_devices.py", line 8, in <module>
    b.reset()             # detect system storage configuration
  File "blivet/blivet.py", line 286, in reset
    self.devicetree.populate(cleanup_only=cleanup_only)
  File "blivet/devicetree.py", line 344, in populate
    self._populator.populate(cleanup_only=cleanup_only)
  File "blivet/populator.py", line 1630, in populate
    self._populate()
  File "blivet/populator.py", line 1693, in _populate
    self.add_udev_device(dev)
  File "blivet/populator.py", line 728, in add_udev_device
    device = self.add_udev_partition_device(info)
  File "blivet/populator.py", line 452, in add_udev_partition_device
    raise cls(msg)
blivet.errors.DiskLabelScanError: failed to scan disk sdb

blivet-gui also crashes with the same problem. I already reported it on Red Hat Bugzilla, but I don't get any response there: https://bugzilla.redhat.com/show_bug.cgi?id=1237284

I test this problem with git master branch of blivet on Fedora 23. It seems it is this problem that causes Fedora and CentOS installers crash on my machine. Fedora 23 is installed on /dev/sda and the disk that causes crash is /dev/sdb.

It seems that blivet uses parted, but parted is unable to recognize my disk:

# parted /dev/sdb print
Model: ATA Hitachi HDP72505 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start  End    Size   File system  Flags
 1      0.00B  500GB  500GB  fat16

util-linux fdisk works fine:

fdisk -l /dev/sdb
Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa5b43cc2

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdb1              63   4192964   4192902     2G  6 FAT16
/dev/sdb2         4192965   8385929   4192965     2G 16 Hidden FAT16
/dev/sdb3  *      8385930 113258249 104872320    50G 17 Hidden HPFS/NTFS
/dev/sdb4       113258250 976773167 863514918 411.8G  5 Extended
/dev/sdb5       113258313 742404095 629145783   300G  7 HPFS/NTFS/exFAT
/dev/sdb6       742406144 847268099 104861956    50G a5 FreeBSD
/dev/sdb7       847268163 976773119 129504957  61.8G 8e Linux LVM

Linux is able to recognize it:

[    3.445850] scsi 1:0:0:0: Direct-Access     ATA      Hitachi HDP72505 A5CA PQ: 0 ANSI: 5
[    3.454309] sd 1:0:0:0: Attached scsi generic sg1 type 0
[    3.454350] sd 1:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB)
[    3.454473] sd 1:0:0:0: [sdb] Write Protect is off
[    3.454474] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    3.454510] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.523217] usb 5-1.6: new high-speed USB device number 3 using ehci-pci
[    3.539450]  sdb: sdb1 sdb2 sdb3 sdb4 < sdb5 sdb6 sdb7 >
[    3.545237] sd 1:0:0:0: [sdb] Attached SCSI disk

lsblk also works fine:

$ lsblk /dev/sdb
NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdb                      8:16   0 465.8G  0 disk 
โ”œโ”€sdb1                   8:17   0     2G  0 part 
โ”œโ”€sdb2                   8:18   0     2G  0 part 
โ”œโ”€sdb3                   8:19   0    50G  0 part 
โ”œโ”€sdb4                   8:20   0     1K  0 part 
โ”œโ”€sdb5                   8:21   0   300G  0 part /mnt/protected/DATA
โ”œโ”€sdb6                   8:22   0    50G  0 part 
โ””โ”€sdb7                   8:23   0  61.8G  0 part 
  โ”œโ”€wnnext-linuxrouter 253:0    0    10G  0 lvm  
  โ”œโ”€wnnext-bsdrouter   253:1    0    10G  0 lvm  
  โ”œโ”€wnnext-linuxserver 253:2    0     5G  0 lvm  
  โ”œโ”€wnnext-bsdserver   253:3    0     5G  0 lvm  
  โ”œโ”€wnnext-fedoraarm   253:4    0     7G  0 lvm  
  โ”œโ”€wnnext-gentoo      253:5    0    16G  0 lvm  
  โ””โ”€wnnext-fedoraaa64  253:6    0     7G  0 lvm  

move Blivet class into a separate module (blivet.py)

Having the Blivet class defined in the blivet/init.py is bad for many reasons the most itchy one being the fact that if somebody wants to import something small and standalone like "from blivet.arch import isARM", many things that are required by the Blivet class get imported/processed too. Blivet as a module provides many useful functions that are not depending on the Blivet class so it should allow and support their usage without processing all the stuff required by the Blivet class.

The issue is that this would break the API quite seriously

consider using minimal device alignment under some circumstances

Currently, we align all new partitions according to the optimal alignment info exported by the disk. There is some hardware that exports really large values for the optimal grain size (eg: 64 MiB, but we've also seen 256 MiB). When we get an optimal grain size of 64 MiB we insist on aligning all new partitions on 64 MiB boundaries. The results range from slightly surprising (500MiB->512MiB) to downright problematic (it is impossible to allocate a new PReP partition since its maximum size is 10 MiB).

I'm wondering if we should conditionally fall back to the minimal alignment. The conditions are up for discussion. Some possibilities for when to use the minimal alignment instead of the optimal alignment for new partitions:

  1. when the optimal alignment grain is larger than 16 MiB (or other totally arbitrary size)
  2. when the optimal alignment grain is larger than the size of the partition currently being allocated
  3. when the optimal alignment grain is larger than the size of any of the partitions being allocated

I personally think option 2 is a good choice. That allows small partition allocation on drives reporting large optimal io size, but doesn't affect the other partitions on that drive. It could lead to empty space on the drive, but that doesn't seem like a significant problem.

Try harder to avoid AttributeErrors while logging

We log enthusiastically in a lot of our methods and so we can end up with AttributeErrors whenever an object is incomplete for one reason or another. Object incompleteness can arise for many reasons.
AttributeErrors in necessary code can not always be eliminated, but it's wrong to crash in logging code.

Log methods could be protected from crashes by:

  1. use of a context manager that caught exception and logged a warning message around log calls.
  2. writing own log.info, log.debug, etc. wrapper methods and making lazy calls in the log methods, like:
    log.warning("a helpful string %d", lambda : self.size)
    and each wrapper method is:
def debug(fmt_str, *args, **kwargs):
    """ wrapper method for log.debug"""
    evaluated_args = []
    for f in args:
        try:
            evaluated_args.append(f())
        except Exception:
           log.warning("Failed to log message associate with format string %s, argument at index %d could not be evaluated", fmt_str, len(evaluated_args))
           return
    log.debug(fmt_str, *evaluated_args, **kwargs))

Note that the above is an incomplete solution and the whole idea is probably harder than it looks.

L10N - need information about "Unsupported %(name)s"

hi, can you please give the context of this sentence ? What are the possible values of %(name)s ? It is in blivet's project on Zanata. In branch : rhel7-branch

thanks for your help !

Information available :
Unsupported %(name)s
#127; Refs: ../blivet/formats/disklabel.py:232

Resource ID: e5757b8b6ae11f8c5a6edec53c1b1f1b
Message Context: No content
Reference: ../blivet/formats/disklabel.py:232
Flags: python-format
Source Comment: No content 

allow to set partition flags

With PartitionDevice I can't set partition flags such as bios_grub or hidden, that are supported by parted.
I can explicitly call partition.setFlag(parted.PARTITION_HIDDEN) for partition created, but then I should call partedDisk.commit() to get this flag saved. And after that I should inititate device rescanning.
I think it would be more appropriate, if flags could be set when creating a partition.

LV Creation doesn't work correctly.

Select disk1, disk2 as target storage.
case 1, disk1 with more than 500 MiB space left like 600 MiB, using LVMFactory to create LV on it with request size 1GiB, VG policy auto. Result is success.
case 2, disk1 with less than 500 MiB space left like 400 MiB, using LVMFactory to create LV on it with request size 396MiB, VG policy auto. Result is success.
case 3, disk1 with less than 500 MiB space left like 400 MiB, using LVMFactory to create LV on it with request size 1GiB, VG policy auto. Result is failure. Error message is "not enough free space for new device".
case 4, both disk1 and disk2 with 400 MiB, using LVMFactory to create LV on them with request size 500 MiB, VG policy auto. Result is failure. Error message is "not enough free space for new device".

Hints from codes in devicefactory.py:
984 # drop any new disks that don't have free space
985 min_free = min(Size("500MiB"), self.parent_factory.size)
986 add_disks = [d for d in add_disks if d.partitioned and
987 d.format.free >= min_free]

If the candidate disks for new VG must be free space larger than 500 MiB, why not code like below:
985 min_free = Size("500MiB")

The current codes logic depends greatly on self.parent_factory.size which is actually the request size of LVMFactory. I can't understand why.

dynamic system mount accounting

Currently, blivet only looks to the system to see what is mounted when asked to do so. This is not adequate for operation on a running system. Information about system mounts is readily available. What we basically want is a read-only property of FS that consults /proc/mounts (and possibly also /proc/self/mountinfo) on demand to see if/where it is currently mounted. Since this information does not necessarily change rapidly under most circumstances, and this information could be accessed repeatedly for many filesystems, we should seriously consider caching this data and making use of inotify or similar to see when to dump/refresh the cache.

It might be worth talking to @mulkieran about the "tasks" framework she has developed for #12. There is a good chance you can make use of it here.

Selection of LUKS hash algorithm

Blivet does not allow to specify the hash algorithm that is used for LUKS volumes. This can create compliance issues as cryptsetup uses its default hash algorithm (SHA-1) if no hash algorithm is specified.

support separate thin pool metadata lvs

One very common model for setting up a thin pool is to create separate lvs for metadata and data. In this model, you create normal lvs and then turn them into a thin pool using lvconvert.

It is likely that there will be significant overlap in the implementation between this and support for cache lvs.

make test failures with Python3

Only change PYTHON=python3 in the Makefile to reproduce (as root)

======================================================================
ERROR: testActionDependencies (action_test.DeviceActionTestCase)
Verify correct functioning of action dependencies.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/action_test.py", line 944, in testActionDependencies
    format_lv = ActionCreateFormat(testlv, fmt)
  File "/home/atodorov/blivet/blivet/deviceaction.py", line 530, in __init__
    raise ValueError("resource to create this format %s is unavailable" % fmt)
ValueError: resource to create this format non-existent None is unavailable

======================================================================
ERROR: testContainerActions (action_test.DeviceActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/action_test.py", line 1122, in testContainerActions
    fmt=new_lv_format)
  File "/home/atodorov/blivet/tests/storagetestcase.py", line 245, in scheduleCreateFormat
    action = blivet.deviceaction.ActionCreateFormat(device, fmt)
  File "/home/atodorov/blivet/blivet/deviceaction.py", line 530, in __init__
    raise ValueError("resource to create this format %s is unavailable" % fmt)
ValueError: resource to create this format non-existent xfs filesystem is unavailable

======================================================================
ERROR: testAvailabilityMDRAIDplugin (devices_test.dependencies_test.MockingDeviceDependenciesTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/devices_test/dependencies_test.py", line 64, in testAvailabilityMDRAIDplugin
    self.assertIsNotNone(ActionCreateFormat(self.luks, fmt=getFormat("macefi")))
  File "/home/atodorov/blivet/blivet/deviceaction.py", line 530, in __init__
    raise ValueError("resource to create this format %s is unavailable" % fmt)
ValueError: resource to create this format non-existent macefi filesystem is unavailable

======================================================================
ERROR: testCreation (formats_test.fs_test.BTRFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 119, in testCreation
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testResize (formats_test.fs_test.BTRFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 193, in testResize
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreation (formats_test.fs_test.EFIFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 119, in testCreation
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testLabeling (formats_test.fs_test.EFIFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 138, in testLabeling
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testMounting (formats_test.fs_test.EFIFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 169, in testMounting
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testMountpoint (formats_test.fs_test.EFIFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 180, in testMountpoint
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testRelabeling (formats_test.fs_test.EFIFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 152, in testRelabeling
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testResize (formats_test.fs_test.EFIFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 193, in testResize
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreation (formats_test.fs_test.Ext2FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 119, in testCreation
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testLabeling (formats_test.fs_test.Ext2FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 138, in testLabeling
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testMounting (formats_test.fs_test.Ext2FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 169, in testMounting
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testMountpoint (formats_test.fs_test.Ext2FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 180, in testMountpoint
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testNoExplicitTargetSize (formats_test.fs_test.Ext2FSTestCase)
Because _targetSize has not been set, resize sets to min size.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 237, in testNoExplicitTargetSize
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testNoExplicitTargetSize2 (formats_test.fs_test.Ext2FSTestCase)
Because _targetSize has been set to size in constructor the
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 260, in testNoExplicitTargetSize2
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testRelabeling (formats_test.fs_test.Ext2FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 152, in testRelabeling
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testResize (formats_test.fs_test.Ext2FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 193, in testResize
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testShrink (formats_test.fs_test.Ext2FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 280, in testShrink
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testTooBig (formats_test.fs_test.Ext2FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 331, in testTooBig
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testTooBig2 (formats_test.fs_test.Ext2FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 350, in testTooBig2
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testTooSmall (formats_test.fs_test.Ext2FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 312, in testTooSmall
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreation (formats_test.fs_test.Ext3FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 119, in testCreation
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testLabeling (formats_test.fs_test.Ext3FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 138, in testLabeling
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testMounting (formats_test.fs_test.Ext3FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 169, in testMounting
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testMountpoint (formats_test.fs_test.Ext3FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 180, in testMountpoint
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testNoExplicitTargetSize (formats_test.fs_test.Ext3FSTestCase)
Because _targetSize has not been set, resize sets to min size.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 237, in testNoExplicitTargetSize
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testNoExplicitTargetSize2 (formats_test.fs_test.Ext3FSTestCase)
Because _targetSize has been set to size in constructor the
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 260, in testNoExplicitTargetSize2
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testRelabeling (formats_test.fs_test.Ext3FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 152, in testRelabeling
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testResize (formats_test.fs_test.Ext3FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 193, in testResize
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testShrink (formats_test.fs_test.Ext3FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 280, in testShrink
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testTooBig (formats_test.fs_test.Ext3FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 331, in testTooBig
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testTooBig2 (formats_test.fs_test.Ext3FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 350, in testTooBig2
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testTooSmall (formats_test.fs_test.Ext3FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 312, in testTooSmall
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreation (formats_test.fs_test.Ext4FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 119, in testCreation
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testLabeling (formats_test.fs_test.Ext4FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 138, in testLabeling
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testMounting (formats_test.fs_test.Ext4FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 169, in testMounting
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testMountpoint (formats_test.fs_test.Ext4FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 180, in testMountpoint
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testNoExplicitTargetSize (formats_test.fs_test.Ext4FSTestCase)
Because _targetSize has not been set, resize sets to min size.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 237, in testNoExplicitTargetSize
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testNoExplicitTargetSize2 (formats_test.fs_test.Ext4FSTestCase)
Because _targetSize has been set to size in constructor the
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 260, in testNoExplicitTargetSize2
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testRelabeling (formats_test.fs_test.Ext4FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 152, in testRelabeling
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testResize (formats_test.fs_test.Ext4FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 193, in testResize
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testShrink (formats_test.fs_test.Ext4FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 280, in testShrink
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testTooBig (formats_test.fs_test.Ext4FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 331, in testTooBig
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testTooBig2 (formats_test.fs_test.Ext4FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 350, in testTooBig2
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testTooSmall (formats_test.fs_test.Ext4FSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 312, in testTooSmall
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreation (formats_test.fs_test.FATFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 119, in testCreation
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testLabeling (formats_test.fs_test.FATFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 138, in testLabeling
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testMounting (formats_test.fs_test.FATFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 169, in testMounting
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testMountpoint (formats_test.fs_test.FATFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 180, in testMountpoint
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testRelabeling (formats_test.fs_test.FATFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 152, in testRelabeling
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testResize (formats_test.fs_test.FATFSTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fstesting.py", line 193, in testResize
    an_fs.device = self.loopDevices[0]
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreating (formats_test.labeling_test.Ext2FSTestCase)
Create the filesystem when passing a valid label.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fslabeling.py", line 150, in testCreating
    an_fs = self._fs_class(device=self.loopDevices[0], label="start")
  File "/home/atodorov/blivet/blivet/formats/fs.py", line 101, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreatingEmpty (formats_test.labeling_test.Ext2FSTestCase)
Create a filesystem with an empty label.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fslabeling.py", line 170, in testCreatingEmpty
    an_fs = self._fs_class(device=self.loopDevices[0], label="")
  File "/home/atodorov/blivet/blivet/formats/fs.py", line 101, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreatingNone (formats_test.labeling_test.Ext2FSTestCase)
Create a filesystem with the label None.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fslabeling.py", line 160, in testCreatingNone
    an_fs = self._fs_class(device=self.loopDevices[0], label=None)
  File "/home/atodorov/blivet/blivet/formats/fs.py", line 101, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testLabeling (formats_test.labeling_test.Ext2FSTestCase)
A sequence of tests of filesystem labeling.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fslabeling.py", line 124, in testLabeling
    an_fs = self._fs_class(device=self.loopDevices[0], label=self._invalid_label)
  File "/home/atodorov/blivet/blivet/formats/fs.py", line 101, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreating (formats_test.labeling_test.FATFSTestCase)
Create the filesystem when passing a valid label.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fslabeling.py", line 150, in testCreating
    an_fs = self._fs_class(device=self.loopDevices[0], label="start")
  File "/home/atodorov/blivet/blivet/formats/fs.py", line 101, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreatingEmpty (formats_test.labeling_test.FATFSTestCase)
Create a filesystem with an empty label.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fslabeling.py", line 170, in testCreatingEmpty
    an_fs = self._fs_class(device=self.loopDevices[0], label="")
  File "/home/atodorov/blivet/blivet/formats/fs.py", line 101, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreatingNone (formats_test.labeling_test.FATFSTestCase)
Create a filesystem with the label None.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fslabeling.py", line 160, in testCreatingNone
    an_fs = self._fs_class(device=self.loopDevices[0], label=None)
  File "/home/atodorov/blivet/blivet/formats/fs.py", line 101, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testLabeling (formats_test.labeling_test.FATFSTestCase)
A sequence of tests of filesystem labeling.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/fslabeling.py", line 124, in testLabeling
    an_fs = self._fs_class(device=self.loopDevices[0], label=self._invalid_label)
  File "/home/atodorov/blivet/blivet/formats/fs.py", line 101, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreatingSwapSpaceEmpty (formats_test.labeling_test.LabelingSwapSpaceTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/labeling_test.py", line 138, in testCreatingSwapSpaceEmpty
    swp = swap.SwapSpace(device=self.loopDevices[0], label="")
  File "/home/atodorov/blivet/blivet/formats/swap.py", line 68, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testCreatingSwapSpaceNone (formats_test.labeling_test.LabelingSwapSpaceTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/labeling_test.py", line 134, in testCreatingSwapSpaceNone
    swp = swap.SwapSpace(device=self.loopDevices[0], label=None)
  File "/home/atodorov/blivet/blivet/formats/swap.py", line 68, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testLabeling (formats_test.labeling_test.LabelingSwapSpaceTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/labeling_test.py", line 129, in testLabeling
    swp = swap.SwapSpace(device=self.loopDevices[0])
  File "/home/atodorov/blivet/blivet/formats/swap.py", line 68, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testGetLabelArgs (formats_test.labeling_test.MethodsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/labeling_test.py", line 73, in testGetLabelArgs
    reiserfs = self.fs["reiserfs"]
KeyError: 'reiserfs'

======================================================================
ERROR: testMountingExt2FS (formats_test.selinux_test.SELinuxContextTestCase)
Test that lost+found directory gets assigned correct SELinux
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/selinux_test.py", line 30, in testMountingExt2FS
    an_fs = fs.Ext2FS(device=self.loopDevices[0], label="test")
  File "/home/atodorov/blivet/blivet/formats/fs.py", line 101, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

======================================================================
ERROR: testMountingXFS (formats_test.selinux_test.SELinuxContextTestCase)
XFS does not have a lost+found directory.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/blivet/tests/formats_test/selinux_test.py", line 67, in testMountingXFS
    an_fs = fs.XFS(device=self.loopDevices[0], label="test")
  File "/home/atodorov/blivet/blivet/formats/fs.py", line 101, in __init__
    DeviceFormat.__init__(self, **kwargs)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 186, in __init__
    self.device = kwargs.get("device")
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 315, in <lambda>
    lambda f,d: f._setDevice(d),
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 306, in _setDevice
    error_msg = self._deviceCheck(devspec)
  File "/home/atodorov/blivet/blivet/formats/__init__.py", line 301, in _deviceCheck
    if devspec and not devspec.startswith("/"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

----------------------------------------------------------------------
Ran 467 tests in 67.966s

FAILED (errors=67, skipped=318)

resolveDevice fails on systems with > 15 disks due to bad regex

In my Anaconda kickstart config, I'm specifying partition information for 16 disks, sda-sdp. When kickstart calls out to blivet/devicetree.py to look up device mappings for each of the drives, it dies and creates a traceback when resolveDevice(sdp) is being processed.

There's a regex on line 2548 that appears to be the root cause, because the device name contains 'p' it matches this regex and causes blivet to do the wrong thing:

https://github.com/rhinstaller/blivet/blob/rhel7.1-branch/blivet/devicetree.py#L2548 :

  elif re.match(r'(0x)?[A-Za-z0-9]{2}(p\d+)?$', devspec):

I'm not exactly sure what this regex is intended to match, (I'm assuming something like "disk1p1") so anchoring it at the beginning may/may not be a trivial fix.

A simple example:

>>> import re
>>> if re.match(r'(0x)?[A-Za-z0-9]{2}(p\d+)?$', 'sdp1'):
...   print "matched"
...
matched
>>> if re.match(r'(0x)?[A-Za-z0-9]{2}(p\d+)?$', 'sdq1'):
...   print "matched"
...
>>>

A copy of the Anaconda config+traceback error, storage.log illustrating the problem, are in this gist:
https://gist.github.com/bwann/b8286b72613c03b98ee7 This is from Anaconda 19 with CentOS 7.1, and the regex is the same even in trunk.

TmpFSSize and unit tests

While packing the latest release of blivet for NixOS I've stumbled on a few test errors. While some of these are certainly linked to Nix packaging, I'm not quite sure whether the failures regarding test_resize of ResizeTmpFSTestCase are upstream bugs or some error with our packaging.

The full test log is here:

https://headcounter.org/hydra/log/89asli0s6nyc0h8x17layb4f0m72g24r-vm-test-run-blivet.drv

Here is the package itself and here is how we run the test suite.

Now the tests return an error because during determining the file system size, the argument given to df is None. The argument in question is self.fs.system_mountpoint, which is generated using mounts_cache.get_mountpoints().

So far this makes sense, but if I'm looking into the code of MountsCache things are getting a bit confusing. In get_mountpoints() there is a branch which only applies if devspec is not None, however with tmpfs it has the value tmpfs, so the branch actually applies.

This ends up trying to search for a device while in reality if I'm correct there shouldn't be a device corresponding to a tmpfs. In the end it shouldn't even end up in the mentioned branch and just return self.mountpoints[(devspec, subvolspec)], but that only would work if devspec is None.

So I'm confused on how this would work even on Fedora? Do you get the same errors while running the test suite? Or is there something wrong with my packaging?

edit: Fixed the URL to the test log.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.