Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TO unable to unassign ORG server from delivery services if it's the last assigned #5390

Closed
rawlinp opened this issue Dec 18, 2020 · 1 comment · Fixed by #5404
Closed

TO unable to unassign ORG server from delivery services if it's the last assigned #5390

rawlinp opened this issue Dec 18, 2020 · 1 comment · Fixed by #5404
Assignees
Labels
regression bug a bug in existing functionality introduced by a new version Traffic Ops related to Traffic Ops

Comments

@rawlinp
Copy link
Contributor

rawlinp commented Dec 18, 2020

I'm submitting a ...

  • bug report

Traffic Control components affected ...

  • Traffic Ops

Current behavior:

As of #5328, TO prohibits unassigning all servers from an active delivery service, including ORG servers.

Expected behavior:

This validation should be limited to server types that begin with EDGE, since the validation should be designed to prevent the accidental removal of all EDGE-type servers from an active delivery service.

Minimal reproduction of the problem with instructions:

Create an active delivery service and assign an ORG server to it. Try to remove the ORG server from the active delivery service.

Anything else:

Once fixed, this TODO should be completed so that the test properly cleans up after itself.

@rawlinp rawlinp added bug something isn't working as intended Traffic Ops related to Traffic Ops labels Dec 18, 2020
@srijeet0406
Copy link
Contributor

Just mentioning this here to avoid any confusion:
Here is how I tested and verified this --

Create a new active DS in TP
Try to assign a server to this DS that is not in the ONLINE/ REPORTED state -> this should fail
Now, try to assign an EDGE that is in ONLINE/ REPORTED state -> this should pass
Try deleting this EDGE server from TP and also from the backend API call -> both these actions should be prevented

Now create a new active DS in TP
Assign an ONLINE/ REPORTED ORG server to this DS from TP -> this should pass
Now, try to unassign this server from TP -> this should be prevented, because TP uses the replace=true mode, and you cannot unassign(or replace) all servers from an active DS
Try to delete this server from the backend call -> this should pass, since this is an ORG server

Note: to make a backend call to the DELETE api, use this endpoint:
DELETE https:///api/3.0/deliveryserviceserver//

@mitchell852 mitchell852 added regression bug a bug in existing functionality introduced by a new version and removed bug something isn't working as intended labels Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression bug a bug in existing functionality introduced by a new version Traffic Ops related to Traffic Ops
Projects
None yet
3 participants