Giter VIP home page Giter VIP logo

Comments (10)

smarterclayton avatar smarterclayton commented on July 2, 2024

Where does hostconfig go in 1.12?

from imagebuilder.

jawnsy avatar jawnsy commented on July 2, 2024

@smarterclayton from talking to @runcom, I think the problem is that HostConfig is part of image creation but not running, or something like that. I can reproduce the problem with imagebuilder on rawhide, so will see if I can fix it.

from imagebuilder.

runcom avatar runcom commented on July 2, 2024

@smarterclayton @jawnsy the HostConfig must be set at container create (docker create) as opposed to set it at container start (docker start). This has been a deprecated feature introduced in docker 1.12.x. Let me know if you need any other help on this.

from imagebuilder.

jawnsy avatar jawnsy commented on July 2, 2024

Just adding context... From the release notes: POST /containers/(id or name)/start no longer accepts a HostConfig.

from imagebuilder.

smarterclayton avatar smarterclayton commented on July 2, 2024

As discussed on IRC with @jawnsy and @mrunalp we can do the following:

  1. Create a new container that has the "fat" volume mounted that we docker cp into.
  2. Delete the container
  3. Bind mount from the volume into our new container for each individual bind.

We can probably reuse the same image that we'll be launching since it's guaranteed to be local and we won't be starting the container, just copying into it.

from imagebuilder.

smarterclayton avatar smarterclayton commented on July 2, 2024

Added a PR, please try it out and see if it works for you (can't get docker-latest running currently because of an older system)

from imagebuilder.

jawnsy avatar jawnsy commented on July 2, 2024

@smarterclayton Thanks for fixing this!

docker engine information

$ sudo dnf list --installed docker
docker.x86_64                                                           2:1.12.1-13.git9a3752d.fc25

$ docker version
Client:
 Version:         1.12.1
 API version:     1.24
 Package version: docker-1.12.1-13.git9a3752d.fc25.x86_64
 Go version:      go1.7.1
 Git commit:      9a3752d/1.12.1
 Built:           
 OS/Arch:         linux/amd64

Server:
 Version:         1.12.1
 API version:     1.24
 Package version: docker-1.12.1-13.git9a3752d.fc25.x86_64
 Go version:      go1.7.1
 Git commit:      9a3752d/1.12.1
 Built:           
 OS/Arch:         linux/amd64

$ docker info
Containers: 3
 Running: 1
 Paused: 0
 Stopped: 2
Images: 75
Server Version: 1.12.1
Storage Driver: overlay
 Backing Filesystem: xfs
Logging Driver: journald
Cgroup Driver: systemd
Plugins:
 Volume: local
 Network: host overlay bridge null
Swarm: inactive
Runtimes: runc oci
Default Runtime: oci
Security Options: seccomp
Kernel Version: 4.8.1-1.fc25.x86_64
Operating System: Fedora 25 (Twenty Five)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 2
CPUs: 2
Total Memory: 1.797 GiB
Name: limelight
ID: 34RW:RSXM:DEXS:EIS6:SV2U:7TDS:A2XY:RYBY:Q3UN:Z4CA:R6CR:IACW
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
 127.0.0.0/8
Registries: docker.io (secure)

Built the imagebuilder using:

$ git remote add smarterclayton https://github.com/smarterclayton/imagebuilder
$ git checkout smarterclayton/mount_secret
$ export GOPATH=~/projects/imagebuilder
$ go install -v github.com/openshift/imagebuilder/cmd/imagebuilder

Manually built the origin/openvswitch image:

$ imagebuilder ~/projects/origin/images/openvswitch openvswitch
<build output>
--> Committing changes to openvswitch ...
--> Done

Using the embedded imagebuilder (which doesn't include this change), reproducing the problem:

$ ~/projects/origin/_output/local/bin/linux/amd64/oc ex dockerbuild ~/projects/origin/images/openvswitch openvswitch
--> FROM openshift/origin-base
error: unable to start build container: API error (400): {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}

So this change appears to have fixed it 😄 👍 🎉

from imagebuilder.

jawnsy avatar jawnsy commented on July 2, 2024

Unfortunately, the conformance tests are failing with 1.12. This requires further investigation, though at least it seems like a step in the right direction.

$ go test -v github.com/openshift/imagebuilder/dockerclient/  -tags conformance
=== RUN   TestConformanceInternal
--- PASS: TestConformanceInternal (28.46s)
=== RUN   TestConformanceExternal
--- PASS: TestConformanceExternal (485.71s)
    conformance_test.go:299: WARNING: opt/app-root/src/.gem/ruby/gems/json-1.8.3/ext/json/ext/parser/Makefile differs only in size by -2 bytes, probably a timestamp value change
    conformance_test.go:299: WARNING: opt/app-root/src/.gem/ruby/extensions/x86_64-linux/json-1.8.3/gem_make.out differs only in size by -1 bytes, probably a timestamp value change
    conformance_test.go:299: WARNING: opt/app-root/src/.gem/ruby/gems/json-1.8.3/ext/json/ext/generator/Makefile differs only in size by -2 bytes, probably a timestamp value change
    conformance_test.go:299: WARNING: etc/ssl/private/ssl-cert-snakeoil.key differs only in size by 4 bytes, probably a timestamp value change
=== RUN   TestTransientMount
--- FAIL: TestTransientMount (1.25s)
    conformance_test.go:167: unable to build image: running '/bin/sh -c ls /mountdir/subdir' failed with exit code 1
=== RUN   TestCalcCopyInfo
--- PASS: TestCalcCopyInfo (0.00s)
FAIL
exit status 1
FAIL    github.com/openshift/imagebuilder/dockerclient  515.426s

from imagebuilder.

maxamillion avatar maxamillion commented on July 2, 2024

@smarterclayton ping

I'm still seeing this issue with oc cluster up with origin:v1.5.0 docker image.

$ oc cluster up
-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ... OK
-- Checking for existing OpenShift container ... OK
-- Checking for openshift/origin:v1.5.0 image ... OK
-- Checking Docker daemon configuration ... OK
-- Checking for available ports ... OK
-- Checking type of volume mount ...
   Using nsenter mounter for OpenShift volumes
-- Creating host directories ... OK
-- Finding server IP ...
   Using 192.168.122.50 as the server IP
-- Starting OpenShift container ...
   Creating initial OpenShift configuration
   Starting OpenShift using container 'origin'
   Waiting for API server to start listening
   OpenShift server started
-- Adding default OAuthClient redirect URIs ... OK
-- Installing registry ... OK
-- Installing router ... OK
-- Importing image streams ... OK
-- Importing templates ... OK
-- Login to server ... OK
-- Creating initial project "myproject" ... OK
-- Removing temporary directory ... OK
-- Checking container networking ... OK
-- Server Information ...
   OpenShift server started.
   The server is accessible via web console at:
       https://192.168.122.50:8443

   You are logged in as:
       User:     developer
       Password: developer

   To login as administrator:
       oc login -u system:admin

$ oc login -u system:admin
Logged into "https://192.168.122.50:8443" as "system:admin" using existing credentials.

You have access to the following projects and can switch between them with 'oc project <projectname>':

    default
    kube-system
  * myproject
    openshift
    openshift-infra

Using project "myproject".

$ oc ex dockerbuild buildroot/ buildroot:latest
--> FROM centos:7
error: unable to start build container: API error (400): {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}

from imagebuilder.

smarterclayton avatar smarterclayton commented on July 2, 2024

from imagebuilder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.