[bug] etcd snapshots

  • Hi,


    I have the following when I try to list the snapshots in the web UI :


    Code
    omv-engined[133206]: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/share/openmediavault/engined/rpc/etcd.inc:63


    This is the offending part (/usr/share/openmediavault/engined/rpc/etcd.inc) :



    Code
                    foreach($output as $outputk => $outputv) {
                            $outputv['createdAtTs'] = strpdate($outputv['createdTs'],
                                    "Y-m-d*H:i:sT");
                            $result[] = $outputv;
                    }


    The executed shell command is : k3s etcd-snapshot ls --etcd-snapshot-dir /srv/dev-disk-by-uuid-5c645337-b50b-4cc4-a7e6-8a8c3710d1cb/k8s/etcd-snapshots 2>/dev/null --output json


    Which returns a JSON object.

    In the current form it returns :


    Code
    List
    v1
    Array
    Array


    I'm guessing something changed in the output of the k3s list command


    I came up with the following :


    I have no clue about PHP and stuff so I don't know how to test this. But the timestamp seems correct, hence it shouldn't return any error when trying to fetch the snapshot list :


    Code
    "createdAtTs":1715373523


    Br

  • chente

    Hat das Thema freigeschaltet.
  • votdev

    Hat das Label gelöst hinzugefügt.
  • votdev

    Hat das Label OMV 7.x hinzugefügt.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!