You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2019/06/21 08:47:43 UTC

[GitHub] [trafficcontrol] Shihta commented on a change in pull request #3690: CDN-in-a-Box now uses Snapshots instead of legacy CRConfig

Shihta commented on a change in pull request #3690: CDN-in-a-Box now uses Snapshots instead of legacy CRConfig
URL: https://github.com/apache/trafficcontrol/pull/3690#discussion_r296148778
 
 

 ##########
 File path: infrastructure/cdn-in-a-box/traffic_monitor/run.sh
 ##########
 @@ -103,10 +103,10 @@ export TO_PASSWORD=$TO_ADMIN_PASSWORD
 
 touch /opt/traffic_monitor/var/log/traffic_monitor.log
 
-# Do not start until there is a valid CRConfig available
-until [ $(to-get "/CRConfig-Snapshots/$CDN_NAME/CRConfig.json" 2>/dev/null | jq -c -e '.config|length') -gt 0 ] ; do
-	echo "Waiting on valid CRConfig..."; 
-  	sleep 3; 
+# Do not start until there a valid Snapshot has been taken
+until [ $(to-get "/api/1.4/cdns/$CDN_NAME/snapshot" 2>/dev/null | jq -c -e '.config|length') -gt 0 ] ; do
 
 Review comment:
   The responses of these 2 API are different so you also have to modify jq parameter:
   ```
   "/api/1.4/cdns/$CDN_NAME/snapshot" |jq -c -e '.response.config|length'
   ```
   
   by the way, not sure if this could be changed to new API:
   [070-RASCAL-Traffic_Monitor.json](https://github.com/apache/trafficcontrol/blob/master/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-RASCAL-Traffic_Monitor.json#L50)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services