From b9acce198a8cd0ca7ec572aa9f4b24ce1a0adf21 Mon Sep 17 00:00:00 2001 From: Aaron Mildenstein Date: Fri, 23 Oct 2015 11:46:00 -0600 Subject: [PATCH 1/3] Add comments to explain the workarounds AWS Elasticsearch did some screwy things with the base code, requiring these workarounds for Curator to work. --- curator/api/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/curator/api/utils.py b/curator/api/utils.py index fcd92410..7ccd277c 100644 --- a/curator/api/utils.py +++ b/curator/api/utils.py @@ -89,8 +89,13 @@ def index_closed(client, index_name): :arg index_name: The index name :rtype: bool """ + # This workaround using the _cat API is for AWS Elasticsearch, since it does + # not allow users to poll the cluster state. It may also be faster than + # using the cluster state. if get_version(client) >= (1, 5, 0): indices = client.cat.indices(index=index_name, format='json', h='status') + # This workaround is also for AWS, as the _cat API still returns text/plain + # even with ``format='json'``. if not isinstance(indices, list): # content-type: text/plain indices = json.loads(indices) (index_info,) = indices From 3af69a6301bfbe9aff42527d8887e4a46ffc7fbb Mon Sep 17 00:00:00 2001 From: Aaron Mildenstein Date: Fri, 23 Oct 2015 11:46:51 -0600 Subject: [PATCH 2/3] Add NOTICE for better Apache2 compliance --- NOTICE | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 NOTICE diff --git a/NOTICE b/NOTICE new file mode 100644 index 00000000..712bbbd2 --- /dev/null +++ b/NOTICE @@ -0,0 +1,96 @@ +In accordance with section 4d of the Apache 2.0 license (http://www.apache.org/licenses/LICENSE-2.0), +this NOTICE file is included. + +All users mentioned in the CONTRIBUTORS file at https://github.com/elastic/curator/blob/master/CONTRIBUTORS +must be included in any derivative work. + +All conditions of section 4 of the Apache 2.0 license will be enforced: + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in + any medium, with or without modifications, and in Source or Object form, provided that You meet the + following conditions: + +a. You must give any other recipients of the Work or Derivative Works a copy of this License; and +b. You must cause any modified files to carry prominent notices stating that You changed the files; and +c. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, + trademark, and attribution notices from the Source form of the Work, excluding those notices that do + not pertain to any part of the Derivative Works; and +d. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that + You distribute must include a readable copy of the attribution notices contained within such NOTICE + file, excluding those notices that do not pertain to any part of the Derivative Works, in at least + one of the following places: within a NOTICE text file distributed as part of the Derivative Works; + within the Source form or documentation, if provided along with the Derivative Works; or, within a + display generated by the Derivative Works, if and wherever such third-party notices normally appear. + The contents of the NOTICE file are for informational purposes only and do not modify the License. + You may add Your own attribution notices within Derivative Works that You distribute, alongside or as + an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot + be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different + license terms and conditions for use, reproduction, or distribution of Your modifications, or for any + such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise + complies with the conditions stated in this License. + + Contributors: + * Jordan Sissel (jordansissel) (For Logstash, first and foremost) + * Shay Banon (kimchy) (For Elasticsearch, of course!) + * Aaron Mildenstein (untergeek) + * Njal Karevoll + * François Deppierraz + * Honza Kral (HonzaKral) + * Benjamin Smith (benjaminws) + * Colin Moller (LeftyBC) + * Elliot (edgeofnite) + * Ram Viswanadha (ramv) + * Chris Meisinger (cmeisinger) + * Stuart Warren (stuart-warren) + * (gitshaw) + * (sfritz) + * (sjoelsam) + * Jose Diaz-Gonzalez (josegonzalez) + * Arie Bro (arieb) + * David Harrigan (dharrigan) + * Mathieu Geli (gelim) + * Nick Ethier (nickethier) + * Mohab Usama (mohabusama) + * (gitshaw) + * Stuart Warren (stuart-warren) + * Xavier Calland (xavier-calland) + * Chad Schellenger (cschellenger) + * Kamil Essekkat (ekamil) + * (gbutt) + * Ben Buchacher (bbuchacher) + * Ehtesh Choudhury (shurane) + * Markus Fischer (mfn) + * Fabien Wernli (faxm0dem) + * Michael Weiser (michaelweiser) + * (digital-wonderland) + * cassiano (cassianoleal) + * Matt Dainty (bodgit) + * Alex Philipp (alex-sf) + * (krzaczek) + * Justin Lintz (jlintz) + * Jeremy Falling (jjfalling) + * Ian Babrou (bobrik) + * Ferenc Erki (ferki) + * George Heppner (gheppner) + * Matt Hughes (matthughes) + * Brian Lalor (blalor) + * Paweł Krzaczkowski (krzaczek) + * Ben Tse (bt5e) + * Tom Hendrikx (whyscream) + * Christian Vozar (christianvozar) + * Magnus Baeck (magnusbaeck) + * Robin Kearney (rk295) + * (cfeio) + * (malagoli) + * Dan Sheridan (djs52) + * Michael-Keith Bernard (SegFaultAX) + * Simon Lundström (simmel) + * (pkr1234) + * Mark Feltner (feltnerm) + * William Jimenez (wjimenez5271) + * Jeremy Canady (jrmycanady) + * Steven Ottenhoff (steffo) + * Ole Rößner (Basster) + * Jack (univerio) From 0bc5890f5ced865dd3298aedd0eed2d550bd1625 Mon Sep 17 00:00:00 2001 From: Aaron Mildenstein Date: Fri, 23 Oct 2015 11:47:42 -0600 Subject: [PATCH 3/3] Update Changelog, CONTRIBUTORS, and version 3.4.0.rc1, here we come --- CONTRIBUTORS | 1 + Changelog.rst | 1 + curator/_version.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 8644a9ca..b00767b3 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -63,3 +63,4 @@ Contributors: * Jeremy Canady (jrmycanady) * Steven Ottenhoff (steffo) * Ole Rößner (Basster) +* Jack (univerio) diff --git a/Changelog.rst b/Changelog.rst index 440a2cfb..cca134c2 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -17,6 +17,7 @@ Changelog * es_repo_mgr now has access to the same SSL options from #462. #489 (untergeek) * Logging improvements requested in #475. (untergeek) * Added ``--quiet`` flag. #494 (untergeek) + * Fixed ``index_closed`` to work with AWS Elasticsearch. #499 (univerio) 3.3.0 (31 August 2015) ---------------------- diff --git a/curator/_version.py b/curator/_version.py index 767bfc43..9569e24e 100644 --- a/curator/_version.py +++ b/curator/_version.py @@ -1 +1 @@ -__version__ = '3.4.0.dev1' +__version__ = '3.4.0.rc1'