This repository was archived by the owner on Nov 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 353
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Creating a DSR with an ID causes weird behavior #6788
Copy link
Copy link
Open
Labels
Traffic Opsrelated to Traffic Opsrelated to Traffic Opsbugsomething isn't working as intendedsomething isn't working as intendedlow difficultythe estimated level of effort to resolve this issue is lowthe estimated level of effort to resolve this issue is lowlow impactaffects only a small portion of a CDN, and cannot itself break oneaffects only a small portion of a CDN, and cannot itself break one
Description
This Bug Report affects these Traffic Control components:
- Traffic Ops
Current behavior:
When creating a DSR (in both APIv3 and APIv4) you may optionally specify an ID. In doing so, Traffic Ops will treat it as a PUT request for the purposes of validation. This means that it will look for an existing Delivery Service with that ID, and try to verify that the status of the DSR to be created is in a status that is a valid transition from the status of the existing Delivery Service - which can lead to false negatives in the validation of the DSR. Or, if the ID is not one that matches any existing DSR, a 400 Bad Request error is returned to the client with no real information about what went wrong (unknown error in v3 and simply Bad Request in v4).
Expected behavior:
Fields that aren't required should be ignored, and should not affect validation.
Steps to reproduce:
$ topost -kp deliveryservice_requests '{"status": "submitted", "changeType": "create", "deliveryService": {}, "id": 10000}'
{
"alerts": [
{
"text": "unknown error",
"level": "error"
}
]
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Traffic Opsrelated to Traffic Opsrelated to Traffic Opsbugsomething isn't working as intendedsomething isn't working as intendedlow difficultythe estimated level of effort to resolve this issue is lowthe estimated level of effort to resolve this issue is lowlow impactaffects only a small portion of a CDN, and cannot itself break oneaffects only a small portion of a CDN, and cannot itself break one