Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

updated traffic_ops_ort.pl to use multistep mv for config shuffle#5034

Draft
MylesBock wants to merge 2 commits intoapache:masterfrom
MylesBock:4311/traffic-ops-ort-cp-to-mv
Draft

updated traffic_ops_ort.pl to use multistep mv for config shuffle#5034
MylesBock wants to merge 2 commits intoapache:masterfrom
MylesBock:4311/traffic-ops-ort-cp-to-mv

Conversation

@MylesBock
Copy link
Contributor

Closes #4311

  • Replaced /bin/cp with /bin/mv and changed target to same wd as target with new suffix

  • Added error handling surrounding system use in that block

  • Added second step to mv old config to the same wd with .old suffix, then mv from .new

First PR opened here, so may need guidance on how to test this

What does this PR (Pull Request) do?

Which Traffic Control components are affected by this PR?

  • CDN in a Box
  • Documentation
  • Grove
  • Traffic Control Client
  • Traffic Monitor
  • Traffic Ops
  • Traffic Ops ORT
  • Traffic Portal
  • Traffic Router
  • Traffic Stats
  • Traffic Vault
  • CI tests

What is the best way to verify this PR?

Validate a new configuration can be generated and that the old can be supplanted via ORT

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 OR I have explained why tests are unnecessary
  • This PR includes documentation OR I have explained why documentation is unnecessary
  • This PR includes an update to CHANGELOG.md OR such an update is not necessary
  • 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

@MylesBock MylesBock marked this pull request as draft September 16, 2020 17:24
@ocket8888 ocket8888 added bug something isn't working as intended cache-config Cache config generation low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops ORT *DEPRECATED* related to the traffic_ops_ort.pl script labels Sep 16, 2020
@zrhoffman zrhoffman requested a review from rob05c October 20, 2020 15:29
@MylesBock MylesBock marked this pull request as ready for review November 20, 2020 02:20
* Replaced /bin/cp with /bin/mv and changed target to same wd as target with new suffix

* Added error handling surrounding `system` use in that block

* Added second step to mv old config to the same wd with `.old` suffix, then mv from `.new`
* Todo comments expanded

* Whitespace adjusted to line multiline strings up a little better

* Hopefully the traffic router action doesn't time out in this case?
@MylesBock MylesBock force-pushed the 4311/traffic-ops-ort-cp-to-mv branch from 9b6e278 to 39c08f2 Compare November 20, 2020 04:58
@MylesBock MylesBock marked this pull request as draft December 20, 2020 07:47
@mitchell852 mitchell852 removed the Traffic Ops ORT *DEPRECATED* related to the traffic_ops_ort.pl script label Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug something isn't working as intended cache-config Cache config generation low impact affects only a small portion of a CDN, and cannot itself break one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix ORT to atomically place files.

3 participants