Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-5536

list-snapshots() doesn't include snapshot file with a custom name

XMLWordPrintable

    • Hide
      [standalone@embedded /] :take-snapshot(name="sp1")
      {
          "outcome" => "success",
          "result" => "/Users/chaowan/work/git/wildfly/wildfly/dist/target/wildfly-25.0.0.Beta1-SNAPSHOT/standalone/configuration/standalone_xml_history/sna
      pshot/sp1standalone.xml"
      }
      
      [standalone@embedded /] :list-snapshots()
      {
          "outcome" => "success",
          "result" => {
              "directory" => "/Users/chaowan/work/git/wildfly/wildfly/dist/target/wildfly-25.0.0.Beta1-SNAPSHOT/standalone/configuration/standalone_xml_hist
      ory/snapshot",
              "names" => []
          }
      }
      
      [standalone@embedded /] :take-snapshot()
      {
          "outcome" => "success",
          "result" => "/Users/chaowan/work/git/wildfly/wildfly/dist/target/wildfly-25.0.0.Beta1-SNAPSHOT/standalone/configuration/standalone_xml_history/sna
      pshot/20210805-155546958standalone.xml"
      }
      
      [standalone@embedded /] :list-snapshots()
      {
          "outcome" => "success",
          "result" => {
              "directory" => "/Users/chaowan/work/git/wildfly/wildfly/dist/target/wildfly-25.0.0.Beta1-SNAPSHOT/standalone/configuration/standalone_xml_hist
      ory/snapshot",
              "names" => ["20210805-155546958standalone.xml"]
          }
      }
      
      Show
      [standalone@embedded /] :take-snapshot(name="sp1") { "outcome" => "success", "result" => "/Users/chaowan/work/git/wildfly/wildfly/dist/target/wildfly-25.0.0.Beta1-SNAPSHOT/standalone/configuration/standalone_xml_history/sna pshot/sp1standalone.xml" } [standalone@embedded /] :list-snapshots() { "outcome" => "success", "result" => { "directory" => "/Users/chaowan/work/git/wildfly/wildfly/dist/target/wildfly-25.0.0.Beta1-SNAPSHOT/standalone/configuration/standalone_xml_hist ory/snapshot", "names" => [] } } [standalone@embedded /] :take-snapshot() { "outcome" => "success", "result" => "/Users/chaowan/work/git/wildfly/wildfly/dist/target/wildfly-25.0.0.Beta1-SNAPSHOT/standalone/configuration/standalone_xml_history/sna pshot/20210805-155546958standalone.xml" } [standalone@embedded /] :list-snapshots() { "outcome" => "success", "result" => { "directory" => "/Users/chaowan/work/git/wildfly/wildfly/dist/target/wildfly-25.0.0.Beta1-SNAPSHOT/standalone/configuration/standalone_xml_hist ory/snapshot", "names" => ["20210805-155546958standalone.xml"] } }
    • Undefined

      It's possible to take a snapshot with a custom name, e.g:

      [standalone@embedded /] :take-snapshot(name="sp1")
      {
          "outcome" => "success",
          "result" => "/Users/chaowan/work/git/wildfly/wildfly/dist/target/wildfly-25.0.0.Beta1-SNAPSHOT/standalone/configuration/standalone_xml_history/sna
      pshot/sp1standalone.xml"
      }
      

      It succeeded and a snapshot file sp1standalone.xml is generated, but it won't be included later in list-snapshots() result.

      Because the listSnapshots operation depends on BackupSnapshotInfo which filter files in snapshotsDirectory and only take files match timestamp prefix.

      I think it should pick files in snapshot directory with a more general filter.

              chaowan@redhat.com Chao Wang
              chaowan@redhat.com Chao Wang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: