Albin Kerouanton
5295e88ceb
daemon: rename: don't reload endpoint from datastore
...
Commit 8b7af1d0f added some code to update the DNSNames of all
endpoints attached to a sandbox by loading a new instance of each
affected endpoints from the datastore through a call to
`Network.EndpointByID()`.
This method then calls `Network.getEndpointFromStore()`, that in
turn calls `store.GetObject()`, which then calls `cache.get()`,
which calls `o.CopyTo(kvObject)`. This effectively creates a fresh
new instance of an Endpoint. However, endpoints are already kept in
memory by Sandbox, meaning we now have two in-memory instances of
the same Endpoint.
As it turns out, libnetwork is built around the idea that no two objects
representing the same thing should leave in-memory, otherwise breaking
mutex locking and optimistic locking (as both instances will have a drifting
version tracking ID -- dbIndex in libnetwork parliance).
In this specific case, this bug materializes by container rename failing
when applied a second time for a given container. An integration test is
added to make sure this won't happen again.
Signed-off-by: Albin Kerouanton <albinker@gmail.com >
(cherry picked from commit 80c44b4b2e )
Signed-off-by: Albin Kerouanton <albinker@gmail.com >
2024-01-23 22:53:43 +01:00
..
2024-01-22 15:23:27 +01:00
2024-01-12 18:09:24 +01:00
2024-01-23 15:05:54 +01:00
2023-09-05 12:09:26 +02:00
2023-11-13 18:22:03 +00:00
2024-01-17 16:29:28 +01:00
2023-08-24 17:51:07 +02:00
2023-10-11 17:52:23 +02:00
2023-12-12 22:51:23 +01:00
2024-01-22 19:51:54 +01:00
2024-01-18 15:38:51 +01:00
2023-09-27 14:10:23 +08:00
2023-05-19 20:38:51 +02:00
2023-05-19 20:38:51 +02:00
2023-05-19 20:38:51 +02:00
2023-08-29 00:38:08 +02:00
2023-08-29 00:38:08 +02:00
2023-11-30 15:26:53 +01:00
2023-11-04 01:00:19 +01:00
2023-08-29 00:38:08 +02:00
2023-09-05 12:09:26 +02:00
2023-05-19 20:38:51 +02:00
2023-10-11 17:52:23 +02:00
2023-05-19 20:38:51 +02:00
2023-12-19 10:20:38 +01:00
2023-10-11 17:52:23 +02:00
2023-10-11 17:52:23 +02:00
2024-01-22 21:44:38 +01:00
2023-09-15 20:12:27 +02:00
2023-12-19 10:20:38 +01:00
2023-10-11 17:52:23 +02:00
2023-07-18 14:18:42 +02:00
2023-10-11 17:52:23 +02:00
2023-12-13 01:10:05 +01:00
2023-07-26 21:06:36 +02:00
2023-10-11 17:52:23 +02:00
2023-06-29 00:33:03 +02:00
2023-09-15 20:12:27 +02:00
2023-11-24 12:26:48 +01:00
2023-06-01 14:45:24 -04:00
2023-05-19 20:38:51 +02:00
2023-11-24 12:26:48 +01:00
2024-01-23 15:59:09 +01:00
2023-10-11 17:52:23 +02:00
2023-05-19 20:38:51 +02:00
2023-10-11 17:52:23 +02:00
2023-12-05 16:41:36 +01:00
2023-12-05 16:41:36 +01:00
2023-05-16 17:07:58 +02:00
2023-10-12 11:29:24 +02:00
2023-08-23 15:47:43 +02:00
2023-08-23 15:47:43 +02:00
2023-08-29 00:38:08 +02:00
2023-11-10 20:09:25 +00:00
2023-06-01 14:45:25 -04:00
2023-10-26 00:10:23 +01:00
2023-06-01 14:45:24 -04:00
2023-10-11 17:52:23 +02:00
2023-08-29 00:38:08 +02:00
2023-09-15 20:12:27 +02:00
2024-01-16 14:09:40 -05:00
2023-09-07 18:38:19 +00:00
2024-01-17 16:29:28 +01:00
2023-05-19 20:38:51 +02:00
2024-01-17 00:50:53 +09:00
2023-11-10 20:09:25 +00:00
2024-01-04 00:02:39 +01:00
2023-10-25 22:55:59 +02:00
2023-06-01 14:45:25 -04:00
2024-01-23 17:09:11 +01:00
2023-05-19 20:38:51 +02:00
2023-05-19 20:38:51 +02:00
2023-11-29 16:18:34 +01:00
2023-07-07 13:01:36 +02:00
2023-07-07 13:01:36 +02:00
2023-10-12 11:29:24 +02:00
2023-05-19 20:38:51 +02:00
2023-10-12 11:29:24 +02:00
2023-12-12 22:51:23 +01:00
2023-12-12 22:51:23 +01:00
2023-10-12 11:30:12 +02:00
2023-10-11 17:52:23 +02:00
2023-06-01 14:45:24 -04:00
2023-10-11 17:52:23 +02:00
2023-12-05 16:41:36 +01:00
2023-10-11 17:52:23 +02:00
2023-10-11 17:52:23 +02:00
2023-07-22 11:56:41 +02:00
2023-12-19 10:20:38 +01:00
2023-06-29 00:33:03 +02:00
2024-01-18 18:09:52 +09:00
2023-06-06 13:10:05 -04:00
2023-06-06 13:10:05 -04:00
2023-06-29 00:33:03 +02:00
2024-01-17 16:29:32 +01:00
2023-10-11 17:52:23 +02:00
2023-12-05 16:41:36 +01:00
2023-10-11 17:52:23 +02:00
2023-06-01 14:45:25 -04:00
2023-06-01 14:45:25 -04:00
2023-10-11 17:52:23 +02:00
2024-01-23 22:53:43 +01:00
2023-05-19 20:38:51 +02:00
2023-08-29 00:38:08 +02:00
2023-10-24 12:56:45 +02:00
2024-01-12 18:09:24 +01:00
2023-10-11 17:52:23 +02:00
2023-06-01 14:45:25 -04:00
2023-04-29 00:03:37 +02:00
2023-10-11 17:52:23 +02:00
2023-05-19 20:38:51 +02:00
2023-05-19 20:38:51 +02:00
2023-10-11 17:52:23 +02:00
2023-06-01 14:45:25 -04:00
2023-06-01 14:45:25 -04:00
2024-01-10 13:50:26 -05:00
2023-09-27 14:10:23 +08:00
2023-09-27 14:10:23 +08:00
2023-10-11 17:52:23 +02:00
2023-10-20 17:44:30 +02:00
2023-07-05 12:27:00 +02:00
2023-08-29 00:38:08 +02:00
2023-06-29 00:33:03 +02:00
2023-10-11 17:52:23 +02:00
2023-06-06 12:13:05 -04:00
2023-06-06 12:13:05 -04:00
2023-08-29 00:38:08 +02:00
2023-08-29 00:38:08 +02:00
2023-10-11 17:52:23 +02:00