linkerd2/controller/api/destination
Oliver Gould 3c91fc64ce
fix(destination): avoid panic on missing managed fields timestamp (#13378)
We received a report of a panic:

    runtime error: invalid memory address or nil pointer dereference

    panic({0x1edb860?, 0x37a6050?}
        /usr/local/go/src/runtime/panic.go:785 +0x132

    github.com/linkerd/linkerd2/controller/api/destination/watcher.latestUpdated({0xc0006b2d80?, 0xc00051a540?, 0xc0008fa008?})
        /linkerd-build/vendor/github.com/linkerd/linkerd2/controller/api/destination/watcher/endpoints_watcher.go:1612 +0x125

    github.com/linkerd/linkerd2/controller/api/destination/watcher.(*OpaquePortsWatcher).updateService(0xc0007d5480, {0x21fd160?, 0xc000d71688?}, {0x21fd160, 0xc000d71688})
        /linkerd-build/vendor/github.com/linkerd/linkerd2/controller/api/destination/watcher/opaque_ports_watcher.go:141 +0x68

The `latestUpdated` function does not properly handle the case where a atime is
omitted from a `ManagedFieldsEntry`.

    type ManagedFieldsEntry struct {
        // Time is the timestamp of when the ManagedFields entry was added. The
        // timestamp will also be updated if a field is added, the manager
        // changes any of the owned fields value or removes a field. The
        // timestamp does not update when a field is removed from the entry
        // because another manager took it over.
        // +optional
        Time *Time `json:"time,omitempty" protobuf:"bytes,4,opt,name=time"`

This change adds a check to avoid the nil dereference.
2024-11-22 15:21:09 -08:00
..
external-workload build(deps): bump k8s.io/client-go from 0.30.3 to 0.31.0 (#12958) 2024-09-04 09:04:04 -05:00
watcher fix(destination): avoid panic on missing managed fields timestamp (#13378) 2024-11-22 15:21:09 -08:00
client.go build(deps): bump google.golang.org/grpc from 1.63.2 to 1.64.0 (#12593) 2024-05-22 14:40:04 -05:00
dedup_profile_listener.go destination: Avoid sending spurious profile updates (#10517) 2023-03-13 13:36:18 -07:00
default_profile_listener.go destination: Avoid sending spurious profile updates (#10517) 2023-03-13 13:36:18 -07:00
destination_fuzzer.go feat(destination): set parent and profile references (#13292) 2024-11-09 00:11:40 +00:00
endpoint_profile_translator.go feat(destination): Add meshed HTTP/2 keep-alive settings (#12504) 2024-04-30 19:35:30 +00:00
endpoint_profile_translator_test.go Fix flakey Handles_overflow test (#12555) 2024-05-07 13:06:58 -07:00
endpoint_translator.go Add federated service watcher (#13267) 2024-11-08 09:34:01 -08:00
endpoint_translator_test.go Export zone locality in outbound destination metrics (#13129) 2024-10-15 13:43:05 -07:00
fallback_profile_listener.go destination: Avoid sending spurious profile updates (#10517) 2023-03-13 13:36:18 -07:00
fallback_profile_listener_test.go destination: Avoid sending spurious profile updates (#10517) 2023-03-13 13:36:18 -07:00
federated_service_watcher.go Add tests for federated service watcher (#13329) 2024-11-19 10:08:50 -08:00
federated_service_watcher_test.go Add tests for federated service watcher (#13329) 2024-11-19 10:08:50 -08:00
opaque_ports_adaptor.go destination: Avoid sending spurious profile updates (#10517) 2023-03-13 13:36:18 -07:00
profile_translator.go feat(destination): set parent and profile references (#13292) 2024-11-09 00:11:40 +00:00
profile_translator_test.go feat(destination): set parent and profile references (#13292) 2024-11-09 00:11:40 +00:00
server.go feat(destination): set parent and profile references (#13292) 2024-11-09 00:11:40 +00:00
server_ipv6_test.go Add IPv6 support for the destination controller (#12428) 2024-05-02 14:39:05 -05:00
server_test.go Add `accessPolicy` field to Server CRD (#12845) 2024-07-22 09:01:09 -05:00
syncronized_get_stream.go Add federated service watcher (#13267) 2024-11-08 09:34:01 -08:00
test_util.go Add federated service watcher (#13267) 2024-11-08 09:34:01 -08:00