[FFE] Every script that uses udisk in currently broken in Quantal
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox |
Fix Released
|
High
|
Zygmunt Krynicki | ||
checkbox (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
udisks2 will be the default backend for gnome/unity in Quantal:
https:/
The current version works well for udisks version 1 but we should add the support for udisks2 as well:
http://
== Importance==
This feature is pretty important to have as currently all the storage tests are broken; they do not work on Quantal and will produce failing results even for users with working hardware. This code enables these features to work correctly under Quantal.
Udisks2 does not provide some bits of information that udisks1 does, and which are necessary to have coverage of all device types that checkbox can test (usb 2.0 and 3.0, memory cards, esata, firewire). So the code is somewhat extensive to account for all these use cases.
A few changes to job definitions were needed (the addition of --memorycard parameter) since it's needed for memory cards to be properly recognized.
== Risk assessment ==
The udisks2 code was developed in an incremental fashion. Due to the
requirement that the same code base keep working on Ubuntu 12.04, the changes
were done carefully to minimize breakage.
Since udisks2 introduces a few API changes and removes certain properties the
old code depended on, particularly speed reporting which is needed for proper
USB 3.0 testing, some refactoring was needed to abstract these changes and keep
the code as clean as possible. Unit tests for these components help ensure
there's no breakage while changing code. While developing, many tests with
actual hardware were performed to ensure that device detection and testing was
reliable and failure scenarios were handled properly.
Once all the parts were ready to land, the udisks2 code was integrated and
merged into checkbox. During this phase the code continued to be tested with
actual hardware to guarantee that all the pieces "fit together" correctly and
the end result worked adequately.
Once everything was in place, two sets of tests were performed: a set of tests
to ensure the features worked as required, and validate that nothing had broken
during final integration. Finally, when preparing the Ubuntu upload, a package
was built and the scripts were tested from the sort of installation an end-user
would see.
Since the code was very extensively tested during development, we believe the
risk of including this to be rather low, and any impact would be localized to
the storage device testing section of checkbox, so the symptoms would in any
case be very easy to identify and clear to solve. Despite this, during testing
all the code behaved properly so if any, the potential remaining problems
should be corner-cases unlikely to have a widespread impact.
== Testing ==
We tested building the package (build log is attached as a comment), installing and upgrading (logs also as comments). We also redid our manual testing by launching the modified scripts (removable_
Related branches
- Mathieu Trudel-Lapierre: Approve
- Ubuntu branches: Pending requested
-
Diff: 2871 lines (+2175/-238)14 files modifiedcheckbox/dbus/__init__.py (+89/-0)
checkbox/dbus/udisks2.py (+479/-0)
checkbox/heuristics/__init__.py (+56/-0)
checkbox/heuristics/udev.py (+44/-0)
checkbox/heuristics/udisks2.py (+62/-0)
checkbox/parsers/udevadm.py (+19/-0)
checkbox/tests/heuristics.py (+40/-0)
checkbox/udev.py (+93/-0)
debian/changelog (+15/-0)
debian/control (+1/-0)
jobs/mediacard.txt.in (+24/-24)
scripts/removable_storage_test (+425/-175)
scripts/removable_storage_watcher (+823/-37)
setup.py (+5/-2)
Changed in checkbox: | |
assignee: | nobody → Zygmunt Krynicki (zkrynicki) |
Changed in checkbox: | |
status: | Confirmed → In Progress |
Changed in checkbox: | |
milestone: | none → 0.14.x |
Changed in checkbox: | |
importance: | High → Critical |
Changed in checkbox: | |
importance: | Critical → High |
Changed in checkbox: | |
status: | In Progress → Fix Committed |
summary: |
- Add udisks2 support to scripts/removable_storage_* scripts + Every script that uses udisk in currently broken in Quantal |
description: | updated |
summary: |
- Every script that uses udisk in currently broken in Quantal + [FFe] Every script that uses udisk in currently broken in Quantal |
summary: |
- [FFe] Every script that uses udisk in currently broken in Quantal + [FFE] Every script that uses udisk in currently broken in Quantal |
description: | updated |
Changed in checkbox: | |
status: | Fix Committed → Fix Released |
This has reared it's head in weekly testing:
Traceback (most recent call last): File "/usr/lib/ python3/ dist-packages/ dbus/bus. py", line 175, in activate_name_owner return self.get_ name_owner( bus_name) File "/usr/lib/ python3/ dist-packages/ dbus/bus. py", line 361, in get_name_owner 's', (bus_name,), **keywords) File "/usr/lib/ python3/ dist-packages/ dbus/connection .py", line 651, in call_blocking message, timeout) dbus.exceptions .DBusException: org.freedesktop .DBus.Error. NameHasNoOwner: Could not get owner of name 'org.freedeskto p.UDisks' : no such name During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/ checkbox/ scripts/ removable_ storage_ test", line 305, in <module> sys.exit(main()) File "/usr/share/ checkbox/ scripts/ removable_ storage_ test", line 205, in main test.get_ disk_info( args.device) File "/usr/share/ checkbox/ scripts/ removable_ storage_ test", line 75, in get_disk_info "/org/freedeskt op/UDisks" ) File "/usr/lib/ python3/ dist-packages/ dbus/bus. py", line 241, in get_object follow_ name_owner_ changes= follow_ name_owner_ changes) File "/usr/lib/ python3/ dist-packages/ dbus/proxies. py", line 248, in __init__ self._named_service = conn.activate_ name_owner( bus_name) File "/usr/lib/ python3/ dist-packages/ dbus/bus. py", line 180, in activate_name_owner self.start_ service_ by_name( bus_name) File "/usr/lib/ python3/ dist-packages/ dbus/bus. py", line 278, in start_service_ by_name 'su', (bus_name, flags))) File "/usr/lib/ python3/ dist-packages/ dbus/connection .py", line 651, in call_blocking message, timeout) dbus.exceptions .DBusException: org.freedesktop .DBus.Error. ServiceUnknown: The name org.freedesktop .UDisks was not provided by any .service files