Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-20523

Cannot get information about symlinks to symlinks with vfs.*.get

XMLWordPrintable

    • Sprint 85 (Feb 2022), Sprint 86 (Mar 2022), Sprint 87 (Apr 2022), Sprint 88 (May 2022), Sprint 89 (Jun 2022), Sprint 90 (Jul 2022)
    • 0.5

      Steps to reproduce:

      1. Create test directories:
        mkdir -p /tmp/{test,test-1,test-2}
        
      2. Inside /tmp/test, create symlinks:
        cd /tmp/test; ln -s ../test-1 1; ln -s ../test-2 2; ln -s 2 current
        
      3. Get the directory listing with vfs.dir.get, i.e.:
      zabbix_agentd -t 'vfs.dir.get[/tmp/test]' | awk '{print $2}' | sed -e 's/^...//' -e 's/.$//' | jq .[].basename
      

      Result:

      vfs.dir.get resolves the current symlink and returns information about its target:

      "test-2"
      "test-1"
      "test-2"
      

      Expected:

      "current"
      "test-1"
      "test-2"
      

      vfs.file.get[/tmp/test/current] also returns information about test-2. There is no way to find out what current points to.

            ak Andrejs Kozlovs
            mbakke Marius Bakke
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: