Open zvonkok opened 6 years ago
version: "2" settings: conductor: base: centos:7 project_name: fetch services: fetch-test: from: centos:7 roles: - fetch registries: {}
--- - name: fetch something from the container fetch: src: /etc/hosts dest: /tmp/fetched fail_on_missing: yes
Ansible Container, version 0.9.3rc0 Linux, ip-172-31-24-132.eu-central-1.compute.internal, 3.10.0-855.el7.x86_64, #1 SMP Tue Feb 20 06:46:45 EST 2018, x86_64 2.7.5 (default, Feb 9 2018, 09:51:13) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] /usr/bin/python2 { "ContainersPaused": 0, "Labels": null, "DefaultRuntime": "docker-runc", "CgroupDriver": "systemd", "ClusterAdvertise": "", "ContainersRunning": 0, "NGoroutines": 33, "Swarm": { "Managers": 0, "ControlAvailable": false, "NodeID": "", "Cluster": { "Spec": { "Raft": {}, "CAConfig": {}, "Dispatcher": {}, "Orchestration": {}, "TaskDefaults": {} }, "Version": {}, "ID": "", "CreatedAt": "0001-01-01T00:00:00Z", "UpdatedAt": "0001-01-01T00:00:00Z" }, "Nodes": 0, "Error": "", "RemoteManagers": null, "LocalNodeState": "inactive", "NodeAddr": "" }, "LoggingDriver": "json-file", "OSType": "linux", "HttpProxy": "", "Runtimes": { "runc": { "path": "docker-runc" }, "docker-runc": { "path": "/usr/libexec/docker/docker-runc-current" } }, "DriverStatus": [ [ "Backing Filesystem", "xfs" ], [ "Native Overlay Diff", "true" ] ], "OperatingSystem": "Red Hat Enterprise Linux Server 7.4 (Maipo)", "Containers": 46, "HttpsProxy": "", "BridgeNfIp6tables": true, "MemTotal": 128670912512, "Driver": "overlay2", "IndexServerAddress": "https://registry.reg-aws.openshift.com/v1/", "ClusterStore": "", "ExecutionDriver": "", "Registries": [ { "Name": "registry.reg-aws.openshift.com", "Secure": false }, { "Name": "brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888", "Secure": false }, { "Name": "registry.access.redhat.com", "Secure": true }, { "Name": "registry.access.redhat.com", "Secure": true }, { "Name": "docker.io", "Secure": true } ], "SystemStatus": null, "OomKillDisable": true, "PkgVersion": "docker-1.12.6-71.git3e8e77d.el7.x86_64", "SystemTime": "2018-02-28T10:07:34.212481336Z", "Name": "ip-172-31-24-132.eu-central-1.compute.internal", "CPUSet": true, "RegistryConfig": { "InsecureRegistryCIDRs": [ "127.0.0.0/8" ], "IndexConfigs": { "registry.access.redhat.com": { "Official": false, "Name": "registry.access.redhat.com", "Secure": true, "Mirrors": [] }, "registry.reg-aws.openshift.com": { "Official": false, "Name": "registry.reg-aws.openshift.com", "Secure": false, "Mirrors": [] }, "docker.io": { "Official": true, "Name": "docker.io", "Secure": true, "Mirrors": null }, "brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888": { "Official": false, "Name": "brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888", "Secure": false, "Mirrors": [] } }, "Mirrors": null }, "SecurityOptions": [ "seccomp", "selinux" ], "ContainersStopped": 46, "NCPU": 16, "NFd": 22, "Architecture": "x86_64", "KernelMemory": true, "CpuCfsQuota": true, "Debug": false, "IndexServerName": "registry.reg-aws.openshift.com", "ID": "ORSW:M4NM:S62A:YYET:OZFD:XMUC:DIV6:DCR6:ZXKA:WBD7:GLQD:XZJO", "IPv4Forwarding": true, "KernelVersion": "3.10.0-855.el7.x86_64", "BridgeNfIptables": true, "NoProxy": "", "LiveRestoreEnabled": false, "ServerVersion": "1.12.6", "CpuCfsPeriod": true, "ExperimentalBuild": false, "MemoryLimit": true, "SwapLimit": true, "Plugins": { "Volume": [ "local" ], "Network": [ "null", "bridge", "host", "overlay" ], "Authorization": [ "rhel-push-plugin" ] }, "Images": 244, "DockerRootDir": "/var/lib/docker", "NEventsListener": 0, "CPUShares": true } { "KernelVersion": "3.10.0-855.el7.x86_64", "PkgVersion": "docker-1.12.6-71.git3e8e77d.el7.x86_64", "Os": "linux", "BuildTime": "2017-12-13T12:18:58.588069120-05:00", "ApiVersion": "1.24", "Version": "1.12.6", "GitCommit": "3e8e77d/1.12.6", "Arch": "amd64", "GoVersion": "go1.8.3" }
I'm trying to fetch a file during the build phase from the container. The verbose output shows me that it worked and fetched to the right destination, but the file is not on the host.
<207d8d07bf26d032409dfb2f92d2772e7a409d099f975165c7b2012911575c62> FETCH /etc/hosts TO /tmp/fetched/fetch-test/etc/hosts changed: [fetch-test] => { "changed": true, "checksum": "f5f8ddcf6f7dc99cede3f2dc7cc141076bfc297e", "dest": "/tmp/fetched/fetch-test/etc/hosts", "md5sum": "45dd1fe9d65ed24310cd61d4868b310a", "remote_checksum": "f5f8ddcf6f7dc99cede3f2dc7cc141076bfc297e", "remote_md5sum": null }
# atomic-container build -- -vvvv
# ls /tmp/fetched/fetch-test/etc/hosts /tmp/fetched/fetch-test/etc/hosts
# ls /tmp/fetched/fetch-test/etc/hosts ls: cannot access /tmp/fetched/fetch-test/etc/hosts: No such file or directory
ISSUE TYPE
container.yml
roles/fetch/tasks/main.yml
OS / ENVIRONMENT
SUMMARY
I'm trying to fetch a file during the build phase from the container. The verbose output shows me that it worked and fetched to the right destination, but the file is not on the host.
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS