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

--pull-policy="new" is not the default policy #3579

Open
n0rad opened this issue Feb 6, 2017 · 2 comments
Open

--pull-policy="new" is not the default policy #3579

n0rad opened this issue Feb 6, 2017 · 2 comments

Comments

@n0rad
Copy link

n0rad commented Feb 6, 2017

Environment

rkt Version: 1.24.0
appc Version: 0.8.10
Go Version: go1.7.3
Go OS/Arch: linux/amd64
Features: -TPM +SDJOURNAL
--
Linux 4.9.6-1-ARCH x86_64
--
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
ID_LIKE=archlinux
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
--
systemd 231
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN

What did you do?

rkt run --help tells that pull-policy is default value is new but setting it explicitly is acting differently.

I'm fetching an aci file that have explicit dependencies (with version label) that I previously fetched.

When I run rkt fetch without the pull-policy, it fail because rkt is fetching image remotly, but the domain name I use do not exists.

When I run the fetch with --pull-policy="new" it's working.

What did you expect to see?

New is the default policy.

dgr is broken because of this change.

@cgonyeo
Copy link
Member

cgonyeo commented Feb 7, 2017

I added in the following line to rkt/run.go right after it finishes handling the legacy --no-store and --store-only flags:

stderr.Print("the current pull policy is: " + flagPullPolicy)

I then ran a couple rkt run commands, and saw the following output:

derek@proton ~/go/src/github.com/coreos/rkt> sudo ./build-rkt-1.23.0/target/bin/rkt run quay.io/dgonyeo/1                     
run: the current pull policy is: new
^C
derek@proton 130 ~/go/src/github.com/coreos/rkt> sudo ./build-rkt-1.23.0/target/bin/rkt run quay.io/dgonyeo/1 --pull-policy=new   
run: the current pull policy is: new
^C

What behavior are you observing when you don't pass the --pull-policy=new flag? It's failing to fetch some of the image's dependencies? Would you be able to share the output from this failed run command?

@n0rad
Copy link
Author

n0rad commented Feb 7, 2017

n0rad@n0 aci-nginx-alpn-h2 ▶ rkt --debug --insecure-options=http,tls,image,ondisk fetch --full /home/n0rad/Work/blablacar/docker/build-tools/aci/aci-nginx-alpn-h2/target/stage1/image.aci                                                                     (master ᄉ origin)
image: using image from file /home/n0rad/Work/blablacar/docker/build-tools/aci/aci-nginx-alpn-h2/target/stage1/image.aci
image: searching for app image aci.blabla.car/aci-nginx-builder
image: meta tag 'ac-discovery' not found on aci.blabla.car/aci-nginx-builder
  └─Get http://aci.blabla.car/aci-nginx-builder?ac-discovery=1: dial tcp: lookup aci.blabla.car: no such host
image: meta tag 'ac-discovery' not found on aci.blabla.car
  └─Get http://aci.blabla.car?ac-discovery=1: dial tcp: lookup aci.blabla.car: no such host
fetch:
  └─discovery failed for "aci.blabla.car/aci-nginx-builder"
    └─discovery failed
n0rad@n0 aci-nginx-alpn-h2 ▶ rkt --pull-policy="new" --debug --insecure-options=http,tls,image,ondisk fetch --full /home/n0rad/Work/blablacar/docker/build-tools/aci/aci-nginx-alpn-h2/target/stage1/image.aci                                                 (master ᄉ origin)
image: using image from file /home/n0rad/Work/blablacar/docker/build-tools/aci/aci-nginx-alpn-h2/target/stage1/image.aci
image: using image from local store for image name aci.blabla.car/aci-nginx-builder:25
image: using image from local store for image name blablacar.github.io/dgr/aci-builder:1
image: using image from local store for image name aci.blabla.car/aci-debian:8.6-4
image: using image from local store for image name aci.blabla.car/aci-common:5
image: using image from local store for image name aci.blabla.car/aci-resolvconf:2
sha512-726d9c3a4f1d3278611c792d6a5830b1caa85fd784506d8cd78e4bc6f0e67c28
n0rad@n0 aci-nginx-alpn-h2 ▶ cat /home/n0rad/Work/blablacar/docker/build-tools/aci/aci-nginx-alpn-h2/target/stage1/manifest                                                                                                                                    (master ᄉ origin)
{
  "acKind": "ImageManifest",
  "acVersion": "0.7.4",
  "name": "builder-stage1/aci.blabla.car/aci-nginx-alpn-h2",
  "labels": [
    {
      "name": "arch",
      "value": "amd64"
    },
    {
      "name": "os",
      "value": "linux"
    },
    {
      "name": "version",
      "value": "1"
    }
  ],
  "annotations": [
    {
      "name": "coreos.com/rkt/stage1/run",
      "value": "/dgr/builder/stage1/run"
    },
    {
      "name": "coreos.com/rkt/stage1/enter",
      "value": "/dgr/builder/stage1/enter"
    },
    {
      "name": "coreos.com/rkt/stage1/gc",
      "value": "/dgr/builder/stage1/gc"
    },
    {
      "name": "blablacar.github.io/dgr/stage1/build",
      "value": "/dgr/command/build"
    },
    {
      "name": "blablacar.github.io/dgr/stage1/init",
      "value": "/dgr/command/init"
    },
    {
      "name": "blablacar.github.io/dgr/stage1/try",
      "value": "/dgr/command/try"
    }
  ],
  "dependencies": [
    {
      "imageName": "aci.blabla.car/aci-nginx-builder",
      "labels": [
        {
          "name": "version",
          "value": "25"
        }
      ]
    },
    {
      "imageName": "blablacar.github.io/dgr/aci-builder",
      "labels": [
        {
          "name": "version",
          "value": "1"
        }
      ]
    }
  ]
}                                                                                                                                                                                                                                                                             

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

No branches or pull requests

2 participants