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

Add Routable to Actual LRP #71

Merged

Conversation

mariash
Copy link
Member

@mariash mariash commented Jun 29, 2023

What is this change about?

Add Routable property to Actual LRP, accept it in StartActualLRP call and pass down to events consumed by route emitter.

This PR accompanies executor PR Once executor emits ContainerRunning event rep will send information to BBS in StartActualLRP call, which would include information whether the container is routable.

How should this change be described in diego-release release notes?

Support readiness health checks

Please provide any contextual information.

RFC

Thank you!

jrussett and others added 5 commits June 22, 2023 21:04
These readiness_checks will be used to validate the viability of the app
actually serving traffic.

Desired LRP check_definition is now of the form:
```diff
"check_definition": {
    "checks": [
      {
        "http_check": {
          "port": 8080,
          "path": "/health",
          "request_timeout_ms": 10000,
          "interval_ms": 123
        },
      }
    ],
+   "readiness_checks": [
+     {
+       "tcp_check": {
+         "port": 8080,
+         "connect_timeout_ms": 10000,
+         "interval_ms": 123
+       },
+     }
+   ],
    "log_source": ""
  },
```

Check json example adapted from our design document (Publicly Accessible):
https://docs.google.com/document/d/1AS8GzKg3pdAv56nySQTgF4NaqqzrBwmztkL2_8ahKa4/edit?usp=sharing

[#185035661](https://www.pivotaltracker.com/story/show/185035661)
In order to be able to distinguish between actual_lrps that are ready to
serve traffic (i.e. have passed their readiness checks if present), we
need to add a field to the actual_lrps to persist this information.

We have decided to call this field `routable`, it is a boolean (can only
be true/false) and has a default value of `false` when the ActualLRP is
created.

This commit does the following:
- adds the `routable` field to the `actual_lrp` protobuf message
- regenerate the protobuf files
- adds `routable` field to the ActualLRP model
- automatically adds `routable: false` when creating an Unclaimed Actual
  LRP

We also updated the in-repo documentation to account for this change.

This commit is part of a larger effort to improve the app healthchecks.
To see what we are doing, look at this (publically available) design
doc:
- https://docs.google.com/document/d/1AS8GzKg3pdAv56nySQTgF4NaqqzrBwmztkL2_8ahKa4/edit#

[#185037071](https://www.pivotaltracker.com/story/show/185037071)

Signed-off-by: Renee Chu <[email protected]>
@mariash mariash requested a review from a team as a code owner June 29, 2023 22:37
@ameowlia ameowlia requested review from ameowlia and removed request for a team June 30, 2023 19:03
doc/schema-description.md Outdated Show resolved Hide resolved
mariash and others added 5 commits June 30, 2023 20:28
Signed-off-by: Renee Chu <[email protected]>
For backwards compatibility with old BBS, ActualLRP message will have an
optional Routable. When it is not set Route Emitter will treat the LRP
as routable.

Evacuation LRP request now can take optional routable.
@mariash mariash merged commit 02f26c7 into main Jul 14, 2023
@mariash mariash deleted the add-condition-property-to-actual-lrp-definition-185037071 branch July 14, 2023 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants