Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-30962

cbcollect_info: Windows directory formatting differences

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 5.0.1, 5.5.0
    • None
    • ns_server
    • None
    • Untriaged
    • Unknown

    Description

      There is a difference in the output of the Windows tasks which contain a directory in the name, some of these have double escaped

      \\

      and some only have a single \. This causes parts of Supportal to crash as it causes invalid JSON in some instances.

      Given how all our Support tools run on Unix based systems, we should standardise all Windows tasks to use

      \\

      in all places.

      Looking into this issue further, it seems that the winquote_path function within the script is not working as intended. For example, consider the part of cbcollect_info which collects the memcached.log file:

      WindowsTask("Memcached logs",
                          "cd " + winquote_path(read_guts(guts, "memcached_logs_path")) + " && " +
                          "for /f %a IN ('dir memcached.log.* /od /tw /b') do type %a",
                          log_file="memcached.log"),

      When compared to the header of the actual memcached.log collected:

      ==============================================================================
      Memcached logs
      cd "D:\Program Files\Couchbase\Server\var\lib\couchbase\logs" && for /f %a IN ('dir memcached.log.* /od /tw /b') do type %a
      ==============================================================================

      We can see that the output produced has not had its single \ replaced by a double one.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dfinlay Dave Finlay
            tim.bradgate Tim Bradgate (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty