Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] terraform cannot get namespace resource during qhub deploy to DigitalOcean #998

Closed
yuhuishi-convect opened this issue Jan 17, 2022 · 1 comment

Comments

@yuhuishi-convect
Copy link

Describe the bug

  • Terraform complains about not getting the namespace when calling qhub deploy
INFO:qhub.provider.terraform:terraform init took 2.369 [s]
INFO:qhub.provider.terraform:terraform apply directory=infrastructure targets=['module.kubernetes', 'module.kubernetes-initialization', 'module.kubernetes-ingress']
INFO:qhub.provider.terraform: terraform at /tmp/terraform/1.0.5/terraform
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Refreshing state... [id=5f93f0a4-6380-4fe5-854b-8a4d246030de]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Refreshing state... [id=7417c283-c587-42e8-9bed-b8fde8f3a312]
[terraform]: module.kubernetes-initialization.kubernetes_namespace.main: Refreshing state... [id=dev]
[terraform]: ╷
[terraform]: │ Warning: Resource targeting is in effect
[terraform]: │ 
[terraform]: │ You are creating a plan with the -target option, which means that the
[terraform]: │ result of this plan may not represent all of the changes requested by the
[terraform]: │ current configuration.
[terraform]: │ 
[terraform]: │ The -target option is not for routine use, and is provided only for
[terraform]: │ exceptional situations such as recovering from errors or mistakes, or when
[terraform]: │ Terraform specifically suggests to use it as part of an error message.
[terraform]: ╵
[terraform]: ╷
[terraform]: │ Error: Get "http://localhost/api/v1/namespaces/dev": dial tcp 127.0.0.1:80: connect: connection refused
[terraform]: │ 
[terraform]: │   with module.kubernetes-initialization.kubernetes_namespace.main,
[terraform]: │   on modules/kubernetes/initialization/main.tf line 1, in resource "kubernetes_namespace" "main":
[terraform]: │    1: resource "kubernetes_namespace" "main" {
[terraform]: │ 
[terraform]: ╵

Problem encountered: Terraform error

Expected behaviour

  • No error expected

Actual behaviour

  • Failed during the infra spawning process

How to reproduce

qhub-config.yaml
project_name: qhub-test
provider: do
domain: jhub.convect.ai
certificate:
  type: self-signed
security:
  authentication:
    type: GitHub
    config:
      client_id: <MASKED>
      client_secret: <MASKED>
      oauth_callback_url: <MASKED>
  users:
    yuhuishi-convect:
      uid: 1000
      primary_group: admin
      secondary_groups:
      - users
  groups:
    users:
      gid: 100
    admin:
      gid: 101
default_images:
  jupyterhub: quansight/qhub-jupyterhub:v0.3.14
  jupyterlab: quansight/qhub-jupyterlab:v0.3.14
  dask_worker: quansight/qhub-dask-worker:v0.3.14
  dask_gateway: quansight/qhub-dask-gateway:v0.3.14
  conda_store: quansight/qhub-conda-store:v0.3.14
storage:
  conda_store: 20Gi
  shared_filesystem: 10Gi
monitoring:
  enabled: false
cdsdashboards:
  enabled: true
  cds_hide_user_named_servers: true
  cds_hide_user_dashboard_servers: true
ci_cd:
  type: github-actions
  branch: main
terraform_state:
  type: remote
namespace: dev
digital_ocean:
  region: nyc3
  kubernetes_version: '1.21'
  node_groups:
    general:
      instance: g-4vcpu-16gb
      min_nodes: 1
      max_nodes: 1
    user:
      instance: g-2vcpu-8gb
      min_nodes: 1
      max_nodes: 6
profiles:
  jupyterlab:
  - display_name: Small Instance
    description: Stable environment with 1 cpu / 4 GB ram
    default: true
    kubespawner_override:
      cpu_limit: 1
      cpu_guarantee: 0.75
      mem_limit: 4G
      mem_guarantee: 2.5G
      image: quansight/qhub-jupyterlab:v0.3.14
  - display_name: Medium Instance
    description: Stable environment with 2 cpu / 8 GB ram
    kubespawner_override:
      cpu_limit: 2
      cpu_guarantee: 1.5
      mem_limit: 8G
      mem_guarantee: 5G
      image: quansight/qhub-jupyterlab:v0.3.14
  dask_worker:
    Small Worker:
      worker_cores_limit: 1
      worker_cores: 0.75
      worker_memory_limit: 4G
      worker_memory: 2.5G
      worker_threads: 1
      image: quansight/qhub-dask-worker:v0.3.14
    Medium Worker:
      worker_cores_limit: 2
      worker_cores: 1.5
      worker_memory_limit: 8G
      worker_memory: 5G
      worker_threads: 2
      image: quansight/qhub-dask-worker:v0.3.14
environments:
  environment-dask.yaml:
    name: dask
    channels:
    - conda-forge
    dependencies:
    - python
    - ipykernel
    - ipywidgets
    - qhub-dask ==0.3.13
    - python-graphviz
    - numpy
    - numba
    - pandas
  environment-dashboard.yaml:
    name: dashboard
    channels:
    - conda-forge
    dependencies:
    - python==3.9.7
    - ipykernel==6.4.1
    - ipywidgets==7.6.5
    - qhub-dask==0.3.13
    - param==1.11.1
    - python-graphviz==0.17
    - matplotlib==3.4.3
    - panel==0.12.4
    - voila==0.2.16
    - streamlit==1.0.0
    - dash==2.0.0
    - cdsdashboards-singleuser==0.6.0

Then

qhub deploy -c qhub-config.yaml

Your personal set up

OS

  • Linux yuhui-mini-itx-desktop 5.11.0-46-generic #51~20.04.1-Ubuntu SMP Fri Jan 7 06:51:40 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Dependencies

  • python - Python 3.8.5
  • pip - pip 20.1.1
  • virtualenv

Failure Logs

log
$ qhub deploy -c qhub-config.yaml
INFO:qhub.deploy:All qhub endpoints will be under https://jhub.convect.ai
INFO:qhub.provider.terraform:terraform init directory=terraform-state
INFO:qhub.provider.terraform: terraform at /tmp/terraform/1.0.5/terraform
[terraform]: Initializing modules...
[terraform]: - terraform-state in modules/digitalocean/terraform-state
[terraform]: - terraform-state.spaces in modules/digitalocean/spaces
[terraform]: 
[terraform]: Initializing the backend...
[terraform]: 
[terraform]: Initializing provider plugins...
[terraform]: - Finding latest version of digitalocean/digitalocean...
[terraform]: - Installing digitalocean/digitalocean v2.17.0...
[terraform]: - Installed digitalocean/digitalocean v2.17.0 (signed by a HashiCorp partner, key ID F82037E524B9C0E8)
[terraform]: 
[terraform]: Partner and community providers are signed by their developers.
[terraform]: If you'd like to know more about provider signing, you can read about it here:
[terraform]: https://www.terraform.io/docs/cli/plugins/signing.html
[terraform]: 
[terraform]: Terraform has created a lock file .terraform.lock.hcl to record the provider
[terraform]: selections it made above. Include this file in your version control repository
[terraform]: so that Terraform can guarantee to make the same selections by default when
[terraform]: you run "terraform init" in the future.
[terraform]: 
[terraform]: Terraform has been successfully initialized!
[terraform]: 
[terraform]: You may now begin working with Terraform. Try running "terraform plan" to see
[terraform]: any changes that are required for your infrastructure. All Terraform commands
[terraform]: should now work.
[terraform]: 
[terraform]: If you ever set or change modules or backend configuration for Terraform,
[terraform]: rerun this command to reinitialize your working directory. If you forget, other
[terraform]: commands will detect it and remind you to do so if necessary.
INFO:qhub.provider.terraform:terraform init took 3.301 [s]
INFO:qhub.provider.terraform:rm local state file terraform.tfstate directory=terraform-state
INFO:qhub.provider.terraform:terraform import directory=terraform-state addr=module.terraform-state.module.spaces.digitalocean_spaces_bucket.main id=nyc3,qhub-test-dev-terraform-state
INFO:qhub.provider.terraform: terraform at /tmp/terraform/1.0.5/terraform
[terraform]: module.terraform-state.module.spaces.digitalocean_spaces_bucket.main: Importing from ID "nyc3,qhub-test-dev-terraform-state"...
[terraform]: module.terraform-state.module.spaces.digitalocean_spaces_bucket.main: Import prepared!
[terraform]:   Prepared digitalocean_spaces_bucket for import
[terraform]: module.terraform-state.module.spaces.digitalocean_spaces_bucket.main: Refreshing state... [id=qhub-test-dev-terraform-state]
[terraform]: 
[terraform]: Import successful!
[terraform]: 
[terraform]: The resources that were imported are shown above. These resources are now in
[terraform]: your Terraform state and will henceforth be managed by Terraform.
[terraform]: 
INFO:qhub.provider.terraform:terraform import took 1.080 [s]
INFO:qhub.provider.terraform:terraform apply directory=terraform-state targets=[]
INFO:qhub.provider.terraform: terraform at /tmp/terraform/1.0.5/terraform
[terraform]: module.terraform-state.module.spaces.digitalocean_spaces_bucket.main: Refreshing state... [id=qhub-test-dev-terraform-state]
[terraform]: 
[terraform]: Terraform used the selected providers to generate the following execution
[terraform]: plan. Resource actions are indicated with the following symbols:
[terraform]:   ~ update in-place
[terraform]: 
[terraform]: Terraform will perform the following actions:
[terraform]: 
[terraform]:   # module.terraform-state.module.spaces.digitalocean_spaces_bucket.main will be updated in-place
[terraform]:   ~ resource "digitalocean_spaces_bucket" "main" {
[terraform]:       + acl                = "private"
[terraform]:       + force_destroy      = true
[terraform]:         id                 = "qhub-test-dev-terraform-state"
[terraform]:         name               = "qhub-test-dev-terraform-state"
[terraform]:         # (3 unchanged attributes hidden)
[terraform]: 
[terraform]:         # (1 unchanged block hidden)
[terraform]:     }
[terraform]: 
[terraform]: Plan: 0 to add, 1 to change, 0 to destroy.
[terraform]: module.terraform-state.module.spaces.digitalocean_spaces_bucket.main: Modifying... [id=qhub-test-dev-terraform-state]
[terraform]: module.terraform-state.module.spaces.digitalocean_spaces_bucket.main: Modifications complete after 0s [id=qhub-test-dev-terraform-state]
[terraform]: 
[terraform]: Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
[terraform]: INFO:qhub.provider.terraform:terraform apply took 2.134 [s]
INFO:qhub.provider.terraform:terraform init directory=infrastructure
INFO:qhub.provider.terraform: terraform at /tmp/terraform/1.0.5/terraform
[terraform]: Initializing modules...
[terraform]: - forwardauth in modules/kubernetes/forwardauth
[terraform]: - kubernetes in modules/digitalocean/kubernetes
[terraform]: - kubernetes-conda-store-mount in modules/kubernetes/nfs-mount
[terraform]: - kubernetes-conda-store-server in modules/kubernetes/services/conda-store
[terraform]: - kubernetes-ingress in modules/kubernetes/ingress
[terraform]: - kubernetes-initialization in modules/kubernetes/initialization
[terraform]: - kubernetes-nfs-mount in modules/kubernetes/nfs-mount
[terraform]: - kubernetes-nfs-server in modules/kubernetes/nfs-server
[terraform]: - qhub in modules/kubernetes/services/meta/qhub
[terraform]: - qhub.external-container-reg in modules/kubernetes/services/extcr
[terraform]: - qhub.kubernetes-dask-gateway in modules/kubernetes/services/dask-gateway
[terraform]: - qhub.kubernetes-jupyterhub in modules/kubernetes/services/jupyterhub
[terraform]: - qhub.kubernetes-jupyterhub-ssh in modules/kubernetes/services/jupyterhub-ssh
[terraform]: 
[terraform]: Initializing the backend...
[terraform]: 
[terraform]: Successfully configured the backend "s3"! Terraform will automatically
[terraform]: use this backend unless the backend configuration changes.
[terraform]: 
[terraform]: Initializing provider plugins...
[terraform]: - Finding hashicorp/kubernetes versions matching "2.3.2"...
[terraform]: - Finding latest version of hashicorp/random...
[terraform]: - Finding latest version of hashicorp/tls...
[terraform]: - Finding hashicorp/kubernetes-alpha versions matching "0.3.2"...
[terraform]: - Finding digitalocean/digitalocean versions matching "2.14.0"...
[terraform]: - Finding hashicorp/helm versions matching "2.1.2"...
[terraform]: - Installing hashicorp/helm v2.1.2...
[terraform]: - Installed hashicorp/helm v2.1.2 (signed by HashiCorp)
[terraform]: - Installing hashicorp/kubernetes v2.3.2...
[terraform]: - Installed hashicorp/kubernetes v2.3.2 (signed by HashiCorp)
[terraform]: - Installing hashicorp/random v3.1.0...
[terraform]: - Installed hashicorp/random v3.1.0 (signed by HashiCorp)
[terraform]: - Installing hashicorp/tls v3.1.0...
[terraform]: - Installed hashicorp/tls v3.1.0 (signed by HashiCorp)
[terraform]: - Installing hashicorp/kubernetes-alpha v0.3.2...
[terraform]: - Installed hashicorp/kubernetes-alpha v0.3.2 (signed by HashiCorp)
[terraform]: - Installing digitalocean/digitalocean v2.14.0...
[terraform]: - Installed digitalocean/digitalocean v2.14.0 (signed by a HashiCorp partner, key ID F82037E524B9C0E8)
[terraform]: 
[terraform]: Partner and community providers are signed by their developers.
[terraform]: If you'd like to know more about provider signing, you can read about it here:
[terraform]: https://www.terraform.io/docs/cli/plugins/signing.html
[terraform]: 
[terraform]: Terraform has created a lock file .terraform.lock.hcl to record the provider
[terraform]: selections it made above. Include this file in your version control repository
[terraform]: so that Terraform can guarantee to make the same selections by default when
[terraform]: you run "terraform init" in the future.
[terraform]: 
[terraform]: ╷
[terraform]: │ Warning: Additional provider information from registry
[terraform]: │ 
[terraform]: │ The remote registry returned warnings for
[terraform]: │ registry.terraform.io/hashicorp/kubernetes-alpha:
[terraform]: │ - Please do not rely on this provider for production use while we strive
[terraform]: │ towards project maturity.
[terraform]: │ https://github.com/hashicorp/terraform-provider-kubernetes-alpha#experimental-status
[terraform]: ╵
[terraform]: 
[terraform]: Terraform has been successfully initialized!
[terraform]: 
[terraform]: You may now begin working with Terraform. Try running "terraform plan" to see
[terraform]: any changes that are required for your infrastructure. All Terraform commands
[terraform]: should now work.
[terraform]: 
[terraform]: If you ever set or change modules or backend configuration for Terraform,
[terraform]: rerun this command to reinitialize your working directory. If you forget, other
[terraform]: commands will detect it and remind you to do so if necessary.
INFO:qhub.provider.terraform:terraform init took 17.651 [s]
INFO:qhub.provider.terraform:terraform apply directory=infrastructure targets=['module.kubernetes', 'module.kubernetes-initialization']
INFO:qhub.provider.terraform: terraform at /tmp/terraform/1.0.5/terraform
[terraform]: 
[terraform]: Terraform used the selected providers to generate the following execution
[terraform]: plan. Resource actions are indicated with the following symbols:
[terraform]:   + create
[terraform]: 
[terraform]: Terraform will perform the following actions:
[terraform]: 
[terraform]:   # module.kubernetes.digitalocean_kubernetes_cluster.main will be created
[terraform]:   + resource "digitalocean_kubernetes_cluster" "main" {
[terraform]:       + cluster_subnet = (known after apply)
[terraform]:       + created_at     = (known after apply)
[terraform]:       + endpoint       = (known after apply)
[terraform]:       + ha             = false
[terraform]:       + id             = (known after apply)
[terraform]:       + ipv4_address   = (known after apply)
[terraform]:       + kube_config    = (sensitive value)
[terraform]:       + name           = "qhub-test-dev"
[terraform]:       + region         = "nyc3"
[terraform]:       + service_subnet = (known after apply)
[terraform]:       + status         = (known after apply)
[terraform]:       + surge_upgrade  = true
[terraform]:       + updated_at     = (known after apply)
[terraform]:       + urn            = (known after apply)
[terraform]:       + version        = "1.21"
[terraform]:       + vpc_uuid       = (known after apply)
[terraform]: 
[terraform]:       + maintenance_policy {
[terraform]:           + day        = (known after apply)
[terraform]:           + duration   = (known after apply)
[terraform]:           + start_time = (known after apply)
[terraform]:         }
[terraform]: 
[terraform]:       + node_pool {
[terraform]:           + actual_node_count = (known after apply)
[terraform]:           + auto_scale        = false
[terraform]:           + id                = (known after apply)
[terraform]:           + name              = "general"
[terraform]:           + node_count        = 1
[terraform]:           + nodes             = (known after apply)
[terraform]:           + size              = "g-4vcpu-16gb"
[terraform]:         }
[terraform]:     }
[terraform]: 
[terraform]:   # module.kubernetes.digitalocean_kubernetes_node_pool.main[0] will be created
[terraform]:   + resource "digitalocean_kubernetes_node_pool" "main" {
[terraform]:       + actual_node_count = (known after apply)
[terraform]:       + auto_scale        = true
[terraform]:       + cluster_id        = (known after apply)
[terraform]:       + id                = (known after apply)
[terraform]:       + max_nodes         = 6
[terraform]:       + min_nodes         = 1
[terraform]:       + name              = "user"
[terraform]:       + nodes             = (known after apply)
[terraform]:       + size              = "g-2vcpu-8gb"
[terraform]:     }
[terraform]: 
[terraform]:   # module.kubernetes-initialization.kubernetes_namespace.main will be created
[terraform]:   + resource "kubernetes_namespace" "main" {
[terraform]:       + id = (known after apply)
[terraform]: 
[terraform]:       + metadata {
[terraform]:           + generation       = (known after apply)
[terraform]:           + name             = "dev"
[terraform]:           + resource_version = (known after apply)
[terraform]:           + uid              = (known after apply)
[terraform]:         }
[terraform]:     }
[terraform]: 
[terraform]: Plan: 3 to add, 0 to change, 0 to destroy.
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Creating...
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/opt/miniconda/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/opt/miniconda/lib/python3.8/threading.py", line 1254, in run
    self.function(*self.args, **self.kwargs)
  File "/data/jupyterhub/.venv/lib/python3.8/site-packages/qhub/utils.py", line 75, in kill_process
    os.killpg(process.pid, signal.SIGTERM)
ProcessLookupError: [Errno 3] No such process
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [10s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [20s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [30s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [40s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [50s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [1m0s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [1m10s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [1m20s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [1m30s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [1m40s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [1m50s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [2m0s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [2m10s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [2m20s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [2m30s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [2m40s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [2m50s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [3m0s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [3m10s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [3m20s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [3m30s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [3m40s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [3m50s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [4m0s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [4m10s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [4m20s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [4m30s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [4m40s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [4m50s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [5m0s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [5m10s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [5m20s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [5m30s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [5m40s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [5m50s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [6m0s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [6m10s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Still creating... [6m20s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Creation complete after 6m24s [id=5f93f0a4-6380-4fe5-854b-8a4d246030de]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Creating...
[terraform]: module.kubernetes-initialization.kubernetes_namespace.main: Creating...
[terraform]: module.kubernetes-initialization.kubernetes_namespace.main: Creation complete after 1s [id=dev]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Still creating... [10s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Still creating... [20s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Still creating... [30s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Still creating... [40s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Still creating... [50s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Still creating... [1m0s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Still creating... [1m10s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Still creating... [1m20s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Still creating... [1m30s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Still creating... [1m40s elapsed]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Creation complete after 1m42s [id=7417c283-c587-42e8-9bed-b8fde8f3a312]
[terraform]: ╷
[terraform]: │ Warning: Resource targeting is in effect
[terraform]: │ 
[terraform]: │ You are creating a plan with the -target option, which means that the
[terraform]: │ result of this plan may not represent all of the changes requested by the
[terraform]: │ current configuration.
[terraform]: │ 
[terraform]: │ The -target option is not for routine use, and is provided only for
[terraform]: │ exceptional situations such as recovering from errors or mistakes, or when
[terraform]: │ Terraform specifically suggests to use it as part of an error message.
[terraform]: ╵
[terraform]: ╷
[terraform]: │ Warning: Applied changes may be incomplete
[terraform]: │ 
[terraform]: │ The plan was created with the -target option in effect, so some changes
[terraform]: │ requested in the configuration may have been ignored and the output values
[terraform]: │ may not be fully updated. Run the following command to verify that no other
[terraform]: │ changes are pending:
[terraform]: │     terraform plan
[terraform]: │ 
[terraform]: │ Note that the -target option is not suitable for routine use, and is
[terraform]: │ provided only for exceptional situations such as recovering from errors or
[terraform]: │ mistakes, or when Terraform specifically suggests to use it as part of an
[terraform]: │ error message.
[terraform]: ╵
[terraform]: 
[terraform]: Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
[terraform]: INFO:qhub.provider.terraform:terraform apply took 488.424 [s]
INFO:qhub.provider.terraform:terraform init directory=infrastructure
INFO:qhub.provider.terraform: terraform at /tmp/terraform/1.0.5/terraform
[terraform]: Initializing modules...
[terraform]: 
[terraform]: Initializing the backend...
[terraform]: 
[terraform]: Initializing provider plugins...
[terraform]: - Reusing previous version of hashicorp/kubernetes from the dependency lock file
[terraform]: - Reusing previous version of hashicorp/kubernetes-alpha from the dependency lock file
[terraform]: - Reusing previous version of digitalocean/digitalocean from the dependency lock file
[terraform]: - Reusing previous version of hashicorp/random from the dependency lock file
[terraform]: - Reusing previous version of hashicorp/tls from the dependency lock file
[terraform]: - Reusing previous version of hashicorp/helm from the dependency lock file
[terraform]: - Using previously-installed hashicorp/kubernetes-alpha v0.3.2
[terraform]: - Using previously-installed digitalocean/digitalocean v2.14.0
[terraform]: - Using previously-installed hashicorp/random v3.1.0
[terraform]: - Using previously-installed hashicorp/tls v3.1.0
[terraform]: - Using previously-installed hashicorp/helm v2.1.2
[terraform]: - Using previously-installed hashicorp/kubernetes v2.3.2
[terraform]: 
[terraform]: ╷
[terraform]: │ Warning: Additional provider information from registry
[terraform]: │ 
[terraform]: │ The remote registry returned warnings for
[terraform]: │ registry.terraform.io/hashicorp/kubernetes-alpha:
[terraform]: │ - Please do not rely on this provider for production use while we strive
[terraform]: │ towards project maturity.
[terraform]: │ https://github.com/hashicorp/terraform-provider-kubernetes-alpha#experimental-status
[terraform]: ╵
[terraform]: 
[terraform]: Terraform has been successfully initialized!
[terraform]: 
[terraform]: You may now begin working with Terraform. Try running "terraform plan" to see
[terraform]: any changes that are required for your infrastructure. All Terraform commands
[terraform]: should now work.
[terraform]: 
[terraform]: If you ever set or change modules or backend configuration for Terraform,
[terraform]: rerun this command to reinitialize your working directory. If you forget, other
[terraform]: commands will detect it and remind you to do so if necessary.
INFO:qhub.provider.terraform:terraform init took 2.369 [s]
INFO:qhub.provider.terraform:terraform apply directory=infrastructure targets=['module.kubernetes', 'module.kubernetes-initialization', 'module.kubernetes-ingress']
INFO:qhub.provider.terraform: terraform at /tmp/terraform/1.0.5/terraform
[terraform]: module.kubernetes.digitalocean_kubernetes_cluster.main: Refreshing state... [id=5f93f0a4-6380-4fe5-854b-8a4d246030de]
[terraform]: module.kubernetes.digitalocean_kubernetes_node_pool.main[0]: Refreshing state... [id=7417c283-c587-42e8-9bed-b8fde8f3a312]
[terraform]: module.kubernetes-initialization.kubernetes_namespace.main: Refreshing state... [id=dev]
[terraform]: ╷
[terraform]: │ Warning: Resource targeting is in effect
[terraform]: │ 
[terraform]: │ You are creating a plan with the -target option, which means that the
[terraform]: │ result of this plan may not represent all of the changes requested by the
[terraform]: │ current configuration.
[terraform]: │ 
[terraform]: │ The -target option is not for routine use, and is provided only for
[terraform]: │ exceptional situations such as recovering from errors or mistakes, or when
[terraform]: │ Terraform specifically suggests to use it as part of an error message.
[terraform]: ╵
[terraform]: ╷
[terraform]: │ Error: Get "http://localhost/api/v1/namespaces/dev": dial tcp 127.0.0.1:80: connect: connection refused
[terraform]: │ 
[terraform]: │   with module.kubernetes-initialization.kubernetes_namespace.main,
[terraform]: │   on modules/kubernetes/initialization/main.tf line 1, in resource "kubernetes_namespace" "main":
[terraform]: │    1: resource "kubernetes_namespace" "main" {
[terraform]: │ 
[terraform]: ╵

Problem encountered: Terraform error
@danlester
Copy link
Contributor

Thank you very much for posting this issue.

I believe that this is the same problem seen in #992

That has a corresponding code change that is expected to fix it, so hopefully this will solve your issue once version 0.4 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants