davidc0le opened a new issue #6695:
URL: https://github.com/apache/trafficcontrol/issues/6695


   ## This Bug Report affects these Traffic Control components:
   - Traffic Control Cache Config (`t3c`, formerly ORT)
   
   ## Current behavior:
   
   When running t3c apply in badass mode on a new edge system, we are seeing 
errors regarding the creation of directories required for config files / ssl 
files. For example:
   
   ```
   ERROR: torequest.go:812: 2022-03-25T11:23:39.572368982Z: Unable to create 
the directory '/opt/trafficserver/etc/trafficserver/dscp for 
'set_dscp_37.config'
   ERROR: torequest.go:812: 2022-03-25T11:23:39.821797003Z: Unable to create 
the directory '/opt/trafficserver/etc/trafficserver/ssl/ for 
'cdn.lin201-gb-prd.ds.snos01.skycdp.com.key'
   
   ```
   The transfer of the config files mentioned above was aborted, so we ended up 
with an invalid traffic server config directory ( an SSL key file mentioned in 
ssl_multicert.config that was not on the system ).
   
   The directory in both cases above were created correctly, and any subsequent 
config files placed into those folders worked as expected.
   
   Running the t3c apply with the same args a second time corrected the issue, 
copied the missing files and gave us a valid traffic-server config directory.
   
   Looking at the code, it appears the doMkDirWithOwner function will not 
return true even if the directory creation worked correctly:
   
   
https://github.com/apache/trafficcontrol/blob/d4286d867db2a094c39e127336869ad8cc0eb74f/cache-config/t3c-apply/util/util.go#L401
   
   
https://github.com/apache/trafficcontrol/blob/d4286d867db2a094c39e127336869ad8cc0eb74f/cache-config/t3c-apply/torequest/torequest.go#L209
   
   ## Expected behavior:
   
   Traffic Server config should be valid after the t3c apply run has completed.
   
   ## Steps to reproduce:
   
   A cache config in Traffic Ops ( that includes SSL certs ) being applied to a 
freshly installed cache server should re-produce this issue on the first runs 
of t3c apply.     
   
   If you need my config, I can work on redecting the secure stuff and can send 
it over.
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to