8000 Rollover stops without any error in logs · Issue #1538 · elastic/curator · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Rollover stops without any error in logs #1538

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

Open
echerniak opened this issue Apr 15, 2020 · 5 comments
Open

Rollover stops without any error in logs #1538

echerniak opened this issue Apr 15, 2020 · 5 comments

Comments

@echerniak
Copy link

Expected Behavior

Rollover should succeed.

Actual Behavior

Rollover doesn't complete and no errors appear in logs.

Steps to Reproduce the Problem

  1. Create 3 indexes:
  curl -XPUT "http://elasticsearch:9200/index-2020.04.14-000001" -H 'Content-Type: application/json' -d'{}'
  curl -XPUT "http://elasticsearch:9200/index-2020.04.14-000002" -H 'Content-Type: application/json' -d'{}'
  curl -XPUT "http://elasticsearch:9200/index-2020.04.14-000003" -H 'Content-Type: application/json' -d'{}'
  1. Add all indexes into an alias, but leave is_write_index blank for one of them:

    curl -XPOST "http://elasticsearch:9200/_aliases" -H 'Content-Type: application/json' -d'{  "actions": [    {      "add": {        "index": "index-2020.04.14-000001",        "alias": "index_alias"      }    },    {      "add": {        "index": "index-2020.04.14-000002",        "alias": "index_alias",        "is_write_index": false      }    },    {      "add": {        "index": "index-2020.04.14-000003",        "alias": "index_alias",        "is_write_index": true      }    }  ]}'
  2. Run Curator with the following actions.yml:

    actions:
       1:
        action: rollover
        description: Rollover the index associated with alias 'index_alias', which should be in the form of index-YYYY.MM.DD-000001.
        options:
          name: index_alias
          conditions:
            max_age: 1m
          continue_if_exception: False
  3. The last record in Curator log is:

    2020-04-15 16:09:34,639 DEBUG              elasticsearch    log_request_success:125  < {"index-2020.04.14-000002":{"aliases":{"index_alias":{"is_write_index":false}}},"index-2020.04.14-000001":{"aliases":{"index_alias":{}}},"index-2020.04.14-000003":{"aliases":{"index_alias":{"is_write_index":true}}}}
    

    There is no error in the logs, which makes it difficult to identify the root problem.

Specifications

  • Version: Curator 5.8.1, Elasticsearch 7.6.1
  • Platform: Red Hat Enterprise Linux Server release 7.6 (Maipo)

Detailed Description

It seems like there are 2 problems:

  1. get_write_index procedure doesn't expect to receive index with alias without is_write_index parameter.

    It seems incorrect to me, because is_write_index is an optional parameter and this command still works fine:

    curl -XPOST "http://elasticsearch:9200/index_alias/_rollover/"
  2. After get_write_index procedure receives index with alias without is_write_index parameter, it raises an exception "Invalid alias: is_write_index not found in 1 to many alias". But this text is getting missed due to

    except Exception as e:
        if 'ASCII' in str(e):
            print('{0}'.format(e))
            print(__doc__)

    condition.

@untergeek
Copy link
Member
untergeek commented Apr 15, 2020

I can perhaps fix this, but you should also know that you should not rollover an alias that is associated with indices that do not have is_write_index set to either true or false. This is now default behavior when rollover aliases and indices are created. After rollover, the new index will have is_write_index set to true, and the old index will still have is_write_index present, but set to false. Curator deliberately will fail if you try to rollover an alias that does not have is_write_index set to either true or false for each associated index for this very reason.

If you're trying to keep an alias set to point to all indices in a group that is older and never had is_write_index, you should add that setting to those indices. Fortunately, Curator ought to be able to help with that.

@echerniak
Copy link
Author

I agree about setting is_write_index via curator and do it this way, thanks! However, I am more confused by the lack of errors in Curator logs. Is it possible to make them more informative when this situation occurs?

@untergeek
Copy link
Member

I will still look into that.

@rusnw
Copy link
rusnw commented Jun 2, 2020

Is the project still alive? We are experiencing big problems with the informativeness of the curator’s logs not only for this issue. One gets the feeling that the project is more likely to have died.

@untergeek
Copy link
Member

Not dead, but barely on life support. I just don't have a lot of time to spend on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
39EF None yet
Development

No branches or pull requests

3 participants
0