srijeet0406 commented on a change in pull request #5701:
URL: https://github.com/apache/trafficcontrol/pull/5701#discussion_r606022468



##########
File path: traffic_ops/app/db/admin.go
##########
@@ -176,8 +176,9 @@ func createDB() {
        stderr := bytes.Buffer{}
        dbExistsCmd.Stderr = &stderr
        out, err := dbExistsCmd.Output()
+       // An error is returned if the database could not be found, which is to 
be expected. Don't exit on this error.

Review comment:
       So this command is checking to see if the database is present or not. 
However, the command returns an error if that particular database is not 
present. For example, in my local docker container, it returns the following 
error if I keep the `die` on this step:
   `trafficops-db-admin_1  | unable to check if DB already exists: exit status 
2, stderr: psql: error: FATAL:  database "traffic_ops" does not exist`




-- 
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:
[email protected]


Reply via email to