blablacar / dgr

Container build and runtime tool
Apache License 2.0
248 stars 21 forks source link

'dgr init': Build failed #259

Closed antage closed 6 years ago

antage commented 6 years ago

OS: Debian 9.0 amd64

rkt version:

rkt Version: 1.29.0
appc Version: 0.8.11
Go Version: go1.8.3
Go OS/Arch: linux/amd64
Features: -TPM +SDJOURNAL

sudo dgr version:

dgr

version    : 90
build date : 2017-10-30_15:07:40_UTC
CommitHash : c369207

Run sudo dgr init in an empty directory:

--- oci/aci-base » sudo dgr init 
05:50:46 INFO            dgr/dgr/aci-build.go:52  Building                                     aci=aci.example.com/aci-dummy:1
05:50:47 INFO            dgr/dgr/aci-build.go:210 Importing build to rkt                       aci=aci.example.com/aci-dummy:1 path=/home/antage/workspace/oci/aci-base/target/builder/image.aci
05:50:48 INFO            dgr/dgr/aci-build.go:72  Calling rkt to start build                   aci=aci.example.com/aci-dummy:1
run: disabling overlay support: "unsupported filesystem: missing d_type support"
05:50:49 INFO          d/a/bin-run/builder.go:66  Building aci                                 aci=aci-dummy
Timezone Europe/Moscow does not exist in container, not updating container timezone.
05:50:49 FATAL  d/aci-builder/bin-run/main.go:27  Build failed                                
                       d/a/bin-run/builder.go:384 Failed to read treeStoreID from file         aci=aci-dummy path=/var/lib/rkt/pods/run/e65871e5-e852-47b0-8c82-b35b068df2a1/appsinfo/aci-dummy/treeStoreID
                                                  open /var/lib/rkt/pods/run/e65871e5-e852-47b0-8c82-b35b068df2a1/appsinfo/aci-dummy/treeStoreID: no such file or directory
05:50:49 FATAL        dgr/dgr/command-init.go:47  Init command failed                         
                         dgr/dgr/aci-build.go:75  Builder container return with failed status  aci=aci.example.com/aci-dummy:1
                 dgr/dgr/common/rkt-client.go:261 Run failed                                   config={Path: InsecureOptions:[ondisk image] dir: LocalConfig: SystemConfig: UserConfig: PullPolicy: TrustKeysFromHttps:false NoStore:false StoreOnly:false}
                                                  exit status 1

I tried to delete all files except aci-manifest.yml and to run sudo dgr clean build but it doesn't help.

What do I wrong?

n0rad commented 6 years ago

dgr requires rkt storage to be on an overlay compatible fs. While rkt can work without it, dgr is using it to identify what is installed in the current aci and not comming from dependencies.

this link can help : https://coreos.com/rkt/docs/latest/subcommands/prepare.html.

antage commented 6 years ago

Thanks for the clarification. It's unobvious.

n0rad commented 6 years ago

dgr is checking that overlayfs is available but do not check if rkt is on a compatible fs. looking at your log, we can improve the error message : #260

antage commented 6 years ago

After I formatted /var/lib/rkt partition with mkfs.xfs -n ftype=1 the problem has gone.