Commit 2ec32ca
committed
PMM-15360: Gate OpenManager's service on the switch
Implements Enabled() bool on om.Service, so every /v1/om/* RPC and the
scheduled topology collection refuse while OpenManager is off, via the
same generic gRPC-service-enabled interceptor BackupService and the
other preview features already use -- no proto or per-method changes
needed.
Adds IsAvailable(), a read against SEP's om_inventory app (the same
call the scheduled collection already makes), and wires it into
ChangeSettings so turning OpenManager on is refused unless the app is
actually reachable -- rather than accepting a setting that would do
nothing. Turning it on also kicks an immediate topology collection
(extracted into its own method: golangci-lint's gocognit check flags
ChangeSettings once this is inlined alongside Advisors' and
telemetry's own transition handling).
The generated swagger client's field names are OMEnabled/EnableOM here
(not OmEnabled/EnableOm, as in the settings-flag commit this stacks
on): this branch's api/Makefile, via PMM-15326-om-api already merged
into PMM-15326-om-backend, registers "om" as an additional-initialism
for the swagger client generator. That commit hasn't reached the epic
yet, so the settings-flag PR's own branch (based on the epic directly)
correctly generates the un-capitalized form; this is the make gen
output for this branch specifically.
Does not touch SEP's om_inventory app in any way -- turning the switch
off does not stop its periodic sweep. That's deferred to a follow-up.
Signed-off-by: Pawel Lebioda <pawel.lebioda@percona.com>1 parent 1de5337 commit 2ec32ca
4 files changed
Lines changed: 77 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
1068 | 1077 | | |
1069 | 1078 | | |
1070 | 1079 | | |
| |||
1081 | 1090 | | |
1082 | 1091 | | |
1083 | 1092 | | |
| 1093 | + | |
1084 | 1094 | | |
1085 | 1095 | | |
1086 | 1096 | | |
| |||
1197 | 1207 | | |
1198 | 1208 | | |
1199 | 1209 | | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | 1210 | | |
1207 | 1211 | | |
1208 | 1212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
160 | 187 | | |
161 | 188 | | |
162 | 189 | | |
| |||
261 | 288 | | |
262 | 289 | | |
263 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
264 | 294 | | |
265 | 295 | | |
266 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| 94 | + | |
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
| |||
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| 120 | + | |
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| |||
470 | 474 | | |
471 | 475 | | |
472 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
473 | 485 | | |
474 | 486 | | |
475 | 487 | | |
| |||
522 | 534 | | |
523 | 535 | | |
524 | 536 | | |
| 537 | + | |
525 | 538 | | |
526 | 539 | | |
527 | 540 | | |
| |||
613 | 626 | | |
614 | 627 | | |
615 | 628 | | |
| 629 | + | |
| 630 | + | |
616 | 631 | | |
617 | 632 | | |
618 | 633 | | |
619 | 634 | | |
620 | 635 | | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
621 | 648 | | |
622 | 649 | | |
623 | 650 | | |
| |||
0 commit comments