apache / trafficcontrol

Apache Traffic Control is an Open Source implementation of a Content Delivery Network
https://trafficcontrol.apache.org/
Apache License 2.0
1.03k stars 339 forks source link

Traffic Portal: Can't add a new server (Key (status)=(1) is not present) #1697

Closed smalenfant closed 6 years ago

smalenfant commented 6 years ago

There is assumption in the code that the OFFLINE status is ID=1. In my lab database, there is no ID=1 and you can't create a server (status is empty, error 500 occurs)

https://github.com/apache/incubator-trafficcontrol/blob/d6c690f87200a2f9a26e7dbb136c85ff34ee005b/traffic_portal/app/src/modules/private/servers/new/index.js#L33

smalenfant commented 6 years ago

Verified on my CDN with this condition happening. Can now create a server using Traffic Portal.