Important Statuses can be deleted and modified #6291
Labels
bug
something isn't working as intended
low difficulty
the estimated level of effort to resolve this issue is low
medium impact
impacts a significant portion of a CDN, or has the potential to do so
Traffic Ops
related to Traffic Ops
This Bug Report affects these Traffic Control components:
Current behavior:
The Statuses named
OFFLINE
,ONLINE
,REPORTED
,PRE_PROD
, andADMIN_DOWN
are handled specially by different parts of Traffic Control, and different parts of the code even go so far as to assume thatOFFLINE
,ONLINE
, andREPORTED
exist, but in fact there is no guarantee that any of the five exist at any given time.That's because you can rename them (and less importantly change their descriptions):
and even delete them:
Expected behavior:
You shouldn't be able to get rid of things that we assume should exist. That means either disallowing those operations on certain of those objects, or disallowing those operations entirely. I've always been hopeful that we could do away with custom statuses, eliminating a server field, two endpoints, hundreds of lines of code, two database tables, and a lot of confusion and edge cases like this. However, that behavior is depended upon by many, so we can't get rid of it without at least an alternative (like the one proposed by #4819), so if nothing else we should ensure that all valid (i.e. only manipulated through the API) Traffic Ops server states contain the Statuses that ATC requires to function. At a minimum that would be
REPORTED
, but to avoid unexpected behavior when creating new Statuses with reserved names we should also do the same with the others mentioned above.The text was updated successfully, but these errors were encountered: