Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.3, 7.0
    • Component/s: scripts and tools
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      Moving some code from SOLR-7826 over here. This is a new AssertTool which can be used to assert that we are (not) root user and more. Usage:

      usage: bin/solr assert [-m <message>] [-e] [-rR] [-s <url>] [-S <url>] [-u
                      <dir>] [-x <dir>] [-X <dir>]
       -e,--exitcode                 Return an exit code instead of printing
                                     error message on assert fail.
       -m,--message <message>        Exception message to be used in place of
                                     the default error message
       -R,--not-root                 Asserts that we are NOT the root user
       -r,--root                     Asserts that we are the root user
       -S,--not-started <url>        Asserts that Solr is NOT running on a
                                     certain URL. Default timeout is 1000ms
       -s,--started <url>            Asserts that Solr is running on a certain
                                     URL. Default timeout is 1000ms
       -t,--ms <ms>                  Timeout in ms for commands supporting a
                                     timeout
       -u,--same-user <directory>    Asserts that we run as same user that owns
                                     <directory>
       -verbose                      Generate verbose log messages
       -x,--exists <directory>       Asserts that directory <directory> exists
       -X,--not-exists <directory>   Asserts that directory <directory> does NOT
                                     exist
      

      This can then also be used from bin/solr through e.g. run_tool assert -r, or from Java Code static methods such as AssertTool.assertSolrRunning(String url)

        Attachments

        1. SOLR-9610.patch
          11 kB
          Jan Høydahl
        2. SOLR-9610.patch
          7 kB
          Jan Høydahl
        3. SOLR-9610-timeout.patch
          16 kB
          Jan Høydahl
        4. SOLR-9610-timeout.patch
          8 kB
          Jan Høydahl

          Issue Links

            Activity

              People

              • Assignee:
                janhoy Jan Høydahl
                Reporter:
                janhoy Jan Høydahl
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: