Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

error setting up stage0 #2180

Closed
Closed

Description

@crawford

I started a container and then killed it (SIGINT) while rkt was still loading it from the CAS. When I went to run it again, it failed to run, complaining run: error setting up stage0: open ...: no such file or directory.

core@apollo ~ $ rkt version
rkt Version: 1.0.0
appc Version: 0.7.4
Go Version: go1.4.3
Go OS/Arch: linux/amd64
Features: -TPM
$ rkt list
UUID    APP     IMAGE NAME      STATE   CREATED STARTED NETWORKS
core@apollo ~ $ rkt image list
ID                      NAME                                    IMPORT TIME     LAST USED       SIZE    LATEST
sha512-0472a487bcbd     coreos.com/rkt/stage1-coreos:1.0.0      4 days ago      4 days ago      134MiB  false
sha512-ee20d692cda7     strongswan                              4 days ago      4 days ago      565MiB  false
core@apollo ~ $ sudo rkt run strongswan --interactive
image: using image from local store for image name coreos.com/rkt/stage1-coreos:1.0.0
image: using image from local store for image name strongswan
^C

Woops, I forgot to override the exec flag.

core@apollo ~ $ sudo rkt run strongswan --interactive --exec /bin/bash
image: using image from local store for image name coreos.com/rkt/stage1-coreos:1.0.0
image: using image from local store for image name strongswan
run: error setting up stage0: open /var/lib/rkt/cas/tree/deps-sha512-8f4a912ea544495e0d920bbef506fac877ac0c9d22416373993485d5ad935fe6/image: no such file or directory

Here is what that directory looks like:

apollo ~ # ls /var/lib/rkt/cas/tree/deps-sha512-8f4a912ea544495e0d920bbef506fac877ac0c9d22416373993485d5ad935fe6
manifest  rootfs

The manifest looks good:

apollo ~ # cat /var/lib/rkt/cas/tree/deps-sha512-8f4a912ea544495e0d920bbef506fac877ac0c9d22416373993485d5ad935fe6/manifest 
{"acKind":"ImageManifest","acVersion":"0.7.1+git","name":"strongswan","labels":[{"name":"arch","value":"amd64"},{"name":"os","value":"linux"}],"app":{"exec":["/usr/sbin/ipsec","start","--nofork","--debug"],"user":"0","group":"0"}}

And the rootfs directory looks fine (I won't include the contents here).

The directory for the stage0 look fine:

apollo ~ # ls /var/lib/rkt/cas/tree/deps-sha512-b42939d872a0645a4dcf08e33b2b99c444f2188225d0bc8290073df498a64b3c/
hash  image  manifest  rendered  rootfs

And its manifest:

apollo ~ # cat /var/lib/rkt/cas/tree/deps-sha512-b42939d872a0645a4dcf08e33b2b99c444f2188225d0bc8290073df498a64b3c/manifest 
{"acKind":"ImageManifest","acVersion":"0.7.4","name":"coreos.com/rkt/stage1-coreos","labels":[{"name":"version","value":"1.0.0"},{"name":"arch","value":"amd64"},{"name":"os","value":"linux"}],"annotations":[{"name":"coreos.com/rkt/stage1/run","value":"/init"},{"name":"coreos.com/rkt/stage1/enter","value":"/enter"},{"name":"coreos.com/rkt/stage1/gc","value":"/gc"}]}

Activity

  1. added this to the v1.1.0 milestone on Feb 16, 2016
  2. alban commented on Feb 16, 2016

    @alban
    Member

    I can reproduce the bug more easily by deleting:

    /var/lib/rkt/cas/tree/*/{image,rendered}
    

    Then, I cannot start the image again.

    $ sudo rkt run --debug --insecure-options=image --interactive docker://debian
    image: using image from file /usr/bin/stage1-coreos.aci
    image: remote fetching from URL "docker://debian"
    image: fetching image from docker://debian
    Downloading sha256:03e1855d4f3: [==============================] 51.4 MB/51.4 MB
    Downloading sha256:a3ed95caeb0: [==============================] 32 B/32 B
    stage0: Preparing stage1
    run: error setting up stage0
      └─error preparing stage1
        └─error rendering tree image
          └─cannot read image file
            └─open /var/lib/rkt/cas/tree/deps-sha512-854e6556bb4f11581869e58503ac8fd2e096dbb01654a8724884903d9e771cae/image: no such file or directory
    

    And I also cannot GC the images:

    $ sudo rkt --debug  image gc --grace-period=0
    gc: failed to remove unreferenced treestores
      └─cannot get referenced treestoreIDs
        └─cannot get stage1 treestoreID for pod 2351f7c7-68c0-4412-9464-c064651d7710
          └─no such file or directory
    
  3. modified the milestones: v1.2.0, v1.1.0 on Feb 25, 2016
  4. alban commented on Mar 7, 2016

    @alban
    Member

    @iaguis #2242 fixed the "image gc" issue but it didn't fix everything here, did it?

  5. reopened this on Mar 7, 2016
  6. f0 commented on Mar 17, 2016

    @f0

    @iaguis is there a workaround for this? I am getting this error with rkt 1.1

  7. iaguis commented on Mar 17, 2016

    @iaguis
    Member

    @f0 After #2258, if you get this error you should be able to re-run the image, the treestore will rebuild itself, and everything should work.

  8. f0 commented on Mar 17, 2016

    @f0

    @iaguis ok and this will land in 1.2? and when will 1.2 released?

  9. iaguis commented on Mar 17, 2016

    @iaguis
    Member

    @f0 yes. It wll be released this week.

  10. f0 commented on Mar 17, 2016

    @f0

    @iaguis ok thank you

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions