Skip to content

Conversation

@tbzatek
Copy link
Member

@tbzatek tbzatek commented Sep 25, 2025

Trigger uevents sync on the raid devices and their members when available.
This appears to fix some random test failures.

======================================================================
FAIL: test_md_raid_methods (__main__.MDRaid.test_md_raid_methods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tbzatek/devel/udisks/src/tests/integration-test", line 1855, in test_md_raid_methods
    self.assertIsNotNone(block)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^
AssertionError: unexpectedly None
======================================================================
FAIL: test_delete (test_mdraid.RAID0TestCase.test_delete)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tbzatek/devel/udisks/src/tests/dbus-tests/test_mdraid.py", line 278, in test_delete
    self.assertNotIn(path, objects.keys())
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/org/freedesktop/UDisks2/mdraid/4967f324_24ce30d5_3b23f9cf_b7a2669d' unexpectedly found in dict_keys([dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/sdd'), dbus.ObjectPath('/org/freedesktop/UDisks2/drives/LIO_ORG_udisks_test_dis_5282611e_2e74_4019_8ca5_d8ceb09dfa15'), dbus.ObjectPath('/org/freedesktop/UDisks2/drives/LIO_ORG_udisks_test_dis_65541bbc_0ffc_42cb_b639_6ce91a818511'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/vda2'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/vda'), dbus.ObjectPath('/org/freedesktop/UDisks2/drives/LIO_ORG_udisks_test_dis_dd927109_b9e7_462c_b95a_ae7878623713'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/sdb'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/sde'), dbus.ObjectPath('/org/freedesktop/UDisks2/drives/VirtIO_Disk'), dbus.ObjectPath('/org/freedesktop/UDisks2/drives/LIO_ORG_udisks_test_dis_0604a813_ce79_45fa_a9ff_eaf82188594e'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/vda3'), dbus.ObjectPath('/org/freedesktop/UDisks2/Manager'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/sdc'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/vda1'), dbus.ObjectPath('/org/freedesktop/UDisks2/drives/QEMU_HARDDISK_QM00013'), dbus.ObjectPath('/org/freedesktop/UDisks2/mdraid/4967f324_24ce30d5_3b23f9cf_b7a2669d'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/zram0'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/sda')])

======================================================================
FAIL: test_add_remove_device (test_mdraid.RAID1TestCase.test_add_remove_device)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tbzatek/devel/udisks/src/tests/dbus-tests/test_mdraid.py", line 346, in test_add_remove_device
    self.assertIsNone(member)
    ~~~~~~~~~~~~~~~~~^^^^^^^^
AssertionError: dbus.Struct((dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/sdc'), dbus.Int32(-1), dbus.Array([dbus.String('spare')], signature=dbus.Signature('s')), dbus.UInt64(0), dbus.Dictionary({}, signature=dbus.Signature('sv'))), signature=None) is not None

----------------------------------------------------------------------

@packit-as-a-service
Copy link

Cockpit tests failed for commit a6f17e4. @martinpitt, @jelly, @mvollmer please check.

@martinpitt
Copy link
Contributor

@mvollmer This actually breaks something in TestStorageLvm2.testDegradation. Could you please have a look and check more closely what's wrong?

@tbzatek
Copy link
Member Author

tbzatek commented Oct 8, 2025

This may have changed the order D-Bus objects are (dis)appearing, interfaces are updated and signals sent. Depends on how sensitive your tests are. Hopefully the order didn't break other things.

@tbzatek tbzatek added this to the udisks-2.12.0 milestone Oct 9, 2025
@tbzatek
Copy link
Member Author

tbzatek commented Nov 27, 2025

@mvollmer have you had chance to take a look what was the cause of the failure?

@mvollmer
Copy link
Contributor

@mvollmer have you had chance to take a look what was the cause of the failure?

Upps, missed this, sorry. Checking now.

@mvollmer
Copy link
Contributor

Note that "fedora-43:revdeps" and "fedora-rawhide:revdeps" have passed. Also, the failing test is about raid in lvm2 and this PR only touches the mdraid code pathes. (Both mdraid and lvm2 ultimately use the same kernel raid code, but I don't think the failing test even triggers the code that has been added here to udisks.)

So, hmm....

@mvollmer
Copy link
Contributor

The navigation to the page for the logical volume seems to have failed in the test.

@mvollmer
Copy link
Contributor

I think the COPR rpms have disappeared in the mean time. @tbzatek, could you trigger the TF test again?

@vojtechtrefny
Copy link
Member

/packit test

@tbzatek
Copy link
Member Author

tbzatek commented Nov 28, 2025

/packit build

@tbzatek
Copy link
Member Author

tbzatek commented Nov 28, 2025

(FYI the testing-farm:fedora-42-x86_64:revdeps tests didn't get retested, perhaps F42 has been decommisioned in the meantime?)

@tbzatek
Copy link
Member Author

tbzatek commented Nov 28, 2025

Jenkins, test this please.

@vojtechtrefny
Copy link
Member

(FYI the testing-farm:fedora-42-x86_64:revdeps tests didn't get retested, perhaps F42 has been decommisioned in the meantime?)

Targets for the revdeps tests are

    - fedora-rawhide-x86_64
    - fedora-latest-x86_64
    - fedora-latest-stable-x86_64

so this now means only rawhide and F43: fedora-latest is the latest branched release (so it will be F44 when it gets branched, but for now the latest branched is still F43) and fedora-latest-stable is the latest stable/released version so also F43 now.

@tbzatek
Copy link
Member Author

tbzatek commented Dec 1, 2025

The md/bitmap/location error needs to be fixed separately, in a similar manner to storaged-project/libblockdev#1143. I think we can merge this one now.

Copy link
Member

@vojtechtrefny vojtechtrefny left a comment

Choose a reason for hiding this comment

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

Looks good to me.

create.extend(self.md_legs)
self.assertEqual(subprocess.call(create), 0)
self.sync()
time.sleep(2) # FIXME: find a better way
Copy link
Member

Choose a reason for hiding this comment

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

I doubt there is a better way when we are calling mdadm --create outside udisks here.

Copy link
Member Author

Choose a reason for hiding this comment

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

There are several places in the code with # TODO or an arbitrary sleep(5). There is a better way to watch out for objects on the bus, but not trivial to implement.

IOW, are you saying the comment should be removed?

Trigger uevents sync on the raid devices and their members when available.
This appears to fix some random test failures.
Integration tests are missing synchronization mechanisms and waiting
for an object to appear on the bus. Thus for now, add a nasty sleep.

  ======================================================================
  FAIL: test_md_raid_methods (__main__.MDRaid.test_md_raid_methods)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/tbzatek/devel/udisks/src/tests/integration-test", line 1855, in test_md_raid_methods
      self.assertIsNotNone(block)
      ~~~~~~~~~~~~~~~~~~~~^^^^^^^
  AssertionError: unexpectedly None
@packit-as-a-service
Copy link

Cockpit tests failed for commit e988f9a. @martinpitt, @jelly, @mvollmer please check.

@tbzatek
Copy link
Member Author

tbzatek commented Dec 14, 2025

Cockpit tests failed for commit e988f9a. @martinpitt, @jelly, @mvollmer please check.

Infrastructure problems it seems

>>> Curl error (35): SSL connect error for https://kojipkgs.fedoraproject.org/re

@tbzatek tbzatek merged commit 19651e4 into storaged-project:master Dec 17, 2025
18 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants