Skip to content

Commit

Permalink
Update all Dora custom start commands and Procfile to specify host
Browse files Browse the repository at this point in the history
This caused an issue in cf-for-k8s because sidecar proxies in Istio 1.10
no longer redirect traffic to processes bound to the loopback address by
default

Similar to this CATS commit:
d1565b0962d925976cacc755ded9c6ad158fc863

Authored-by: Tim Downey <tdowney@vmware.com>
  • Loading branch information
tcdowney committed Jul 29, 2021
1 parent 13121d6 commit 2227ac3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions assets/dora/Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
web: bundle exec rackup config.ru -p $PORT
worker: bundle exec rackup config.ru -p $PORT
web: bundle exec rackup config.ru -p $PORT -o 0.0.0.0
worker: bundle exec rackup config.ru -p $PORT -o 0.0.0.0
4 changes: 2 additions & 2 deletions baras/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ applications:
Expect(string(response)).To(ContainSubstring("200 OK"))

webProcess = GetProcessByGuid(webProcessWithCommandRedacted.Guid)
Expect(webProcess.Command).To(Equal("bundle exec rackup config.ru -p $PORT"))
Expect(webProcess.Command).To(Equal("bundle exec rackup config.ru -p $PORT -o 0.0.0.0"))
})

It("prioritizes the manifest command over the Procfile and can be reset via manifest", func() {
Expand Down Expand Up @@ -174,7 +174,7 @@ applications:
PollJob(GetJobPath(response))

webProcess = GetProcessByGuid(webProcessWithCommandRedacted.Guid)
Expect(webProcess.Command).To(Equal("bundle exec rackup config.ru -p $PORT"))
Expect(webProcess.Command).To(Equal("bundle exec rackup config.ru -p $PORT -o 0.0.0.0"))
})
})
})
6 changes: 3 additions & 3 deletions baras/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,12 @@ applications:
WHAT_AM_I: MOTORCYCLE
sidecars:
- name: 'left_sidecar'
command: WHAT_AM_I=LEFT_SIDECAR bundle exec rackup config.ru -p 8081
command: WHAT_AM_I=LEFT_SIDECAR bundle exec rackup config.ru -o 0.0.0.0 -p 8081
memory: 10M
process_types: ['web']
- name: 'right_sidecar'
process_types: ['web']
command: WHAT_AM_I=RIGHT_SIDECAR bundle exec rackup config.ru -p 8082
command: WHAT_AM_I=RIGHT_SIDECAR bundle exec rackup config.ru -o 0.0.0.0 -p 8082
memory: 20M
`, apps[0].name)
Expand Down Expand Up @@ -726,7 +726,7 @@ applications:
- type: logs
instances: 1
memory: 4096M
command: "bundle exec rackup config.ru -p $PORT"
command: "bundle exec rackup config.ru -o 0.0.0.0 -p $PORT"
disk_quota: 1024M
health-check-type: http
health-check-http-endpoint: '/'
Expand Down
6 changes: 3 additions & 3 deletions baras/revisions.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ var _ = Describe("revisions", func() {
)

BeforeEach(func() {
newCommand = "cmd=real bundle exec rackup config.ru -p $PORT"
newCommand = "cmd=real bundle exec rackup config.ru -p $PORT -o 0.0.0.0"
SetCommandOnProcess(appGUID, "web", newCommand)
})

Expand Down Expand Up @@ -212,7 +212,7 @@ var _ = Describe("revisions", func() {
)

BeforeEach(func() {
newCommand = "cmd=real bundle exec rackup config.ru -p $PORT"
newCommand = "cmd=real bundle exec rackup config.ru -p $PORT -o 0.0.0.0"
SetCommandOnProcess(appGUID, "web", newCommand)
})

Expand Down Expand Up @@ -279,7 +279,7 @@ var _ = Describe("revisions", func() {
)

BeforeEach(func() {
newCommand = "cmd=real bundle exec rackup config.ru -p $PORT"
newCommand = "cmd=real bundle exec rackup config.ru -p $PORT -o 0.0.0.0"
SetCommandOnProcess(appGUID, "web", newCommand)
})

Expand Down
4 changes: 2 additions & 2 deletions baras/sidecars.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ var _ = Describe("sidecars", func() {

Context("when the app has a sidecar associated with its web process", func() {
BeforeEach(func() {
CreateSidecar("my_sidecar1", []string{"web"}, fmt.Sprintf("WHAT_AM_I=LEFT_SIDECAR bundle exec rackup config.ru -p %d", 8081), 50, appGUID)
CreateSidecar("my_sidecar2", []string{"web"}, fmt.Sprintf("WHAT_AM_I=RIGHT_SIDECAR bundle exec rackup config.ru -p %d", 8082), 100, appGUID)
CreateSidecar("my_sidecar1", []string{"web"}, fmt.Sprintf("WHAT_AM_I=LEFT_SIDECAR bundle exec rackup config.ru -o 0.0.0.0 -p %d", 8081), 50, appGUID)
CreateSidecar("my_sidecar2", []string{"web"}, fmt.Sprintf("WHAT_AM_I=RIGHT_SIDECAR bundle exec rackup config.ru -o 0.0.0.0 -p %d", 8082), 100, appGUID)

appEndpoint := fmt.Sprintf("/v2/apps/%s", appGUID)
extraPortsJSON, err := json.Marshal(
Expand Down

0 comments on commit 2227ac3

Please sign in to comment.