Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-124139

[RHEL10] mdadm: failed to RUN_ARRAY /dev/md/bd_test_md: Invalid argument

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-10.2
    • mdadm
    • None
    • None
    • None
    • rhel-storage-crs
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      ======================================================================
      ERROR: test_activate_deactivate (mdraid_test.MDTestActivateDeactivate.test_activate_deactivate)
      Verify that it is possible to activate and deactivate an MD RAID
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/home/cryptsetup_libblockdev/libblockdev/libblockdev-3.4.0/tests/mdraid_test.py", line 257, in test_activate_deactivate
          succ = BlockDev.md_activate(None, [self.loop_devs[0], self.loop_devs[1]], md_info.uuid)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib64/python3.12/site-packages/gi/overrides/BlockDev.py", line 1058, in md_activate
          return _md_activate(raid_spec, members, uuid, start_degraded, extra)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      gi.repository.GLib.GError: g-bd-utils-exec-error-quark: Process reported exit code 1: mdadm: failed to RUN_ARRAY /dev/md/bd_test_md: Invalid argument
      mdadm: Not enough devices to start the array.
      mdadm: No arrays found in config file or automatically
       (0)----------------------------------------------------------------------
      Ran 528 tests in 1092.660s
       

       

      libblockdev-3.4.0-1.el10.x86_64

      mdadm-4.4-2.el10.x86_64

       

       

      --- a/src/plugins/mdraid.c
      +++ b/src/plugins/mdraid.c
      @@ -689,7 +689,7 @@ gchar* bd_md_name_from_node (const gchar *node, GError **error) {
        * Tech category: %BD_MD_TECH_MDRAID-%BD_MD_TECH_MODE_MODIFY
        */
       gboolean bd_md_activate (const gchar *raid_spec, const gchar **members, const gchar *uuid, gboolean start_degraded, const BDExtraArg **extra, GError **error) {
      -    guint64 num_members = (raid_spec && members) ? g_strv_length ((gchar **) members) : 0;
      +    guint64 num_members = members ? g_strv_length ((gchar **) members) : 0;
           const gchar **argv = NULL;
           gchar *uuid_str = NULL;
           guint argv_top = 0;
      @@ -728,10 +728,10 @@ gboolean bd_md_activate (const gchar *raid_spec, const gchar **members, const g
               uuid_str = g_strdup_printf ("--uuid=%s", uuid);
               argv[argv_top++] = uuid_str;
           }
      -    /* only add member device if device_name given (a combination of --scan with
      -       a list of members doesn't work) */
      -    if (raid_spec && members)
      +    /* add member devices if provided - works with both raid_spec and --scan modes */
      +    if (members)
               for (i=0; i < num_members; i++)
                   argv[argv_top++] = members[i];
           argv[argv_top] = NULL;                            

       

              xni@redhat.com Xiao Ni
              guazhang@redhat.com Guangwu Zhang
              Xiao Ni Xiao Ni
              Fan Fan Fan Fan
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: