-
Notifications
You must be signed in to change notification settings - Fork 635
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
Curator not compatible with elasticsearch 8.0.0 #1639
Comments
Please could u speed up with the solution? Due to the Elastic 8 being released a long time ago. |
I cannot promise any rapid release of a version of Curator that supports ES 8. There are multiple API calls that have changed, and those will have to be addressed. What is in Curator that is not in ILM and SLM that you require Curator for? If you're using ES 8, you have both ILM and SLM to cover a great many things, and while I know the feature set isn't perfectly aligned between the two, it seems unusual to me that you would require Curator, so you have piqued my curiosity. |
I am using a curator for the daily clearing of indices. I am rising it via cron and doing the cleaning. |
Does ILM not work for you? ILM's time-based policies should be able to accomplish this for you in a way that does not require cron. The bottom line is that Curator was created long before ILM existed, and is effectively deprecated for most index management use cases in favor of ILM. Curator remains for use cases that ILM cannot address, and for older clusters that do not support ILM. |
I will try, i will be back. |
I'm still using Curator because of this limitation in ILM. It would be nice to just continue using Curator though! edit: FWIW this is my 'fix' as none of the Elastic APIs i'm using have changed
|
It would definitely be nice to have Curator be maintained to support Elasticsearch 8.x. Using ILM requires that an index template be created for each index, which is not always desirable or feasible. I manage 8 separate instances of Elasticsearch for various production, staging, and development workloads. To be able to simply delete (prune older) indices of certain types by editing a Curator yml file is significantly less cumbersome and more convenient than setting up index templates for each separate instance. I hope you reconsider keeping this maintained, or consider providing a minor update to be able to delete indices on Elasticsearch 8.x. Thank you. |
Hey but it is binary |
Can anyone help, I downloaded the archive: |
@alex2013a90, I compiled the edited settings.py file and tested it on some Windows hosts running Elasticsearch 8.1.2 successfully. I don't have a Linux box to test against but feel free to use the attachment, which contains the recompiled settings.py file for Curator 5.8.4. |
We are also using Curator to snapshot indeces and delete old ones. We just upgraded to ES version 8 and run into the same problem here... Regards |
We rely on curator to avoid running out of space and were about to finally upgrade to ES v8. Thankfully, I found this ticket. How is curator still not compatible with v8+ yet? |
Just for info: We used snapshot and delete indeces with Curator. I contacted ES support and they recommended to use ILM and SLM, so we just ditched Curator and switched to ILM and SLM. Regards |
We specifically used the curator instead of ILM because to my knowledge, ILM can't maintain an aggregate max index size. So we're doing this:
If this is possible now with ILM or SLM, I'm all ears. |
Well, we don't have this use case. But check out the ILM docs, maybe this is doable with ILM. Regards |
It is not. ILM is time based, not size based. |
My Gist https://gist.github.com/anjia0532/d8e779c97333d6fc0d045675e18e1224 Chinese Blog 074-Elastic Curator 支持ES8.x docker pull anjia0532/curator:5.8.5 OR docker build . -t curator:5.8.5 FROM python:3.9.4-alpine3.13
# Chinese mirror
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \
# pip install -i https://mirrors.ustc.edu.cn/pypi/web/simple pip -U && \
# pip config set global.index-url https://mirrors.ustc.edu.cn/pypi/web/simple
RUN apk --no-cache add --virtual .build-deps git && \
git clone https://github.com/elastic/curator.git /tmp/curator && \
cd /tmp/curator && \
git checkout -b tags/v5.8.4 && \
wget -O /tmp/curator.patch https://gist.githubusercontent.com/anjia0532/d8e779c97333d6fc0d045675e18e1224/raw/5de8de9fd634afbc1fdbaf077f2e9e0c97638b43/elastic-curator-support-es-8-x.patch && \
git apply --check /tmp/curator.patch && \
git apply /tmp/curator.patch && \
apk del .build-deps
RUN cd /tmp/curator && python setup.py install
# Thanks for @arslanbekov
RUN rm -rf /tmp/curator |
@anjia0532 Thanks! But it's not working. First, in your script, the folder is deleted Correct script:
|
Thanks And Fixed it. |
I would also appreciate if Curator will support Elasticsearch 8. I have created simple library, which helps us automatize indices and mappings changes. Our indices use index and component templates, but are not time-based neither size-based (so afaik ILM is not an option for us), but we have multiple environments and making changes manually is very annoying. |
@untergeek May I kindly ask if there is any movement about this issue? ILM does NOT allow the removal of old indexes based on the disk used space, so if the cluster is running out of space it is throwing out the fresh logs instead of the old ones, and this is the only feature that I require from the curator. Ofc it is possible to use the hacks advice above, but it feels so ridiculously wrong. If the company is not willing to maintain this repo, then, please, allow someone else to do this job, officially. Thank you |
Hi there, can make ILM work for me. Would thank you dearly if you can speed up the support for vesion 8 ! Also, |
Update for all watching this issue: Work on getting Curator to work with Elasticsearch 8 is currently underway, aggressively. You should know, however, that it will not be compatible with older configuration files, though action files should still work the same way. The reason for this is that Elasticsearch 8 has an updated python client which has been updated (majorly) to remove older methods, and to name functions, methods, classes, etc. to conform to Elasticsearch native patterns. Additionally, Elasticsearch 8 has not only deprecated (which was done in Elasticsearch 7) but fully removed The changes to the python Elasticsearch 8 client are so substantial that I'm completely removing the client connection code from Curator in favor of making that its own module, Major version parity will be by major version names. Work on both Curator 6 and Curator 7 is effectively complete, and they are in the 6.0 and 7.x branches already, respectively. No releases have been made yet, however, as documentation needs to be updated. As with Curator 8, they will only work within the same major version, i.e. Curator 7.x will only work with Elasticsearch 7.x clusters, though Curator 6 retains reverse compatibility with both Elasticsearch 6 and Elasticsearch 5 clusters. As both Elasticsearch 6 and Elasticsearch 7 are effectively EOL (though Elasticsearch 7 continues to receive security patches and other updates for a time in the 7.17.x branch), I don't expect Curator 6 and 7 to change much other than to fix execution bugs and to update dependencies to newer versions as needed for security patches and such. It should also be noted that I will no longer be compiling and packaging Curator releases into DEB, RPM, or Windows MSI or Zip packages. Curator will be released to PyPi and Docker Hub (my personal repository there), and instructions will be shared for those who wish to build their own DEB/RPM/MSI/ZIP packages. The overhead of build-testing and maintaining the package repositories is part of the reason for slow release pacing, and I'd rather offer faster, more consistent updates without those luxuries than keep up the effort to maintain them. The Dockerfile in the root directory will be the one used for publication, so if you want to build your own you can use that, or alter it for your own purposes. As Travis CI is also something of a luxury for me, I will be testing releases against local Docker images, and including the scripts necessary to build them so that it is easy for anyone to do likewise. If I can keep it working with Travis CI, I will, but it, too is a bit slower on the draw, so I'd just as soon keep this small, knowable, and nimble. Other changes may follow. I was disappointed to learn that Python 3.10 has altered Collections such that I cannot easily make Curator work with it, though I haven't given up. I need to get Curator functional on Python 3.9 before I worry about 3.10+ support, so please be patient. The worry is that once I get it to work on 3.10, it may not work on 3.9, so there is that to consider. Thank you all for your patience as I have kept this project on hold for so long. A lot has been going on in everyone's lives since the last Curator release, and I am no exception. I'm now in a place where I have more time and autonomy so I can dedicate my personal resources to this, and I'm excited to move it forward. |
UPDATE: I have received some timely feedback from @sethmlarson and now believe I have a clean way forward to make it work with Python 3.10. You'll see it in the branch if I do get it there. |
@untergeek Hi there! Any updates in terms of new curator release? |
I just finished 2 weeks off work on vacation, followed immediately by my wife having surgery. I have fallen behind somewhat. No ETA yet. Tons of refactoring still to do. |
Thank you for your effort, should we be expecting it by Xmas ? |
My backup plan is just to use a simple Python script to delete old indices.
It's kind of surprising that no one has created a dirt simple curator in github |
Does this patch give you a functional curator? On my side, for a delete indices action against ES8, I get this:
|
@lsoica Test it by my docker image ? docker pull anjia0532/curator:5.8.5 |
@anjia0532 thank you.
|
I can tell you there is a huge push now to get Curator 8 out the door in rapid fashion, and I hope that it is fully available for the general public before the end of January now. I can also tell you that refactoring all of the APIs (and I mean all of them) is tedious and time consuming. I have to change not only the API calls that are made, but how the tests are structured, too. These changes will not be able to be backported to Curator 7 or Curator 6 (which will also be officially released at the same time as Curator 8), nor will any future work on Curator be backported to earlier releases. The nice thing is that the work I'm doing now will make it easier to release a Curator 9 when Elasticsearch 9 is released. What happened? Why did it take so much work to do this? In a nutshell, the elasticsearch python client was majorly refactored to more closely match the API of Elasticsearch itself. On the simple side, elasticsearch-py function calls which sent a JSON body (well, a Python As stated in previous communications, I am not a full-time developer anymore, so all of my work has been slower, and a labor of love. It was hard to find time, and it was hard to find motivation when these changes are so tedious to chase down and fix. Now, however, there is internal pressure to get this ready for the general public. I'm excited that I get a few weeks to use nearly all of my work time to get Curator 8 ready. It's still tedious, but I've made great progress on the lower-hanging fruit. I have a ton of work to do for There will also be a few new features with regards to ILM, possibly SLM, and definitely about moving indices/shards through different tiers. I will also need to make Curator work with Searchable Snapshots, which is entirely new. I appreciate the community's work in modifying older versions of Curator to ignore the NOTE: Curator 8 will NOT release on RPM/DEB packages any more. It will be available via source code, |
Also note that much of what I have had to refactor is the removal of the AWS-ES supporting code that resulted in using
A tremendous amount of code clean-up has happened. I should warn you all that your existing There is a simple example of how to build a CLI client which accepts a config file and will add and override that file with CLI-specified options here. Not all options are addressed, but the most common ones are, making this example usable out of the box for many applications. |
Hello @anjia0532 , I have used your docker image "anjia0532/curator:5.8.5" in the cronjob, but getting the below error, could you please assist
My cronjob yaml:
|
Progress Report
Last night I finished initial work on The What remains, if I'm this close? I have to finish I will likely do a pre-release at that point. I have some Searchable Snapshot functionality to add, but that won't matter to Basic License users of Elasticsearch. I will likely also need to get data tiers working ASAP as well, though this functionality is still covered by the Shard Allocation Routing that is already in Curator, from what I can tell. |
remove command , change args to 'curator --config /path/to/config_file.yml /path/to/action_file.yml' |
This is resolved with the release of Curator v8. |
This might be relevant for the docker image of curator in docker hub: docker/hub-feedback#2314 |
Thank you for the heads-up. As Curator is hosted on my personal, individual account, I do not believe this will affect me. I will eventually get around to having Curator's docker images hosted with Elastic, but for now, this seems safe. |
i'm trying to delete indices on es 8.3.3. container shows exit status 0 , but indices still exists
|
Your client YAML file raises a few questions. First, it doesn't look properly indented. Second, you have added These changes are all documented in the official documentation. These breaking changes are documented in the Changelog. Your client definition should look like this, instead:
I should also note that you should not be logging to |
in settings.py there is a check that prohibits curator to run against elasticsearch >=8.0.0. Can we get a new release that bumps that to 8?
The text was updated successfully, but these errors were encountered: