cloud-native-toolkit / terraform-tools-gitea

0 stars 1 forks source link

module returning before the git repo is ready #32

Closed triceam closed 1 year ago

triceam commented 1 year ago

In the last few weeks I've seen this error pop up when running our automation that is generated from a bill of materials or solution bom. There seems to be a timing issue. The gitea module is complete, implying the repo is ready and available, but when the automation proceeds, it fails with the following error, indicating the repo is not accessible. Re-running the automation without any changes will allow it to proceed, which indicates the module just needs to wait for the repo to be ready before the automation moves on to the next module.


╷
│ Error: local-exec provisioner error
│
│   with module.argocd-bootstrap.module.bootstrap.null_resource.bootstrap_argocd,
│   on .terraform/modules/argocd-bootstrap.bootstrap/main.tf line 78, in resource "null_resource" "bootstrap_argocd":
│   78:   provisioner "local-exec" {
│
│ Error running command
│ '.terraform/modules/argocd-bootstrap.bootstrap/scripts/argocd-bootstrap.sh
│ '' '' 'openshift-gitops'
│ 'https://gitea-gitea.cp4s-validation7-0ed2b1307d0ce0e0627ae949f443cd72-0000.us-east.containers.appdomain.cloud/gitea-admin/gitops-cp4s'
│ 'gitea-admin' 'argocd/0-bootstrap/cluster/default' ''': exit status 1.
│ Output: Usage: argocd-bootstrap.sh ARGOCD_HOST ARGOCD_USER ARGOCD_NAMESPACE
│ GIT_REPO GIT_USER BOOTSTRAP_PATH
│
╵
ERRO[0429] Terraform invocation failed in /terraform/cloud-pak-for-security-openshift/200-openshift-gitops/terraform  prefix=[/terraform/cloud-pak-for-security-openshift/200-openshift-gitops/terraform]
ERRO[0429] Module /terraform/cloud-pak-for-security-openshift/200-openshift-gitops/terraform has finished with an error: 1 error occurred:
    * exit status 1
  prefix=[/terraform/cloud-pak-for-security-openshift/200-openshift-gitops/terraform]
ERRO[0429] Dependency /terraform/cloud-pak-for-security-openshift/200-openshift-gitops/terraform of module /terraform/cloud-pak-for-security-openshift/700-cp4s-multicloud/terraform just finished with an error. Module /terraform/cloud-pak-for-security-openshift/700-cp4s-multicloud/terraform will have to return an error too.  prefix=[/terraform/cloud-pak-for-security-openshift/700-cp4s-multicloud/terraform]
ERRO[0429] Module /terraform/cloud-pak-for-security-openshift/700-cp4s-multicloud/terraform has finished with an error: Cannot process module Module /terraform/cloud-pak-for-security-openshift/700-cp4s-multicloud/terraform (excluded: false, assume applied: false, dependencies: [/terraform/cloud-pak-for-security-openshift/200-openshift-gitops/terraform]) because one of its dependencies, Module /terraform/cloud-pak-for-security-openshift/200-openshift-gitops/terraform (excluded: false, assume applied: false, dependencies: [/terraform/cloud-pak-for-security-openshift/105-existing-openshift/terraform]), finished with an error: 1 error occurred:
    * exit status 1
  prefix=[/terraform/cloud-pak-for-security-openshift/700-cp4s-multicloud/terraform]
ERRO[0429] 2 errors occurred:
    * exit status 1
    * Cannot process module Module /terraform/cloud-pak-for-security-openshift/700-cp4s-multicloud/terraform (excluded: false, assume applied: false, dependencies: [/terraform/cloud-pak-for-security-openshift/200-openshift-gitops/terraform]) because one of its dependencies, Module /terraform/cloud-pak-for-security-openshift/200-openshift-gitops/terraform (excluded: false, assume applied: false, dependencies: [/terraform/cloud-pak-for-security-openshift/105-existing-openshift/terraform]), finished with an error: 1 error occurred:
    * exit status 1