Steps to reproduce:
- Start external exporter. Make sure PMM server can reach it.
- Try to add it with invalid metrics path: pmm-admin --verbose add external:service rds --service-port=9042 --path=INVALID
- pmm-managed external exporters deadlocks after that. No other external exporters can be added or removed until pmm-managed restart.
This issue can be reproduced with any exporter which return HTTP code 404 Not Found for invalid URL. Fortunately, most exporters (node_exporter, mysqld_exporter, postgresql_exporter, etc., but notably not our own rds_exporter) return 200 OK and landing page in that case. So effects of that bug are limited, despite the fact that the bug itself is quite serious.