Skip to content

Bug: Obscure error when using Docker template #1198

Closed

Description

@ammario

Steps to reproduce

Environment: M1 MacOS, v0.0.0-devel+8661f92

  1. Turn on Docker Daemon
  2. Start coder with coder server --dev
  3. Create a default Docker template via templates init and templates create

Observe the obscure error on the client side:
image

Observe the obscure error in the server log:
image

Also: we emit job has already been marked as failed which is redundant with failing running job.


This issue is important since we plan for the Docker-based install to be default.

Activity

  1. changed the title [-]Bug: Obscure error when Docker daemon is off[/-] [+]Bug: Obscure error when using Docker template[/+] on Apr 27, 2022
  2. added this to the Community MVP milestone on May 2, 2022
  3. modified the milestones: Community MVP, V2 Beta on May 4, 2022
  4. misskniss commented on May 5, 2022

    @misskniss

    Same with this one @ammario With this sprint so packed to get to Beta and that we have a sprint before the switch happens, I am going to align this with the first sprint of community. That does not mean it can't be picked up before that though. Let me know if you still want to inject this into Beta. CC @tjcran

  5. misskniss commented on May 5, 2022

    @misskniss

    Hey team! Please add your planning poker estimate with ZenHub @jsjoeio @bpmct

  6. 6 remaining items

  7. misskniss commented on May 10, 2022

    @misskniss
  8. misskniss commented on May 17, 2022

    @misskniss

    @johnstcn and @mafredri timebox this investigation to see if you can find root cause and get an estimate for points and then we will evaluate if this is still a switch blocker

  9. misskniss commented on May 17, 2022

    @misskniss
  10. johnstcn commented on May 18, 2022

    @johnstcn
    Member

    Paired with @mafredri -- spent a couple hours and was able to partially reproduce the issue, although there have been several improvements since then.

    Also noting I am able to run through the docker-local flow on my M1 mac on latest master (using Colima instead of Docker Desktop). So I'm not sure if this can still be called a switch-blocker.

    Steps to reproduce

    • Input invalid Terraform to cause the import job to fail (for example, reference a missing variable or provide an invalid parameter).
    • Terraform v1.1.9 has some fixes for CLI output (we currently embed 1.1.7).
    • We didn't have arm64 scripts for coder agent at the time; I believe this might have been the root cause of the missing variable in the terraform input.
    • job has already been marked as failed doesn't appear to happen any more.
    • We do now have the Terraform output in the CLI so that at least provides more detail
    $ coder templates create
    > Create and upload "/tmp/docker-local"? (yes/no)  
    ✔ Queued [28ms]
    ✔ Setting up [3ms]
    ✔ Adding README.md... [0ms]
    ✔ Parse parameters [2ms]
    ⧗  Detecting persistent resources 
      Terraform 1.1.7
      Error: Unsupported attribute
      This object has no argument, nested block, or exported attribute named "init_scripttt". Did you mean "init_script"?
    ✘ Detecting persistent resources [4694ms]
    template import provision for start: recv import provision: plan terraform: exit status 1

    Fixes

    Notes

    • Unable to reproduce issue on rPi 3 with latest version (arm64)
    • Unable to reproduce with auto-installed terraform on version 8661f92 -- coder server --dev fails to start with the error install terraform: unexpected Content-Type: "application/vnd+hashicorp.releases-api.v0+json"

    CC @tjcran @misskniss

  11. jsjoeio commented on May 20, 2022

    @jsjoeio
    Contributor

    @johnstcn chiming in to see if I can help move this forward. Should we turn your other fixes(first 3) into issues and close this?

  12. johnstcn commented on May 20, 2022

    @johnstcn
    Member

    @jsjoeio I don't think that much overhead is necessary! I was thinking of just attaching PRs to this ticket for each of those.

  13. dwahler commented on May 24, 2022

    @dwahler
    Contributor

    One thing that helps a bit with troubleshooting this kind of problem: the default Docker logging driver deletes logs as soon as a container is deleted. But if you use the journald driver instead, you can view logs even after container deletion, using journalctl -u docker.service.

  14. johnstcn commented on May 25, 2022

    @johnstcn
    Member

    Ended up making a separate issue for provisioner job output, as we need to ensure adminstrators can set its verbosity independently #1733

  15. johnstcn commented on May 27, 2022

    @johnstcn
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apiArea: HTTP API

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions