Uploaded image for project: 'COmanage Framework Migration'
  1. COmanage Framework Migration
  2. CFM-275

Console command to test for database connectivity

    XMLWordPrintable

Details

    Description

      The PE container image needs a command/script that the container entrypoint script can run to determine if the database configuration is good and the database is up and ready to receive connections.

      In the version 4.x image the entrypoint script creates a Console command on the fly that has contents

      App::import('Model', 'ConnectionManager');
       
      class DatabaseTestShell extends AppShell {
        function main() {
          try {
            $db = ConnectionManager::getDataSource('default');
          } catch (Exception $e) {
            $this->error("Unable to connect to datasource");
          }
          $this->out("Connected to datasource");
        }
      } 

      We need something similar for PE. Preferably it would be part of the application and not need to be generated on the fly.

      Attachments

        Issue Links

          Activity

            People

              benn.oshrin@at.internet2.edu Benn Oshrin (internet2.edu)
              scott.koranda@at.internet2.edu Scott Koranda (uwm.edu/illinois.edu)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: