terraform-google-modules / terraform-google-jenkins

Creates a Compute Engine instance running Jenkins
https://registry.terraform.io/modules/terraform-google-modules/jenkins/google
Apache License 2.0
31 stars 69 forks source link

wait-for-jenkins.sh hangs #13

Closed ocervell closed 5 years ago

ocervell commented 5 years ago

Seems like the script wait-for-jenkins.sh hangs forever (I stopped it at 33m) - Jenkins is deployed successfully (checked UI is working and jobs can be ran), but the terraform apply never ends because the script is in a loop.

Here is the terraform output:

module.jenkins-gce.null_resource.wait_for_jenkins_configuration (local-exec): .
module.jenkins-gce.null_resource.wait_for_jenkins_configuration: Still creating... [33m10s elapsed]
module.jenkins-gce.null_resource.wait_for_jenkins_configuration (local-exec): .
module.jenkins-gce.null_resource.wait_for_jenkins_configuration: Still creating... [33m20s elapsed]
module.jenkins-gce.null_resource.wait_for_jenkins_configuration (local-exec): .
module.jenkins-gce.null_resource.wait_for_jenkins_configuration: Still creating... [33m30s elapsed]
module.jenkins-gce.null_resource.wait_for_jenkins_configuration (local-exec): .
module.jenkins-gce.null_resource.wait_for_jenkins_configuration (local-exec): .
module.jenkins-gce.null_resource.wait_for_jenkins_configuration: Still creating... [33m40s elapsed]
module.jenkins-gce.null_resource.wait_for_jenkins_configuration (local-exec): .
module.jenkins-gce.null_resource.wait_for_jenkins_configuration: Still creating... [33m50s elapsed]
module.jenkins-gce.null_resource.wait_for_jenkins_configuration (local-exec): .
module.jenkins-gce.null_resource.wait_for_jenkins_configuration: Still creating... [34m0s elapsed]
module.jenkins-gce.null_resource.wait_for_jenkins_configuration (local-exec): .
module.jenkins-gce.null_resource.wait_for_jenkins_configuration (local-exec): .

module.jenkins-gce.null_resource.wait_for_jenkins_configuration: Still creating... [34m10s elapsed]
ocervell commented 5 years ago

Checked on the machine and the file /tmp/instance_setup_complete is missing, which makes the script hangs. Any idea why that would happen ? Do we have documentation on this file ?

ingwarr commented 5 years ago

@ocervell Yes it missing because of this file should be created after run startup-script, this script uses the wrong path to the configuration file(because of breaking changes in the new bitnami-jenkins image) and hangs, please take a look: https://github.com/terraform-google-modules/terraform-google-jenkins/issues/11 my PR fixes it https://github.com/terraform-google-modules/terraform-google-jenkins/pull/12