• lvm2-2.03.24-2.el9
    • None
    • Moderate
    • sst_logical_storage
    • ssg_filesystems_storage_and_HA
    • 1
    • 25
    • 1
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

      Collecting data from pvs in JSON format

      Please provide the package NVR for which bug is seen:

      [root@vm-a01n01 ~]# pvs --version
        LVM version:     2.03.21(2) (2023-04-21)
        Library version: 1.02.195 (2023-04-21)
        Driver version:  4.48.0
        Configuration:   ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm --with-default-pid-dir=/run --with-default-locking-dir=/run/lock/lvm --with-usrlibdir=/usr/lib64 --enable-fsadm --enable-write_install --with-user= --with-group= --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --enable-pkgconfig --enable-cmdlib --enable-dmeventd --enable-blkid_wiping --with-udevdir=/usr/lib/udev/rules.d --enable-udev_sync --with-thin=internal --with-cache=internal --enable-lvmpolld --enable-lvmlockd-dlm --enable-lvmlockd-dlmcontrol --enable-lvmlockd-sanlock --enable-dbus-service --enable-notify-dbus --enable-dmfilemapd --with-writecache=internal --with-vdo=internal --with-vdo-format=/usr/bin/vdoformat --with-integrity=internal --with-default-use-devices-file=1 --disable-silent-rules --enable-app-machineid --enable-editline --disable-readline

      How reproducible:

      100% in my system

      Steps to reproduce

      1. Add the lvm.conf entry:  filter = [ "r|/dev/drbd*|" ]
      2. Run: pvs --noheadings --units b --reportformat json -o pv_uuid,pv_name,vg_name,pv_attr,pv_size,pv_free
      3. Generated JSON is unparsable;

      ====

        {
            "report": [
        Please remove the lvm.conf filter, it is ignored with the devices file.
               

      {               "pv": [                   \{"pv_uuid":"lnt2tM-f3z1-Ogu7-GlNy-fh0f-Px0e-WkrSzy", "pv_name":"/dev/vda3", "vg_name":"al9_vm-a01n01", "pv_attr":"a--", "pv_size":"266728374272B", "pv_free":"183119118336B"}

                    ]
                }
            ]
        }
      ====

      The 'Please remove...' message breaks the JSON formatting.

      Expected results

      Parseable JSON

      Actual results

      Unparseable JSON

            prajnoha@redhat.com Peter Rajnoha
            mkelly_alteeve Madison Kelly (Inactive)
            lvm-team lvm-team
            Cluster QE Cluster QE
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: