Bug 204934 - sysutils/logstash: Update to 2.1.0
Summary: sysutils/logstash: Update to 2.1.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jason Unovitch
URL:
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2015-12-01 14:24 UTC by Davide D'Amico
Modified: 2015-12-03 11:51 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
Patch to 2.1.0 (172 bytes, patch)
2015-12-01 14:26 UTC, Davide D'Amico
no flags Details | Diff
logstash.conf.sample.diff (1.03 KB, patch)
2015-12-01 15:56 UTC, Davide D'Amico
no flags Details | Diff
logstash 2.1.0: svn patch (zipped) (84.41 KB, patch)
2015-12-01 23:48 UTC, Enrico M. Crisostomo
enrico.m.crisostomo: maintainer-approval+
Details | Diff
logstash 2.1.0: poudriere testport output on FreeBSD 10.2 (20.38 KB, text/plain)
2015-12-01 23:49 UTC, Enrico M. Crisostomo
no flags Details
logstash 2.1.0: poudriere testport output on FreeBSD 9.3 (20.42 KB, text/plain)
2015-12-02 08:03 UTC, Enrico M. Crisostomo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Davide D'Amico 2015-12-01 14:24:25 UTC
The attached patch will upgrade sysutils/logstash to 2.1.0, the actual stable version.
Comment 1 Davide D'Amico 2015-12-01 14:26:19 UTC
Created attachment 163706 [details]
Patch to 2.1.0
Comment 2 Enrico M. Crisostomo 2015-12-01 14:50:09 UTC
Thank you very much Davide, I'm testing it today on Poudriere. By the way, I see that make check-orphans fails:

% make check-orphans                                                                                                                               git:master
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: @dir logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/test/db
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1

Stop.
Comment 3 Enrico M. Crisostomo 2015-12-01 14:57:53 UTC
Hi David,

In fact it seems that in your patch you removed this directory instead of updating its name:

-@dir logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.1/test/db

Now, I've updated it 

-@dir logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.1/test/db
+@dir logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/test/db

and check-orphans is OK:

% make check-orphans                                                                                                                               git:master
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)

I will attach a new patch after I finish testing.
Comment 4 Enrico M. Crisostomo 2015-12-01 15:09:32 UTC
Hi David,

The port ships default configuration files and they aren't compatible with Logstash 2 any longer.  For example:

  1 - Error: The setting `host` in plugin `elasticsearch` is obsolete and is no longer available.

  2 - Unknown setting 'debug' for stdout.

  3 - Unknown setting 'embedded' for elasticsearch.

As installed by the port, the logstash service will fail to start.

Cheers,
-- 
Enrico
Comment 5 Enrico M. Crisostomo 2015-12-01 15:14:48 UTC
To keep everybody in the same page: one of the reasons I was delaying the update to v. 2 is that embedded Elasticsearch has been removed entirely and a rewrite of Logstash' configuration file templates was required.  This patch does not fix that, and it must be done.  There are two options:

  1 - Either a dependency to a matching Elasticsearch is introduced.
  2 - Or the user is left with the responsibility of configuring its own instance.

I opt for the second, since in many cases Elasticsearch won't be installed into the same machine and the port will be more flexible.

I will update configuration scripts accordingly ASAP.
Comment 6 Davide D'Amico 2015-12-01 15:17:01 UTC
Unfortunately I uploaded an old patch, thanks for having fixed that.
Regarding the configuration files, I agree to use the second option.

Cheers,
d.
Comment 7 Davide D'Amico 2015-12-01 15:56:36 UTC
Created attachment 163709 [details]
logstash.conf.sample.diff
Comment 8 Davide D'Amico 2015-12-01 15:57:33 UTC
Comment on attachment 163709 [details]
logstash.conf.sample.diff

