alert on lack of explicit default bindings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Juju Lint |
Fix Released
|
High
|
Martin Kalcok |
Bug Description
If I understand correctly, whenever an endpoint is not explicitly bound to a space, the network-get primitive for a relation bound to it will return binding address(es) / ingress address(es) / egress subnets as if that endpoint had been bound to the default space for the application.
However, if the default space has not been specified, the addresses returned are somewhat random.
For multi-homed units, this can result in unexpected addresses being returned (see for example LP#1850129).
It would be good if juju-lint were to warn whenever no default space has been specified. We could optionally make an exception for applications that specify explicit bindings for all their endpoints, but not for specify a default one, although I think it would be more robust to ensure we always have a default to fall back onto, as newer charm releases may always introduce new endpoints.
Related branches
- Gabriel Cocenza: Approve
-
Diff: 144 lines (+92/-5)3 files modifiedjujulint/check_spaces.py (+9/-1)
jujulint/lint.py (+13/-4)
tests/test_jujulint.py (+70/-0)
- James Troup (community): Needs Fixing
-
Diff: 206 lines (+182/-0)2 files modifiedcontrib/includes/bindings.yaml (+137/-0)
jujulint/lint.py (+45/-0)
summary: |
- alert on lack of explicit default binding + alert on lack of explicit default bindings |
tags: | added: bseng-21 |
Changed in juju-lint: | |
assignee: | nobody → Martin Kalcok (martin-kalcok) |
Changed in juju-lint: | |
status: | Triaged → In Progress |
Changed in juju-lint: | |
status: | In Progress → Fix Released |
Another approach could be including known peer relations to the list LP#1840814 is concerned with (unfortunately juju status doesn't distinguish between peer and non-peer relations), and simply rely on juju 2.7+ to be able to adjust bindings after deployment.