troykinsella / concourse-ansible-playbook-resource

A Concourse CI resource for running Ansible playbooks
MIT License
40 stars 19 forks source link

Move to Alpine broke the resource #15

Closed mvdkleijn closed 1 year ago

mvdkleijn commented 4 years ago

Hi,

Seems that the move from Ubuntu to Alpine broke the resource for me... from the looks of it due to a missing gcc.

Installing collected packages: munch, netifaces, pbr, os-service-types, iso8601, stevedore, keystoneauth1, decorator, jmespath, jsonpointer, jsonpatch, requestsexceptions, dogpile.cache, appdirs, openstacksdk, os-client-config, shade
    Running setup.py install for netifaces: started
    Running setup.py install for netifaces: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ie2zqkm2/netifaces/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ie2zqkm2/netifaces/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-_xvsoba_/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/netifaces
         cwd: /tmp/pip-install-ie2zqkm2/netifaces/
    Complete output (16 lines):
    running install
    running build
    running build_ext
    checking for getifaddrs...not found.
    checking for getnameinfo...not found.
    checking for socket IOCTLs...not found.
    checking for optional header files...none found.
    checking whether struct sockaddr has a length field...no.
    checking which sockaddr_xxx structs are defined...none!
    checking for routing socket support...no.
    checking for sysctl(CTL_NET...) support...no.
    checking for netlink support...no.
    building 'netifaces' extension
    gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -DNETIFACES_VERSION=0.10.9 -I/usr/include/python3.8 -c netifaces.c -o build/temp.linux-x86_64-3.8/netifaces.o
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
mamercad commented 3 years ago

I'm not seeing this, I just built the image from master a few minutes ago, this issue could probably be closed.

mvdkleijn commented 3 years ago

I'm not seeing this, I just built the image from master a few minutes ago, this issue could probably be closed.

@mamercad You mean you've got this working with a use case where the netifaces extension (or another one use gcc) is being built?

mamercad commented 3 years ago

I'm not seeing this, I just built the image from master a few minutes ago, this issue could probably be closed.

@mamercad You mean you've got this working with a use case where the netifaces extension (or another one use gcc) is being built?

I'm afraid that I don't understand the question, could you show some output of what you're seeing? For good measure, I went ahead and built the image again a short while ago.

❯ git diff upstream/master
❯ docker images | head -2
REPOSITORY                  TAG       IMAGE ID       CREATED          SIZE
<none>                      <none>    bc6c3ccb471d   26 minutes ago   634MB
mamercad commented 3 years ago

I'm not seeing this, I just built the image from master a few minutes ago, this issue could probably be closed.

@mamercad You mean you've got this working with a use case where the netifaces extension (or another one use gcc) is being built?

I'm afraid that I don't understand the question, could you show some output of what you're seeing? For good measure, I went ahead and built the image again a short while ago.

❯ git diff upstream/master
❯ docker images | head -2
REPOSITORY                  TAG       IMAGE ID       CREATED          SIZE
<none>                      <none>    bc6c3ccb471d   26 minutes ago   634MB

Or, let me rephrase. What I'm running is docker build . as stated in the README.md -- how are you building the image?

mvdkleijn commented 3 years ago

@mamercad I'm not building the image. I'm using the prebuilt image from Docker Hub. The error occurs when trying to use the ansible-playbook-resource in a Concourse pipeline to execute a playbook.

The output I placed in the original issue description is the output I'm seeing when using the resource in my Concourse pipeline.

Admittedly, I didn't try a recent version of this resource. Certainly not after you added the Rust dependency. Perhaps that fixes things. I can try again after the weekend.

troykinsella commented 3 years ago

Thanks for the contributions, everyone. @mvdkleijn Can you provide some more context on your use case, please? Is that the full output? Is this upon doing a put? What does your pipeline yaml look like? I'm theorizing that you're using setup_commands to install additional packages on which your playbook depends. Is that right?

mvdkleijn commented 1 year ago

No longer using this resource, closing.