>--- logstash.conf.sample.orig   2015-12-01 10:55:31.418985000 -0500
>+++ logstash.conf.sample        2015-12-01 10:55:16.941392000 -0500
>@@ -40,16 +40,10 @@
>        # logstash.
>        # stdout { debug => "true" }
>
>-       # This will use elasticsearch to store your logs.
>-       # The 'embedded' option will cause logstash to run the elasticsearch
>-       # server in the same process, so you don't have to worry about
>-       # how to download, configure, or run elasticsearch!
>-       elasticsearch {
>-               embedded => true
>-               host => "127.0.0.1"
>-               # embedded_http_port => 9200
>-               # cluster => elasticsearch
>-               # host => host
>-               # port => port
>+       # Logstash 2.x does not include an embedded elasticsearch anymore, so
>+       # we are switching to output to a log file, as per:
>+       # https://www.elastic.co/guide/en/logstash/current/plugins-outputs-file.html
>+       file {
>+               path => "/var/log/logstash-output.log"
>        }
> }
Comment 9 Enrico M. Crisostomo 2015-12-01 23:48:00 UTC
Created attachment 163729 [details]
logstash 2.1.0: svn patch (zipped)
Comment 10 Enrico M. Crisostomo 2015-12-01 23:49:07 UTC
Created attachment 163730 [details]
logstash 2.1.0: poudriere testport output on FreeBSD 10.2
Comment 11 Enrico M. Crisostomo 2015-12-01 23:50:00 UTC
(In reply to Enrico M. Crisostomo from comment #9)

This patch file obsoletes the previous ones submitted by David D'Amico.
Comment 12 Enrico M. Crisostomo 2015-12-02 08:03:10 UTC
Created attachment 163738 [details]
logstash 2.1.0: poudriere testport output on FreeBSD 9.3
Comment 13 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-02 08:10:49 UTC
Comment on attachment 163706 [details]
Patch to 2.1.0

Oops sorry, wrong attachment
Comment 14 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-02 08:11:42 UTC
@Davide, can you obsolete your attachments please (if they are indeed now obsolete)

@Enrico, can you set maintainer-approval to + on the patch you would like to approve please
Comment 15 Davide D'Amico 2015-12-02 08:26:44 UTC
Patches obsoleted.

Thanks,
d.
Comment 16 Enrico M. Crisostomo 2015-12-02 10:39:27 UTC
(In reply to Kubilay Kocak from comment #14)

Done, thanks Kubilay.
Comment 17 Jason Unovitch freebsd_committer freebsd_triage 2015-12-02 23:49:53 UTC
QA checks looked mostly good.

* Minor observations I've already addressed.
- logtash -> logstash in the pkg-message.  I've already fixed this.

- UPDATING entry. I wrote "Logstash has been updated to the 2.1.0 release. The embedded ElasticSearch instance is no longer supported. If in use, end users must update logstash.conf to point to the URL of an ElasticSearch instance."

If you have any suggestions I'll work that in.

* Small question
- If the embedded elasticsearch is unsupported why are we installing an elasticsearch.yaml sample config?
Comment 18 Jason Unovitch freebsd_committer freebsd_triage 2015-12-02 23:50:06 UTC
(In reply to Enrico M. Crisostomo from comment #5)

> 1 - Either a dependency to a matching Elasticsearch is introduced.
> I opt for the second, since in many cases Elasticsearch won't be installed into the same machine and the port will be more flexible.

I absolutely concur.  The ElasticSearch may not be on the same host so introducing a hard dependency does not make sense.
Comment 19 Enrico M. Crisostomo 2015-12-03 00:11:08 UTC
(In reply to Jason Unovitch from comment #17)

Hi Jason, thanks for your improvements.

Regarding your question: I forgot to delete the Elasticsearch configuration file (elasticsearch.yaml), my mistake.  We can remove it from the port altogether.
Comment 20 commit-hook freebsd_committer freebsd_triage 2015-12-03 02:32:56 UTC
A commit references this bug:

Author: junovitch
Date: Thu Dec  3 02:32:13 UTC 2015
New revision: 402866
URL: https://svnweb.freebsd.org/changeset/ports/402866

Log:
  sysutils/logstash: update 1.5.4 -> 2.1.0

  - Update PORTVERSION, distinfo, and pkg-plist for 2.1.0
  - Update logstash.conf.sample and remove elasticsearch.yml.sample to
    reflect 2.1.0 no longer having an embedded ElasticSearch instance

  UPDATING: Document potential config file changes

  Changes:	https://github.com/elastic/logstash/blob/2.1/CHANGELOG.md

  PR:		204934
  Submitted by:	Davide D'Amico <davide.damico@gmail.com> (initial patch)
  Submitted by:	Enrico M. Crisostomo <enrico.m.crisostomo@gmail.com> (maintainer)

Changes:
  head/UPDATING
  head/sysutils/logstash/Makefile
  head/sysutils/logstash/distinfo
  head/sysutils/logstash/files/elasticsearch.yml.sample
  head/sysutils/logstash/files/logstash.conf.sample
  head/sysutils/logstash/pkg-message
  head/sysutils/logstash/pkg-plist
Comment 21 Jason Unovitch freebsd_committer freebsd_triage 2015-12-03 02:35:09 UTC
Excellent work and thank you both for the collaboration in getting this patch ready for commit!
Comment 22 commit-hook freebsd_committer freebsd_triage 2015-12-03 02:45:57 UTC
A commit references this bug:

Author: junovitch
Date: Thu Dec  3 02:45:42 UTC 2015
New revision: 402867
URL: https://svnweb.freebsd.org/changeset/ports/402867

Log:
  sysutils/logstash: fix stage; remove elasticsearch.yml from Makefile as well

  Point hat to:	junovitch
  PR:		204934

Changes:
  head/sysutils/logstash/Makefile
Comment 23 Enrico M. Crisostomo 2015-12-03 11:51:11 UTC
(In reply to Jason Unovitch from comment #21)

Thanks you Jason, and thank you for getting this update into the port tree.