Issue with Erlang and Circle 2.0's use of userns


#1

Hey everyone,

I am attempting to update the CircleCI config for the open source project Kazoo (https://github.com/2600hz/kazoo/) and running into an issue. Right now the project is using the autogenerated 2.0 config file which includes using the image circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37.

Kazoo is an erlang project and right now it uses an application called kerl to manage which version of erlang is installed. I had hopped to update this to use the erlang image and a specific versions tag. However when I do that I run into a permissions issue that seems to be related to userns.

Here is the error I am getting:

make[3]: Entering directory '/root/2600hz/kazoo/deps/rabbit_common'
make[3]: elixir: Command not found
 DEP    jsx
 DEP    ranch
 DEP    ranch_proxy_protocol
tar: README.md: Cannot change ownership to uid 717844908, gid 0: Invalid argument
tar: rebar.config: Cannot change ownership to uid 717844908, gid 0: Invalid argument
tar: rebar.lock: Cannot change ownership to uid 717844908, gid 0: Invalid argument
tar: src/ranch_proxy.erl: Cannot change ownership to uid 717844908, gid 0: Invalid argument
tar: src/ranch_proxy.hrl: Cannot change ownership to uid 717844908, gid 0: Invalid argument
tar: src/ranch_proxy_encoder.erl: Cannot change ownership to uid 717844908, gid 0: Invalid argument
tar: src/ranch_proxy_protocol.erl: Cannot change ownership to uid 717844908, gid 0: Invalid argument
tar: src/ranch_proxy_ssl.erl: Cannot change ownership to uid 717844908, gid 0: Invalid argument
tar: Exiting with failure status due to previous errors
/root/2600hz/kazoo/erlang.mk:4862: recipe for target '/root/2600hz/kazoo/deps/ranch_proxy_protocol' failed
make[3]: *** [/root/2600hz/kazoo/deps/ranch_proxy_protocol] Error 2
make[3]: Leaving directory '/root/2600hz/kazoo/deps/rabbit_common'
/root/2600hz/kazoo/erlang.mk:4337: recipe for target 'deps' failed
make[2]: *** [deps] Error 2
make[2]: Leaving directory '/root/2600hz/kazoo/deps/amqp_client'
../erlang.mk:4337: recipe for target 'deps' failed
make[1]: *** [deps] Error 2
make[1]: Leaving directory '/root/2600hz/kazoo/deps'
Makefile:66: recipe for target 'deps' failed
make: *** [deps] Error 2
Exited with code 2

This is happening during the make process when erlang is downloading and extracting a tar file for the ranch_proxy_protocol dependency. As far as I can tell this issue is similar to this: https://github.com/circleci/circleci-docs/blob/master/jekyll/_cci2/high-uid-error.md

Whats odd is this issue doesn’t come up when using the circleci docker image, circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37. No matter what other image I try and use though I run into this permissions issue.

Since I obviously don’t have control over all of the dependencies and getting control of them is not really feasible, I was wondering what it is about that ubuntu image that makes it work. I don’t mind making a custom image, but I just need to know whats going on so I can replicate it.

Has anyone else run into something similar? Any suggestions?

There are a lot of benefits we get if we can move away from that ubuntu image, so any and all help is greatly appreciated.


#2

You could try running in a Machine executor instead of a Docker one:

https://circleci.com/docs/2.0/executor-types/#using-machine

Incidentally, your Circle config could do with a bit of tidying up. Once you have understood what each section does, I’d strip out the converter script comments, and merge related run lines together in a multi-line block.


#3

I am in the process of trying to tidy it up and ran into this issue. After some more experimentation it appears any docker image based on Ubuntu works, but ones based on Debian or CentOS don’t… I hate life.


#4

If it helps any, I’m trying to deal with IT recruiters at present, so I’ve got you beat :stuck_out_tongue_winking_eye:


#5

You poor soul. Thanks for your help. :slight_smile:


#6

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.