Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9885

Allow pre-startup Solr log management in Solr bin scripts to be disabled.

    Details

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

      Description

      There is log rotation and log archiver in solr starter script, which is failing if solr is deployed with custom log configuration (different log filename). Also inconvenient if using custom log rotation/management.
      https://github.com/apache/lucene-solr/blob/master/solr/bin/solr#L1464

      Proposing an environment setting, something like SOLR_LOG_PRESTART_ROTATION (with default true), that makes the execution of the four lines configurable.

      1. SOLR-9885.patch
        4 kB
        Mano Kovacs
      2. SOLR-9885.patch
        3 kB
        Mano Kovacs
      3. SOLR-9885.patch
        3 kB
        Mano Kovacs

        Issue Links

          Activity

          Hide
          markrmiller@gmail.com Mark Miller added a comment -

          +1

          Show
          markrmiller@gmail.com Mark Miller added a comment - +1
          Hide
          manokovacs Mano Kovacs added a comment -

          Adding patch for proposed solution. Reviews are welcome!

          Show
          manokovacs Mano Kovacs added a comment - Adding patch for proposed solution. Reviews are welcome!
          Hide
          manokovacs Mano Kovacs added a comment -

          Adding missing set to the solr.in.cmd.

          Show
          manokovacs Mano Kovacs added a comment - Adding missing set to the solr.in.cmd .
          Hide
          manokovacs Mano Kovacs added a comment -

          Any review would be greatly appreciated!

          Show
          manokovacs Mano Kovacs added a comment - Any review would be greatly appreciated!
          Hide
          janhoy Jan Høydahl added a comment -

          Makes sense

          But perhaps document better what SOLR_LOG_ROTATION=false actually does, it now sounds as if log rotation will be disabled if set to false, but it only affects pre-start custom rotation, not the solr.log rotation or gc-log rotation! Perhaps a better name would be SOLR_LOG_PRESTART_ROTATION or similar?

          Show
          janhoy Jan Høydahl added a comment - Makes sense But perhaps document better what SOLR_LOG_ROTATION=false actually does, it now sounds as if log rotation will be disabled if set to false, but it only affects pre-start custom rotation, not the solr.log rotation or gc-log rotation! Perhaps a better name would be SOLR_LOG_PRESTART_ROTATION or similar?
          Hide
          manokovacs Mano Kovacs added a comment -

          Jan Høydahl, thank you for the feedback. Yes, more descriptive name would be more appropriate. I update the documentation as well and submit a new patch.

          Show
          manokovacs Mano Kovacs added a comment - Jan Høydahl , thank you for the feedback. Yes, more descriptive name would be more appropriate. I update the documentation as well and submit a new patch.
          Hide
          manokovacs Mano Kovacs added a comment -

          Renaming env var, making doc more descriptive.

          Show
          manokovacs Mano Kovacs added a comment - Renaming env var, making doc more descriptive.
          Hide
          janhoy Jan Høydahl added a comment -

          Looks good to me. Have you tested for both Linux and Windows?

          Show
          janhoy Jan Høydahl added a comment - Looks good to me. Have you tested for both Linux and Windows?
          Hide
          manokovacs Mano Kovacs added a comment -

          Jan Høydahl, thanks for the review! I did test on Linux, but I did not have chance to test it on Windows. I relied on other if-conditions in the cmd. Could someone verify the change on Windows?

          Show
          manokovacs Mano Kovacs added a comment - Jan Høydahl , thanks for the review! I did test on Linux, but I did not have chance to test it on Windows. I relied on other if-conditions in the cmd. Could someone verify the change on Windows?
          Hide
          markrmiller@gmail.com Mark Miller added a comment -

          I'll test it on windows. Thought it would be quick but forgot my SSD died a while back and I lost my virtual box files. Now I've re created everything, so I'll review and check Windows.

          Show
          markrmiller@gmail.com Mark Miller added a comment - I'll test it on windows. Thought it would be quick but forgot my SSD died a while back and I lost my virtual box files. Now I've re created everything, so I'll review and check Windows.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 075aec91cd2c10e3f9a62adcf0feadc705c205ec in lucene-solr's branch refs/heads/master from markrmiller
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=075aec9 ]

          SOLR-9885: Allow pre-startup Solr log management in Solr bin scripts to be disabled.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 075aec91cd2c10e3f9a62adcf0feadc705c205ec in lucene-solr's branch refs/heads/master from markrmiller [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=075aec9 ] SOLR-9885 : Allow pre-startup Solr log management in Solr bin scripts to be disabled.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 88a88a0aa736926a7db4c21ebf11086344b236fa in lucene-solr's branch refs/heads/branch_6x from markrmiller
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=88a88a0 ]

          SOLR-9885: Allow pre-startup Solr log management in Solr bin scripts to be disabled.

          1. Conflicts:
          2. solr/CHANGES.txt
          Show
          jira-bot ASF subversion and git services added a comment - Commit 88a88a0aa736926a7db4c21ebf11086344b236fa in lucene-solr's branch refs/heads/branch_6x from markrmiller [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=88a88a0 ] SOLR-9885 : Allow pre-startup Solr log management in Solr bin scripts to be disabled. Conflicts: solr/CHANGES.txt
          Hide
          markrmiller@gmail.com Mark Miller added a comment -

          Windows works fine.

          Show
          markrmiller@gmail.com Mark Miller added a comment - Windows works fine.

            People

            • Assignee:
              markrmiller@gmail.com Mark Miller
              Reporter:
              manokovacs Mano Kovacs
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development