Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-6248

[linearstore] Symlink creation fails if store dir path is not absolute

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.30
    • 0.31
    • C++ Broker
    • None

    Description

      Thanks to Alan Conway for finding this bug:

      I uncovered a bug in the way symlinks are created if the data directory
      is not an absolute path. It appears that the code creating the symlink
      assumes that the path is absolute, which gives invalid symlinks. For
      example in the following the brokers working directory
      is /home/aconway/qpid/debug/src/tests/interop_tests.tmp/interop_tests.PythonTxTest.test_tx_simple_rollback
      and the data dir is "broker2"

      2014-11-18 11:26:33.216699232 [Store] debug Linear Store: Journal
      "TplStore":Journal directory = "broker2/qls/tpl/"
      
      ls -l /home/aconway/qpid/debug/src/tests/interop_tests.tmp/interop_tests.PythonTxTest.test_tx_simple_rollback/broker2/qls/jrnl/interop_tests.PythonTxTest.test_tx_simple_rollback-a
      total 4
      lrwxrwxrwx. 1 aconway aconway 71 Nov 18 11:18 3ee76ade-3793-4056-ac39-98f566cb345e.jrnl -> broker2/qls/p001/2048k/in_use/3ee76ade-3793-4056-ac39-98f566cb345e.jrnl
      [aconway@wallace dispatch (trunk)]$ 	
      

      I think you should be resolving the path to an absolute path (relative to current working dir) before creating the symlink.

      Attachments

        Activity

          People

            kpvdr Kim van der Riet
            kpvdr Kim van der Riet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: