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

Existing violations allow bypassing policy rules when adding new replicas

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 8.5, 8.6, 9.0
    • 8.6
    • AutoScaling
    • None

    Description

      Steps to reproduce:

      • start with an empty cluster policy.
      • create a collection with as many replicas as there are nodes.
      • add one more replica to any node. Now this node has two replicas, all other nodes have one. 
      • define the following cluster policy:
      { 'set-cluster-policy': [ {'replica': '<2', 'shard': '#ANY', 'node': '#ANY', 'strict': true} ] } 

      This automatically creates a violation because of the existing layout.

      • try adding one more replica. This should fail because no node satisfies the rules (there must be at most 1 replica per node). However, the command succeeds and adds replica to the node that already has 2 replicas, which clearly violates the policy and makes matters even worse.

       

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            noble.paul Noble Paul
            ab Andrzej Bialecki
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m

                Slack

                  Issue deployment