Gracefully handle case where primary Geo Node has not been created
ZD Ticket: https://gitlab.zendesk.com/agent/tickets/82436
A customer attempted to define a secondary, without a primary and we saw this error:
Processing by Admin::GeoNodesController#status as JSON
Parameters: {"id"=>"5"}
Completed 500 Internal Server Error in 13ms (ActiveRecord: 1.4ms | Elasticsearch: 0.0ms)
NoMethodError (undefined method `strip' for nil:NilClass):
app/services/geo/node_status_service.rb:20:in `call'
app/controllers/admin/geo_nodes_controller.rb:60:in `status'
lib/gitlab/i18n.rb:39:in `with_locale'
lib/gitlab/i18n.rb:45:in `with_user_locale'
app/controllers/application_controller.rb:307:in `set_locale'
lib/gitlab/performance_bar/peek_performance_bar_with_rack_body.rb:16:in `call'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:16:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/readonly_geo.rb:30:in `call'
lib/gitlab/request_context.rb:18:in `call'
Stan and I looked and we noticed they created a secondary, without first adding a primary which won't work. The app should not allow this.
Edited by Toon Claes