Github user terbolous commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/910#discussion_r41142674
  
    --- Diff: tools/docker/init.sh_centos6 ---
    @@ -17,27 +17,35 @@
     # under the License.
     #
     # update database connection
    +# /usr/bin/cloudstack-setup-databases 
cloud:password@$MYSQL_PORT_3306_TCP_ADDR
     # start cloudstack-management server
    -#/usr/bin/cloudstack-setup-databases 
cloud:password@$MYSQL_PORT_3306_TCP_ADDR
     
     # initial startup of the container to generage ssh_key
     # performed as privileged
     if [ ! -d /var/cloudstack/management/.ssh ]; then
        mknod /dev/loop6 -m0660 b 7 6
     fi
    -sleep 5
     
    -mysql -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD" -h"$MYSQL_PORT_3306_TCP_ADDR" \
    +RESTART_REQUIRED=false
    +
    +until nc -z $MYSQL_PORT_3306_TCP_ADDR 3306; do
    --- End diff --
    
    If the environment variable is missing this will loop like this:
    eriweb@ubuntu-docker:~/git/cloudstack/tools/docker pr/910$ docker run -ti 
cloudstack/management_centos6
    usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port]
          [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version]
          [-x proxy_address[:port]] [hostname] [port[s]]
    waiting for mysql-server...
    usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port]
          [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version]
          [-x proxy_address[:port]] [hostname] [port[s]]
    waiting for mysql-server...
    
    Perhaps we should add a check for required variables and fail if they are 
not present?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to