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

Block server servercapability delete if associated ds requires it #4041

Merged
merged 4 commits into from Oct 31, 2019

Conversation

mhoppa
Copy link
Contributor

@mhoppa mhoppa commented Oct 29, 2019

What does this PR (Pull Request) do?

  • This PR is not related to any Issue

This PR adds in extra validation in disassociating a server capability from a server. If that server is assigned to a DS that requires that server capability we now block the DELETE.

Which Traffic Control components are affected by this PR?

  • Documentation
  • Traffic Ops

What is the best way to verify this PR?

Besides running API tests it can be manually tested by:

  • Create DS
  • Create server capability "ram"
  • Assign server capability to DS
  • Create edge server
  • Assign server capability "ram" to server
  • Assign server to DS
  • Attempt to DELETE server capability from server (SHOULD NOW BE BLOCKED)
  • Remove server capability "ram" from DS
  • Attempt to DELETE server capability from server (SHOULD NOW WORK)

If this is a bug fix, what versions of Traffic Control are affected?

The following criteria are ALL met by this PR

  • This PR includes tests
  • This PR includes documentation
  • This PR does not included an update to CHANGELOG.md
  • This PR includes any and all required license headers
  • This PR ensures that database migration sequence is correct OR this PR does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

Additional Information

@asf-ci
Copy link
Contributor

asf-ci commented Oct 29, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4667/

@asf-ci
Copy link
Contributor

asf-ci commented Oct 29, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4669/

@ocket8888 ocket8888 added bug something isn't working as intended documentation related to documentation low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops tests related to tests and/or testing infrastructure labels Oct 29, 2019
@asf-ci
Copy link
Contributor

asf-ci commented Oct 30, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4677/

@mitchell852
Copy link
Member

what about the opposite scenario? blocking ds required capability addition IF assigned servers don't have that capability. i suppose that doesn't belong in this PR but just thought i'd bring it up.

Copy link
Contributor

@ocket8888 ocket8888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual requests worked, tests pass, docs changes look fine.

@ocket8888 ocket8888 merged commit 102372c into apache:master Oct 31, 2019
@mhoppa mhoppa deleted the feature/disassociate_sc_validation branch October 31, 2019 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended documentation related to documentation low impact affects only a small portion of a CDN, and cannot itself break one tests related to tests and/or testing infrastructure Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants