bottlerocket-os / twoliter

A build tool for customizing Bottlerocket
Other
24 stars 25 forks source link

buildsys docker: the "real" error might be missing #44

Closed webern closed 1 year ago

webern commented 1 year ago
error: failed to run custom build command for `aws-k8s-1_27 v0.1.0 (/home/somebody/repos/bottlerocket/variants/aws-k8s-1.27)`

Caused by:
  process didn't exit successfully: `/home/somebody/repos/bottlerocket/variants/target/x86_64/debug/build/aws-k8s-1_27-108cce0380164e27/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=Cargo.toml
  cargo:rerun-if-env-changed=BUILDSYS_OUTPUT_DIR
  cargo:rerun-if-env-changed=BUILDSYS_VARIANT
  cargo:rerun-if-env-changed=BUILDSYS_ARCH
  cargo:rerun-if-env-changed=BUILDSYS_VERSION_IMAGE
  cargo:rerun-if-env-changed=BUILDSYS_VERSION_BUILD
  cargo:rerun-if-env-changed=BUILDSYS_PRETTY_NAME
  cargo:rerun-if-env-changed=BUILDSYS_NAME
  cargo:rerun-if-env-changed=TWOLITER_TOOLS_DIR
  cargo:rerun-if-env-changed=BUILDSYS_TIMESTAMP
  cargo:rerun-if-env-changed=BUILDSYS_ROOT_DIR
  cargo:rerun-if-env-changed=BUILDSYS_SDK_IMAGE
  cargo:rerun-if-env-changed=BUILDSYS_TOOLCHAIN
  cargo:rerun-if-env-changed=BUILDSYS_STATE_DIR
  cargo:rerun-if-env-changed=TWOLITER_TOOLS_DIR
  Error response from daemon: No such container: buildsys-var-aws-k8s-1.27-x86_64-d6a41564fad9

  Error response from daemon: No such image: buildsys-var-aws-k8s-1.27-x86_64-d6a41564fad9:latest

  ERROR: unsupported secret type "dir"
  1069376 v0.11.2 /usr/libexec/docker/cli-plugins/docker-buildx buildx build . --target variant --tag buildsys-var-aws-k8s-1.27-x86_64-d6a41564fad9 --file /tmp/.tmpIjhTBh/Dockerfile --network host --build-arg PACKAGES=aws-iam-authenticator cni cni-plugins kernel-5.15 kubelet-1.27 release --build-arg ARCH=x86_64 --build-arg GOARCH=amd64 --build-arg VARIANT=aws-k8s-1.27 --build-arg VERSION_ID=1.15.0 --build-arg BUILD_ID=32fd7cc6 --build-arg PRETTY_NAME=Bottlerocket OS --build-arg IMAGE_NAME=bottlerocket --build-arg IMAGE_FORMAT=raw --build-arg OS_IMAGE_SIZE_GIB=2 --build-arg DATA_IMAGE_SIZE_GIB=1 --build-arg OS_IMAGE_PUBLISH_SIZE_GIB=2 --build-arg DATA_IMAGE_PUBLISH_SIZE_GIB=20 --build-arg PARTITION_PLAN=split --build-arg KERNEL_PARAMETERS=console=tty0 console=ttyS0,115200n8 net.ifnames=0 netdog.default-interface=eth0:dhcp4,dhcp6? quiet --build-arg UNIFIED_CGROUP_HIERARCHY=1 --build-arg GRUB_SET_PRIVATE_VAR=1 --secret type=file,id=config-sign.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/config-sign.key --secret type=file,id=db.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/db.key --secret type=file,id=KEK.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/KEK.key --secret type=file,id=efi-vars.aws,src=/home/somebody/repos/bottlerocket/sbkeys/local/efi-vars.aws --secret type=file,id=PK.crt,src=/home/somebody/repos/bottlerocket/sbkeys/local/PK.crt --secret type=file,id=db.crt,src=/home/somebody/repos/bottlerocket/sbkeys/local/db.crt --secret type=file,id=vendor.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/vendor.key --secret type=file,id=KEK.crt,src=/home/somebody/repos/bottlerocket/sbkeys/local/KEK.crt --secret type=file,id=vendor.crt,src=/home/somebody/repos/bottlerocket/sbkeys/local/vendor.crt --secret type=file,id=code-sign.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/code-sign.key --secret type=file,id=shim-sign.crt,src=/home/somebody/repos/bottlerocket/sbkeys/local/shim-sign.crt --secret type=file,id=shim-sign.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/shim-sign.key --secret type=file,id=PK.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/PK.key --secret type=file,id=code-sign.crt,src=/home/somebody/repos/bottlerocket/sbkeys/local/code-sign.crt --secret type=file,id=efi-vars.json,src=/home/somebody/repos/bottlerocket/sbkeys/local/efi-vars.json --secret type=env,id=aws-access-key-id.env,src=AWS_ACCESS_KEY_ID --secret type=env,id=aws-secret-access-key.env,src=AWS_SECRET_ACCESS_KEY --secret type=env,id=aws-session-token.env,src=AWS_SESSION_TOKEN --secret type=dir,id=tools,src=/tmp/.tmpIjhTBh --build-arg SDK=public.ecr.aws/bottlerocket/bottlerocket-sdk-x86_64:v0.33.0 --build-arg TOOLCHAIN=public.ecr.aws/bottlerocket/bottlerocket-toolchain-x86_64:v0.33.0 --build-arg NOCACHE=1514217225 --build-arg TOKEN=d6a41564fad9
  github.com/docker/buildx/util/buildflags.parseSecret
    github.com/docker/buildx/util/buildflags/secrets.go:45
  github.com/docker/buildx/util/buildflags.ParseSecretSpecs
    github.com/docker/buildx/util/buildflags/secrets.go:14
  github.com/docker/buildx/commands.(*buildOptions).toControllerOptions
    github.com/docker/buildx/commands/build.go:171
  github.com/docker/buildx/commands.runBuild
    github.com/docker/buildx/commands/build.go:214
  github.com/docker/buildx/commands.buildCmd.func1
    github.com/docker/buildx/commands/build.go:442
  github.com/spf13/cobra.(*Command).execute
    github.com/spf13/cobra@v1.7.0/command.go:940
  github.com/spf13/cobra.(*Command).ExecuteC
    github.com/spf13/cobra@v1.7.0/command.go:1068
  github.com/spf13/cobra.(*Command).Execute
    github.com/spf13/cobra@v1.7.0/command.go:992
  github.com/docker/cli/cli-plugins/plugin.RunPlugin
    github.com/docker/cli@v24.0.2+incompatible/cli-plugins/plugin/plugin.go:51
  main.runPlugin
    github.com/docker/buildx/cmd/buildx/main.go:47
  main.main
    github.com/docker/buildx/cmd/buildx/main.go:64
  runtime.main
    runtime/proc.go:250
  runtime.goexit
    runtime/asm_amd64.s:1598

  --- stderr
  BuildAttempt: Failed to execute command: 'docker build . --target variant --tag buildsys-var-aws-k8s-1.27-x86_64-d6a41564fad9 --file /tmp/.tmpIjhTBh/Dockerfile --network host --build-arg PACKAGES=aws-iam-authenticator cni cni-plugins kernel-5.15 kubelet-1.27 release --build-arg ARCH=x86_64 --build-arg GOARCH=amd64 --build-arg VARIANT=aws-k8s-1.27 --build-arg VERSION_ID=1.15.0 --build-arg BUILD_ID=32fd7cc6 --build-arg PRETTY_NAME=Bottlerocket OS --build-arg IMAGE_NAME=bottlerocket --build-arg IMAGE_FORMAT=raw --build-arg OS_IMAGE_SIZE_GIB=2 --build-arg DATA_IMAGE_SIZE_GIB=1 --build-arg OS_IMAGE_PUBLISH_SIZE_GIB=2 --build-arg DATA_IMAGE_PUBLISH_SIZE_GIB=20 --build-arg PARTITION_PLAN=split --build-arg KERNEL_PARAMETERS=console=tty0 console=ttyS0,115200n8 net.ifnames=0 netdog.default-interface=eth0:dhcp4,dhcp6? quiet --build-arg UNIFIED_CGROUP_HIERARCHY=1 --build-arg GRUB_SET_PRIVATE_VAR=1 --secret type=file,id=config-sign.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/config-sign.key --secret type=file,id=db.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/db.key --secret type=file,id=KEK.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/KEK.key --secret type=file,id=efi-vars.aws,src=/home/somebody/repos/bottlerocket/sbkeys/local/efi-vars.aws --secret type=file,id=PK.crt,src=/home/somebody/repos/bottlerocket/sbkeys/local/PK.crt --secret type=file,id=db.crt,src=/home/somebody/repos/bottlerocket/sbkeys/local/db.crt --secret type=file,id=vendor.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/vendor.key --secret type=file,id=KEK.crt,src=/home/somebody/repos/bottlerocket/sbkeys/local/KEK.crt --secret type=file,id=vendor.crt,src=/home/somebody/repos/bottlerocket/sbkeys/local/vendor.crt --secret type=file,id=code-sign.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/code-sign.key --secret type=file,id=shim-sign.crt,src=/home/somebody/repos/bottlerocket/sbkeys/local/shim-sign.crt --secret type=file,id=shim-sign.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/shim-sign.key --secret type=file,id=PK.key,src=/home/somebody/repos/bottlerocket/sbkeys/local/PK.key --secret type=file,id=code-sign.crt,src=/home/somebody/repos/bottlerocket/sbkeys/local/code-sign.crt --secret type=file,id=efi-vars.json,src=/home/somebody/repos/bottlerocket/sbkeys/local/efi-vars.json --secret type=env,id=aws-access-key-id.env,src=AWS_ACCESS_KEY_ID --secret type=env,id=aws-secret-access-key.env,src=AWS_SECRET_ACCESS_KEY --secret type=env,id=aws-session-token.env,src=AWS_SESSION_TOKEN --secret type=dir,id=tools,src=/tmp/.tmpIjhTBh --build-arg SDK=public.ecr.aws/bottlerocket/bottlerocket-sdk-x86_64:v0.33.0 --build-arg TOOLCHAIN=public.ecr.aws/bottlerocket/bottlerocket-toolchain-x86_64:v0.33.0 --build-arg NOCACHE=1514217225 --build-arg TOKEN=d6a41564fad9'
[cargo-make][1] ERROR - Error while executing command, exit code: 101
[cargo-make][1] WARN - Build Failed.
Error: Command 'Command { std: "cargo" "make" "--disable-check-for-updates" "--makefile" "/tmp/.tmpIjhTBh/Makefile.toml" "--cwd" "/home/somebody/repos/bottlerocket"  [...]  }' was unsuccessful, exit code 1
[cargo-make] ERROR - Error while executing command, exit code: 1
[cargo-make] WARN - Build Failed.
bcressey commented 1 year ago

Is this not the real error?

ERROR: unsupported secret type "dir"
webern commented 1 year ago

Oh it probably is. Thank you.

webern commented 1 year ago

This is working fine. Closing.