Skip to content

Conversation

buckett
Copy link
Contributor

@buckett buckett commented Jan 15, 2014

Allow the pipe to be configurable about what should happen when the command exists. Valid things todo are restart, restart on errors and never restart.

Allow the pipe to be configurable about what should happen when the command exists. Valid things todo are restart, restart on errors and never restart.
@jdve
Copy link

jdve commented Jan 15, 2014

+1

@jordansissel
Copy link
Contributor

Would you mind doing Step 2 of the CONTRIBUTING doc?

Copy link
Contributor

Choose a reason for hiding this comment

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

You can actually enforce enumerated validation here:

:validate => [ "always", "error", "never" ] 
@buckett
Copy link
Contributor Author

buckett commented Jan 28, 2014

I've signed the CLA .

Thanks for the tip about validation and I've improved the variable name.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is meant to be 'relaunch = ...' right? I can fix this post-merge

@buckett
Copy link
Contributor Author

buckett commented Feb 4, 2014

I've fixed the old use of should_restart sorry for not spotting that the first time around.

@buckett
Copy link
Contributor Author

buckett commented Apr 15, 2014

Is there anything else that needs doing to get this merged?

@wiibaa
Copy link
Contributor

wiibaa commented May 16, 2014

@colinsurprenant any chance to add this "little" one to 1.4.2 schedule, it could be considered a bugfix because #619 broke the use case where people used the pipe input as a backfill single execution as discussed in the comments of https://logstash.jira.com/browse/LOGSTASH-966.
This would also solve LOGSTASH-2206 open question

@colinsurprenant colinsurprenant added this to the v1.4.2 milestone May 16, 2014
@colinsurprenant
Copy link
Contributor

thanks, overall looks good. my only problem is that we don't have specs for this (there's none for the pipe input) so there's no way to validate this without running it. ideally if you could add specs, that would be great, otherwise I'll put it in the pipeline for the next release but will require us to add specs before including it for the release. let me know if you'd like to also work on the specs, we could certainly help you for this.

I am wondering why this 10 seconds sleep @jordansissel ? seems a very long delay?

@wiibaa
Copy link
Contributor

wiibaa commented May 17, 2014

@colinsurprenant I have made a PR with an initial spec here #1385 against the current master.
I suppose these specs should still be valid with this PR. I can make a new PR with extended spec after this one is merged

@colinsurprenant
Copy link
Contributor

Ok, thanks @wiibaa for the initial specs in #1385 - I'll get that in then we can test for this.

@colinsurprenant colinsurprenant self-assigned this May 20, 2014
@colinsurprenant
Copy link
Contributor

I merged #1385

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really like the

begin ... end while ...

construct. in this case since the logic is pretty simple, I'd put back the loop do and replace both relaunch = with a break.

 break unless @restart == "always" break unless @restart == "error"

and put back the sleep(10) at the end of the loop

Copy link
Contributor

Choose a reason for hiding this comment

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

and while at it, why don't we make the sleep time configurable and default to 10 seconds?

@buckett
Copy link
Contributor Author

buckett commented May 23, 2014

I opened this as a bugfix because of the original change introduced in: https://logstash.jira.com/browse/LOGSTASH-966
which meant that pipes carried on running forever ( a bug in my setup ).

@wiibaa
Copy link
Contributor

wiibaa commented May 23, 2014

@buckett your point is already clear, I simply restarted the discussion to get this PR merged. The question now is if you have time to look to Colin comments in the code and help get this merged hopefully soon

@buckett
Copy link
Contributor Author

buckett commented May 23, 2014

@wiibaa I will, but I don't have time in the next few weeks, if someone else is able to address Colin's points feel free to take over. And thanks for your help in getting eyes on this Wibba and sorting out the specs.

@jordansissel jordansissel modified the milestones: 1.4.3, v1.4.2 Jun 17, 2014
@wiibaa
Copy link
Contributor

wiibaa commented Aug 1, 2014

@jordansissel @colinsurprenant can you please close this one in favor of #1415

@elasticsearch-release
Copy link

Can one of the admins verify this patch?

@colinsurprenant
Copy link
Contributor

yup, closing for #1415 - thanks @buckett for your original work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants