Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not add indices to not empty alias #1408

Merged

Conversation

pavolloffay
Copy link
Member

Related to #1407

If the init was run after rollover action it would add indices to read and more importantly write alias. The write alias can contain only one index.

python3  esRollover.py init http://localhost:9200
CONDITIONS='{"max_age": "1s"}' python3  esRollover.py rollover http://localhost:9200
python3  esRollover.py init http://localhost:9200

Signed-off-by: Pavol Loffay ploffay@redhat.com

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@@ -132,6 +134,18 @@ def create_aliases(client, alias_name, archive_index_name):
alias.do_action()


def alias_is_not_empty(client, alias_name):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be called alias_is_empty?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, apart from that is it OK?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes LGTM.

@objectiser
Copy link
Contributor

@pavolloffay One question - just to confirm - the alias name is based on the jaeger instance? So even if the user is using a shared ES cluster, it will only be checking for alias's related to its own jaeger instance?

@pavolloffay
Copy link
Member Author

For shared instance one has to use prefixes

Copy link
Contributor

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once @objectiser's comments are addressed, LGTM

@objectiser
Copy link
Contributor

@pavolloffay Ok thanks - that is fine.

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@codecov
Copy link

codecov bot commented Mar 7, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@fcf13ca). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##             master   #1408   +/-   ##
========================================
  Coverage          ?    100%           
========================================
  Files             ?     164           
  Lines             ?    7502           
  Branches          ?       0           
========================================
  Hits              ?    7502           
  Misses            ?       0           
  Partials          ?       0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcf13ca...ca6357b. Read the comment docs.

@pavolloffay
Copy link
Member Author

xdock failed, but it's not related to this PR

@pavolloffay pavolloffay merged commit b5e2b65 into jaegertracing:master Mar 7, 2019
@ghost ghost removed the review label Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants