Closed elihunter173 closed 5 years ago
until yesterday seems like base image drift.
2) Why would you need become:yes in container ?
That was my guess, but I haven't been able to figure out a fix to it.
I don't need it in the container, but that role manages the installation of common software dependencies on both containers and actual machines. Since it's necessary on the real machines and doesn't cause any issues (that I know of) on the container, it's included to allow reuse.
It's a xenial docker image problem. Depend on the package you install he asks to upgrade libc and crashes. Same container and role work fine with bionic.
until yesterday seems like base image drift.
- Why would you need become:yes in container ?
I need "become: yes" when we use images that starts as sudoer and not as root.
fatal: [adlc]: FAILED! => { "failed": true, "msg": "failed to transfer file /tmp/tmpe4dWqX to /root/.ansible/tmp/ansible-tmp-1551389914.05-37269423617846/apt.py:\n\nSegmentation fault (core dumped)\n" }
We had the same problem and our workarround is to use a pinned version of the base image. The latest version (ubuntu:xenial-20190222) produces the segmentation fault, but the version before (xenial-20190122) works as expected.
So in your case use:
services:
adlc:
from: ubuntu:xenial-20190122
@matteotanca Switching to bionic complains about permission failure. I'm not sure why this is the case or how to easily fix that.
TASK [Gathering Facts] *********************************************************
fatal: [adlc]: UNREACHABLE! => {"changed": false, "msg": "Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote temp path in ansible.cfg to a path rooted in \"/tmp\". Failed command was: ( umask 77 && mkdir -p \"` echo ~/.ansible/tmp/ansible-tmp-1552748664.15-17311126964067 `\" && echo ansible-tmp-1552748664.15-17311126964067=\"` echo ~/.ansible/tmp/ansible-tmp-1552748664.15-17311126964067 `\" ), exited with result 1", "unreachable": true}
@janwittmer Sadly switching to ubuntu:xenial-20190122
doesn't seem to work in my case. It had the same error as did xenial-20181218
and xenial-20181113
.
This makes me think it might not be base image drift, but I don't know what else it would be.
@elihunter173 I just noticed you use Ansible Container in version 0.9.2. We use version 0.9.3rc0 by Running from Source, maybe you could give that a try.
Debug build of develop branch state is provided as sa-ansible-container
( https://pypi.org/project/sa-ansible-container/ )
After trying ubuntu:xenial-20190122
and ubuntu:xenial-20181218
on Ansible Container 0.9.3rc0 by installing sa-ansible-container
from PyPI and by installing from source, I run into the same error.
Pulled newer image for ubuntu:16.04 and confirming - yes, issue has appeared :(
I tried to use a dockerfile to upgrade the ubuntu:16.04 image and save it as ubuntu:matteo. But when I use it in my container.yml, I got this error :
failed to transfer file /tmp/tmpv7jboR to /root/.ansible/tmp/ansible-tmp-1552840023.29-67207851537243/setup.py:\n\nSegmentation fault (core dumped)
However I'm able to use that image with docker or docker-compose without problems.
Maybe we need to build a custom conductor too based on an upgraded xenial image like "ubuntu:matteo"?
Can you help me find out a docker file to build the ansible/container-conductor-ubuntu-xenial:0.9.3rc3 image?
Should be fixed by https://github.com/ansible/ansible-container/pull/977
At least my play do pass now https://github.com/softasap/sa-container-bootstrap/blob/develop/box-example/ubuntu-xenial/container.yml#L4
I've pushed updated sa-ansible-container 0.9.3rc4 to pypi.
Once build pipeline will finish for ansible develop branch, we should find conductor images from ansible docker hub too.
Unfortunately we've lost amazon linux from matrix, will look at it separately.
@matteotanca to rebuild conductor images, there is bakery.py script
python bakery.py You can rebuild specific conductor image
python bakery.py --distros=ubuntu alternative syntax
BASE_DISTRO=ubuntu python bakery.py If you are building custom conductor images for your organization, you might use
CONDUCTOR_PROVIDER=
I have added several articles to wiki with ideas.
Conductor images for ansible now should be updated. Please check and report if it resolved your issue.
fatal: [base]: UNREACHABLE! => {
"changed": false,
"msg": "Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote temp path in ansible.cfg to a path rooted in \"/tmp\". Failed command was: ( umask 77 && mkdir -p \"echo ~/.ansible/tmp/ansible-tmp-1552860831.55-217415933356218
\" && echo ansible-tmp-1552860831.55-217415933356218=\"echo ~/.ansible/tmp/ansible-tmp-1552860831.55-217415933356218
\" ), exited with result 1, stderr output: Error response from daemon: Container 29ee88b370e2a88a6df7d502faf92b1005cde7088bb0828c31894a94cc74885a is not running\n",
"unreachable": true
}
This happens after updating to sa-ansible-container==0.9.3rc4, only with xenial.
I'm so sorry, it works fine with the softasap xenial conductor. Thanks, I can upgrade my xenial projects now.
@matteotanca I just tried, and it now (when build for ansible develop finished, and conductor images were pushed) works fine with official ansible conductor images.
Official ansible conductor images are recommended over custom one.
Can you try that, if succeeded - I will close the issue.
I confirm that it works with the ansible official conductors too. Thank you!!
ISSUE TYPE
container.yml
OS / ENVIRONMENT
SUMMARY
STEPS TO REPRODUCE
Run the given
container.yml
using the below command (--debug
is optional) with the following task incommon
.Command:
Task:
EXPECTED RESULTS
The given apt packages install and update appropriately. This occurred properly until yesterday despite no changes being done to the task and it still working with
ansible-playbook
.ACTUAL RESULTS
Upon reaching the task [common : Install standard build tools], the program quickly crashes with a segmentation fault.