In pre-start script of cc includes the execution of the db migration. The problem is that pre-start scripts run all the jobs at the same time, and it is now well established that the migration's standard output is not passed to syslog's blackbox , then it can be inferred that cc's pre-start's script is running when blackbox is not running. Any messages are basically dropped, when Blackbox is not running. Since Blackbox is a common bosh job, it cannot pick up any lifecycle logs outside its own lifecycle.
Instead of using perform_migration function from pre-start script, cc migration can be started in jobs/cloud_controller_ng/templates/bin/cloud_controller_ng.erb. When bosh monit starts, all processes are called in no particular order, and some loggings may be lost, but it is guaranteed that the blackbox can read the logs, which are stored in stdout of cc. The migration logs can also be seen in ELK.
In pre-start script of cc includes the execution of the db migration. The problem is that pre-start scripts run all the jobs at the same time, and it is now well established that the migration's standard output is not passed to syslog's blackbox , then it can be inferred that cc's pre-start's script is running when blackbox is not running. Any messages are basically dropped, when Blackbox is not running. Since Blackbox is a common bosh job, it cannot pick up any lifecycle logs outside its own lifecycle.
Instead of using perform_migration function from pre-start script, cc migration can be started in jobs/cloud_controller_ng/templates/bin/cloud_controller_ng.erb. When bosh monit starts, all processes are called in no particular order, and some loggings may be lost, but it is guaranteed that the blackbox can read the logs, which are stored in stdout of cc. The migration logs can also be seen in ELK.
Links to any other associated PRs Stream CCDB migration logs to ELK
[x] I have viewed signed and have submitted the Contributor License Agreement
[x] I have made this pull request to the
develop
branch[ ] I have run CF Acceptance Tests on bosh lite