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

Select server topology ancestors from the same CDN as the base server #5578

Merged
merged 1 commit into from
Feb 26, 2021

Conversation

zrhoffman
Copy link
Member

What does this PR (Pull Request) do?

Which Traffic Control components are affected by this PR?

  • Traffic Ops

What is the best way to verify this PR?

  1. Start CDN in a Box
  2. Create an invalidation request for the demo1 Delivery Service
  3. Notice that https://trafficportal.infra.ciab.test/api/4.0/servers/mid-01/update_status says parent_pending = true
  4. Set the CDN ID of mid-01 in the database:
    <<'SQL' docker-compose exec -T trafficops bash -c 'PGUSER=$DB_USER PGPASSWORD=$DB_USER_PASS PGHOST=$DB_SERVER PGDATABASE=$DB_NAME psql'
    UPDATE "server" set cdn_id = 1 WHERE host_name = 'mid-02'
    SQL
  5. Notice that https://trafficportal.infra.ciab.test/api/4.0/servers/mid-01/update_status says parent_pending = false

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

  • master (1cd5046)
  • 5.0.0
  • 5.0.x branch

The following criteria are ALL met by this PR

  • This PR includes tests OR I have explained why tests are unnecessary
  • Bugfix, no documentation is necessary
  • This PR includes an update to CHANGELOG.md
  • This PR includes any and all required license headers
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

Additional Information

@zrhoffman zrhoffman added bug something isn't working as intended Traffic Ops related to Traffic Ops medium impact impacts a significant portion of a CDN, or has the potential to do so labels Feb 25, 2021
@zrhoffman zrhoffman added this to the 5.1.0 milestone Feb 25, 2021
@ocket8888
Copy link
Contributor

I still can't reproduce this. At step 3 of the verification, I see "parent_pending": false.

@zrhoffman
Copy link
Member Author

I still can't reproduce this. At step 3 of the verification, I see "parent_pending": false.

You could just set update_pending to true for mid-02 in the servers table

@ocket8888
Copy link
Contributor

That did it. Probably explains why I couldn't reproduce the issue in the first place; I didn't know you needed to queue updates after creating the invalidation job.

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.

Confirmed this fixes the issue.

@ocket8888 ocket8888 merged commit eed246c into apache:master Feb 26, 2021
@zrhoffman zrhoffman deleted the update-status-cdn branch February 26, 2021 17:43
ocket8888 pushed a commit that referenced this pull request Feb 26, 2021
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 medium impact impacts a significant portion of a CDN, or has the potential to do so Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TO /servers/{hostname}/update_status parentRevalPending is not CDN-specific
2 participants