BUG LFS243 - LAB 7.1-11 - If ServiceProfiles after pods are meshed, Linkerd Proxies never reload
Before apply step 11, you must restart the deployment of the booksapp's webapp.
In a nutshell
If ServiceProfiles are created after pods are meshed, newer Linkerd proxies never reload them, so their route tables stay empty and
viz routesshows “-” even though real traffic exists.
Explanation from the web
In the setup, Linkerd is functioning correctly at the service level, but linkerd viz routes shows no route-level metrics due to a known issue in certain newer or edge Linkerd versions.
This bug occurs when ServiceProfiles are applied after the pods have already been injected with the Linkerd proxy.
In these versions, the sidecar proxies fail to reload or synchronize the newly created ServiceProfile, leaving their internal route tables empty.
As a result, although traffic flows normally and service-level metrics are collected, no route-specific metrics are generated or exposed to Prometheus, leading viz routes to display only “–” values. The recommended remediation is to restart the affected deployments after the ServiceProfile exists, ensuring that each proxy correctly loads the route definitions; alternatively, upgrading to a stable Linkerd release resolves the issue permanently.
STEP 11 - without restarting (as from the LAB7.1 book)
luigi_c_lfs243_gmail_com@cp-lfs243-06-10-25:~$ linkerd viz routes -n booksapp service/webapp
ROUTE SERVICE SUCCESS RPS LATENCY_P50 LATENCY_P95 LATENCY_P99
GET / webapp - - - - -
GET /authors/{id} webapp - - - - -
GET /books/{id} webapp - - - - -
POST /authors webapp - - - - -
POST /authors/{id}/delete webapp - - - - -
POST /authors/{id}/edit webapp - - - - -
POST /books webapp - - - - -
POST /books/{id}/delete webapp - - - - -
POST /books/{id}/edit webapp - - - - -
[DEFAULT] webapp - - - - -
Checking status (1)
luigi_c_lfs243_gmail_com@cp-lfs243-06-10-25:~$ linkerd -n booksapp viz stat deploy NAME MESHED SUCCESS RPS LATENCY_P50 LATENCY_P95 LATENCY_P99 TCP_CONN authors 1/1 76.20% 8.0rps 2ms 13ms 19ms 7 books 1/1 81.90% 9.8rps 4ms 51ms 90ms 7 traffic 1/1 100.00% 0.3rps 1ms 2ms 2ms 1 webapp 3/3 81.59% 9.2rps 12ms 79ms 96ms 10
Checking status (2)
luigi_c_lfs243_gmail_com@cp-lfs243-06-10-25:~$ linkerd viz tap -n booksapp deploy/webapp req id=18:0 proxy=in src=10.244.0.23:36126 dst=10.244.0.25:7000 tls=true :method=POST :authority=webapp:7000 :path=/books req id=18:1 proxy=out src=10.244.0.25:41148 dst=10.244.0.27:7002 tls=true :method=POST :authority=books:7002 :path=/books.json rsp id=18:1 proxy=out src=10.244.0.25:41148 dst=10.244.0.27:7002 tls=true :status=201 latency=12516µs end id=18:1 proxy=out src=10.244.0.25:41148 dst=10.244.0.27:7002 tls=true duration=52µs response-length=0B ...
Restart the deployment to let linkerd s proxies reload
luigi_c_lfs243_gmail_com@cp-lfs243-06-10-25:~$ kubectl rollout restart deploy -n booksapp deployment.apps/authors restarted deployment.apps/books restarted deployment.apps/traffic restarted deployment.apps/webapp restarted
Re-apply STEP 11, check the metrics
luigi_c_lfs243_gmail_com@cp-lfs243-06-10-25:~$ linkerd viz routes -n booksapp service/webapp
ROUTE SERVICE SUCCESS RPS LATENCY_P50 LATENCY_P95 LATENCY_P99
GET / webapp 100.00% 0.2rps 15ms 20ms 20ms
GET /authors/{id} webapp 100.00% 0.1rps 10ms 19ms 20ms
GET /books/{id} webapp 100.00% 0.4rps 11ms 19ms 20ms
POST /authors webapp 100.00% 0.2rps 15ms 20ms 20ms
POST /authors/{id}/delete webapp 100.00% 0.1rps 23ms 29ms 30ms
POST /authors/{id}/edit webapp - - - - -
POST /books webapp 50.00% 0.2rps 17ms 37ms 39ms
POST /books/{id}/delete webapp 100.00% 0.1rps 8ms 17ms 20ms
POST /books/{id}/edit webapp 50.00% 0.2rps 75ms 98ms 100ms
[DEFAULT] webapp - - - - -
Comments
-
Bug in STEP 12
guys, as well step 12 requires modification:
from the web
That
kubectl patchcommand applies a JSON Patch to thewebappDeployment in thebooksappnamespace, adding the annotationlinkerd.io/proxy-external-service: "true"underspec.template.metadata.annotations.
Because the patch modifies the Pod template, Kubernetes automatically rolls out a new ReplicaSet and recreates allwebapppods.
Those new pods include fresh Linkerd proxies that start after thebooksServiceProfile has been created and therefore can correctly load and use it.
In combination with restarting thebooksdeployment, this resolves the route-metrics issue and allowslinkerd viz routes --to service/booksto show valid per-route metrics instead of “-”.Applying Step 12 (from the book)
luigi_c_lfs243_gmail_com@cp-lfs243-06-10-25:~$ linkerd viz routes -n booksapp deploy/webapp --to service/books ROUTE SERVICE SUCCESS RPS LATENCY_P50 LATENCY_P95 LATENCY_P99 DELETE /books/{id}.json books - - - - - GET /books.json books - - - - - GET /books/{id}.json books - - - - - POST /books.json books - - - - - PUT /books/{id}.json books - - - - - [DEFAULT] books - - - - -Patch to restart with new p
luigi_c_lfs243_gmail_com@cp-lfs243-06-10-25:~$ kubectl -n booksapp patch deploy/webapp \ --type='json' \ -p '[ { "op": "add", "path": "/spec/template/metadata/annotations/linkerd.io~1proxy-external-service", "value": "true" } ]' deployment.apps/webapp patchedluigi_c_lfs243_gmail_com@cp-lfs243-06-10-25:~$ linkerd viz routes -n booksapp deploy/webapp --to service/books ROUTE SERVICE SUCCESS RPS LATENCY_P50 LATENCY_P95 LATENCY_P99 DELETE /books/{id}.json books - - - - - GET /books.json books - - - - - GET /books/{id}.json books - - - - - POST /books.json books - - - - - PUT /books/{id}.json books - - - - - [DEFAULT] books - - - - -restart anything
luigi_c_lfs243_gmail_com@cp-lfs243-06-10-25:~$ kubectl -n booksapp rollout restart deploy/books deployment.apps/books restarted
works!
luigi_c_lfs243_gmail_com@cp-lfs243-06-10-25:~$ linkerd viz routes -n booksapp deploy/webapp --to service/books ROUTE SERVICE SUCCESS RPS LATENCY_P50 LATENCY_P95 LATENCY_P99 DELETE /books/{id}.json books - - - - - GET /books.json books - - - - - GET /books/{id}.json books 100.00% 0.1rps 4ms 9ms 10ms POST /books.json books 100.00% 0.0rps 15ms 20ms 20ms PUT /books/{id}.json books 0.00% 0.1rps 50ms 95ms 99ms [DEFAULT] books - - - - -0
Categories
- All Categories
- 158 LFX Mentorship
- 158 LFX Mentorship: Linux Kernel
- 855 Linux Foundation IT Professional Programs
- 390 Cloud Engineer IT Professional Program
- 186 Advanced Cloud Engineer IT Professional Program
- 90 DevOps IT Professional Program
- DevOps & GitOps IT Professional Program
- 158 Cloud Native Developer IT Professional Program
- 153 Express Training Courses & Microlearning
- 150 Express Courses - Discussion Forum
- 3 Microlearning - Discussion Forum
- 7.2K Training Courses
- 50 LFC110 Class Forum - Discontinued
- 74 LFC131 Class Forum - DISCONTINUED
- 56 LFD102 Class Forum
- 259 LFD103 Class Forum
- LFD103-JP クラス フォーラム
- 27 LFD110 Class Forum
- 50 LFD121 Class Forum
- 3 LFD123 Class Forum
- 1 LFD125 Class Forum
- 19 LFD133 Class Forum
- 10 LFD134 Class Forum
- 19 LFD137 Class Forum
- 1 LFD140 Class Forum
- 73 LFD201 Class Forum
- 8 LFD210 Class Forum
- 6 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- LFD221 Class Forum
- 128 LFD232 Class Forum - Discontinued
- 3 LFD233 Class Forum - Discontinued
- 5 LFD237 Class Forum
- 25 LFD254 Class Forum
- 752 LFD259 Class Forum
- 111 LFD272 Class Forum - Discontinued
- 4 LFD272-JP クラス フォーラム - Discontinued
- 16 LFD273 Class Forum
- 481 LFS101 Class Forum
- 4 LFS111 Class Forum
- 4 LFS112 Class Forum
- 5 LFS116 Class Forum
- 9 LFS118 Class Forum
- 2 LFS120 Class Forum
- LFS140 Class Forum
- 12 LFS142 Class Forum
- 9 LFS144 Class Forum
- 6 LFS145 Class Forum
- 6 LFS146 Class Forum
- 7 LFS147 Class Forum
- 21 LFS148 Class Forum
- 17 LFS151 Class Forum
- 6 LFS157 Class Forum
- 91 LFS158 Class Forum
- 1 LFS158-JP クラス フォーラム
- 14 LFS162 Class Forum
- 2 LFS166 Class Forum - Discontinued
- 9 LFS167 Class Forum
- 5 LFS170 Class Forum
- 2 LFS171 Class Forum - Discontinued
- 4 LFS178 Class Forum - Discontinued
- 4 LFS180 Class Forum
- 3 LFS182 Class Forum
- 7 LFS183 Class Forum
- 2 LFS184 Class Forum
- 41 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム - Discontinued
- 23 LFS203 Class Forum
- 141 LFS207 Class Forum
- 3 LFS207-DE-Klassenforum
- 3 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum - Discontinued
- 56 LFS216 Class Forum - Discontinued
- 60 LFS241 Class Forum
- 51 LFS242 Class Forum
- 41 LFS243 Class Forum
- 17 LFS244 Class Forum
- 8 LFS245 Class Forum
- 1 LFS246 Class Forum
- 1 LFS248 Class Forum
- 124 LFS250 Class Forum
- 3 LFS250-JP クラス フォーラム
- 2 LFS251 Class Forum - Discontinued
- 163 LFS253 Class Forum
- 1 LFS254 Class Forum - Discontinued
- 3 LFS255 Class Forum
- 16 LFS256 Class Forum
- 2 LFS257 Class Forum
- 1.4K LFS258 Class Forum
- 12 LFS258-JP クラス フォーラム
- 142 LFS260 Class Forum
- 165 LFS261 Class Forum
- 45 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 25 LFS267 Class Forum
- 27 LFS268 Class Forum
- 38 LFS269 Class Forum
- 11 LFS270 Class Forum
- 202 LFS272 Class Forum - Discontinued
- 2 LFS272-JP クラス フォーラム - Discontinued
- 2 LFS274 Class Forum - Discontinued
- 4 LFS281 Class Forum - Discontinued
- 30 LFW111 Class Forum
- 265 LFW211 Class Forum
- 190 LFW212 Class Forum
- 17 SKF100 Class Forum
- 2 SKF200 Class Forum
- 3 SKF201 Class Forum
- 800 Hardware
- 200 Drivers
- 68 I/O Devices
- 37 Monitors
- 104 Multimedia
- 175 Networking
- 92 Printers & Scanners
- 85 Storage
- 765 Linux Distributions
- 82 Debian
- 67 Fedora
- 20 Linux Mint
- 13 Mageia
- 23 openSUSE
- 149 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 472 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 96 Linux Security
- 78 Network Management
- 102 System Management
- 48 Web Management
- 74 Mobile Computing
- 19 Android
- 42 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 389 Off Topic
- 121 Introductions
- 179 Small Talk
- 28 Study Material
- 884 Programming and Development
- 312 Kernel Development
- 554 Software Development
- 1.8K Software
- 270 Applications
- 183 Command Line
- 5 Compiling/Installing
- 988 Games
- 320 Installation
- 109 All In Program
- 109 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)