cloudfoundry-attic / consul-release

This is a BOSH release for consul.
Apache License 2.0
10 stars 30 forks source link

awk -W interactive is not a useful flag #47

Closed keaty closed 8 years ago

keaty commented 8 years ago

I have a query around the consul agent start script. https://github.com/cloudfoundry-incubator/consul-release/blob/8aa2c923ff8bb5c058e965871d7357af19531731/jobs/consul_agent/templates/agent_ctl.sh.erb#L9-L10 ; It uses awk -W interactive which whilst a valid flag in mawk, is not any other awk variant. Many awk variants ignore the -W flag, but some throw errors.

This caused us an error earlier today, specifically that consul did not start on our instance of PCF. We are still unsure how that deploy received a different awk than usual, however it did, and at that point we looked into -W interactive, it is intended to cause fflush but only does so on mawk all other awk variants either ignore -W interactive or else throw an error and exit.

Keaty && Dave Goddard

cf-gitbot commented 8 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/130747035

The labels on this github issue will be updated when the story is started.

angelachin commented 8 years ago

Hi Keaty,

We looked into this and switched from awk to sed. This should solve your problem.

The update can be found at: https://github.com/cloudfoundry-incubator/consul-release/commit/86221316a238992ae2fab8b030647817a6bc0738

Cheers, Angela and @evanfarrar