Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes health_check_http_endpoint parameter being ignored even when set, failing app update #446

Open
erezdeveleap opened this issue Jan 19, 2023 · 0 comments
Labels

Comments

@erezdeveleap
Copy link

Hey!

We have re-defined out health checks yesterday to use http and their relative endpoints, and run the deployment
I.e:

health_check_http_endpoint = "/health"
health_check_type          = "http"

The deployment ran on numerous spaces for the space services, in which some spaces the got update just fine, and others didnt, outputting:
Error: The app is invalid: health_check_http_endpoint HTTP health check endpoint is not a valid URI path:

In my attempt to debug, I noticed that sometimes the health_check_http_endpoint wasn't applied, even though it was set fine
positive example:

~ resource "cloudfoundry_app" "app" {
      ~ docker_image               = "..." -> "..."
      + health_check_http_endpoint = "/health"
      ~ health_check_type          = "process" -> "http"
        id                         = "..."
        name                       = "..."
        # (17 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

negative example:

~ resource "cloudfoundry_app" "app" {
    ~ docker_image               = "..." -> "..."
    ~ health_check_type          = "process" -> "http"
      id                         = "..."
      name                       = "client"
      # (17 unchanged attributes hidden)
      # (1 unchanged block hidden)
  }

Looking at the tfstate, looks like it did configured it OK, however running cf get-health-check <APP> shows:

Getting health check type for...

health check type:          process
endpoint (for http type):

So now the state has "/health" and since it's not changing when I re-deploy, it won't add the endpoint - and continue to fail with the same error

I thought it had something with d.HasChange("health_check_http_endpoint"), but I am not sure anymore..
The manual fix is to revert this change (in our case - go back to process), let it deploy OK, and then re-deploy with the hope it will pick these 3 again

@loafoe loafoe added the bug label Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants