EmergingTechnologyInstitute / acmeair-netflixoss-dockerlocal

acmeair-netflixoss-dockerlocal
Apache License 2.0
33 stars 11 forks source link

microscaler container build failing #12

Open alexandreibm opened 10 years ago

alexandreibm commented 10 years ago

microscaler contanier is not being able to be built after oct/13. It seems that some gems are failing when installing ruby. I see this errors after trying to build the container:

Sending build context to Docker daemon 5.632 kB Sending build context to Docker daemon Step 0 : FROM acmeair/base ---> 29ccdb985285 Step 1 : RUN cd /usr/local && wget -qO- https://github.com/EmergingTechnologyInstitute/microscaler/tarball/master | tar xzf - -C /tmp && mv /tmp/EmergingTechnologyInstitute-microscaler-/microscaler-agent /usr/local && rm -Rf /tmp/EmergingTechnologyInstitute-microscaler- && cd microscaler-agent && mkdir /.bundle && echo --- >> /.bundle/config && echo 'BUNDLE_BUILD__EVENTMACHINE: --with-cflags="-O2 -pipe -march=native -w" ' >> /.bundle/config && echo 'BUNDLE_BUILD__THIN: --with-cflags="-O2 -pipe -march=native -w" ' >> /.bundle/config && bundle install && chmod a+x lib/docker_agent.rb && chmod a+x lib/rest_client.rb ---> Running in e83520c30224 Fetching gem metadata from https://rubygems.org/............ Resolving dependencies... Installing daemons (1.1.9) Installing eventmachine (0.12.10) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9.1 extconf.rb

checking for rb_trap_immediate in ruby.h,rubysig.h... no checking for rb_thread_blocking_region()... yes checking for inotify_init() in sys/inotify.h... yes checking for writev() in sys/uio.h... yes checking for rb_thread_check_ints()... yes checking for rb_time_new()... yes checking for sys/event.h... no checking for epoll_create() in sys/epoll.h... yes checking for main() in -lcrypto... no creating Makefile

make compiling pipe.cpp compiling emwin.cpp compiling em.cpp In file included from project.h:138:0, from em.cpp:24: em.cpp: In member function 'bool EventMachine_t::_RunEpollOnce()':

em.h:35:20: warning: 'int rb_thread_select(int, fdset, fdset, fdset, timeval_)' is deprecated (declared at /usr/include/ruby-1.9.1/ruby/intern.h:390) [-Wdeprecated-declarations]

define EmSelect rb_thread_select

^ em.cpp:501:3: note: in expansion of macro 'EmSelect' EmSelect (0, NULL, NULL, NULL, &tv); ^ em.cpp:501:37: warning: 'int rb_thread_select(int, fdset, fdset, fdset, timeval_)' is deprecated (declared at /usr/include/ruby-1.9.1/ruby/intern.h:390) [-Wdeprecated-declarations] EmSelect (0, NULL, NULL, NULL, &tv); ^ em.cpp:556:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=0; i < Descriptors.size(); i++) { ^ In file included from project.h:138:0, from em.cpp:24: em.cpp: In member function 'bool EventMachine_t::_RunSelectOnce()': em.h:35:20: warning: 'int rb_thread_select(int, fdset, fdset, fdset, timeval_)' is deprecated (declared at /usr/include/ruby-1.9.1/ruby/intern.h:390) [-Wdeprecated-declarations]

define EmSelect rb_thread_select

^ em.cpp:873:4: note: in expansion of macro 'EmSelect' EmSelect (0, NULL, NULL, NULL, &tv); ^ em.cpp:873:38: warning: 'int rb_thread_select(int, fdset, fdset, fdset, timeval_)' is deprecated (declared at /usr/include/ruby-1.9.1/ruby/intern.h:390) [-Wdeprecated-declarations] EmSelect (0, NULL, NULL, NULL, &tv); em.cpp: In member function 'void EventMachine_t::_ReadLoopBreaker()': em.cpp:924:52: warning: converting to non-pointer type 'long unsigned int' from NULL -Wconversion-null(NULL, EM_LOOPBREAK_SIGNAL, "", 0); ^ em.cpp: In member function 'bool EventMachine_t::_RunTimers()': em.cpp:948:72: warning: converting to non-pointer type 'long unsigned int' from NULL -Wconversion-null (NULL, EM_TIMER_FIRED, NULL, i->second.GetBinding()); ^ em.cpp: In member function 'const long unsigned int EventMachinet::ConnectToServer(const char, int, const char_, int)': em.cpp:1089:22: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] unsigned long out = NULL; ^ em.cpp: In member function 'const long unsigned int EventMachinet::ConnectToUnixServer(const char)': em.cpp:1218:22: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] unsigned long out = NULL; ^ em.cpp:1221:10: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp:1237:10: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp:1243:10: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp:1249:10: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp: In member function 'const long unsigned int EventMachinet::CreateTcpServer(const char, int)': em.cpp:1453:10: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp:1455:33: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] unsigned long output_binding = NULL; ^ em.cpp:1535:9: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp: In member function 'const long unsigned int EventMachinet::OpenDatagramSocket(const char, int)': em.cpp:1545:33: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] unsigned long output_binding = NULL; ^ em.cpp:1596:9: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp: In member function 'const long unsigned int EventMachine_t::OpenFileForWriting(const char)': em.cpp:1773:10: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp: In member function 'const long unsigned int EventMachinet::CreateUnixDomainServer(const char)': em.cpp:1805:33: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] unsigned long output_binding = NULL; ^ em.cpp:1866:9: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp: In member function 'const long unsigned int EventMachinet::Socketpair(char const_)': em.cpp:1927:10: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp:1932:10: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp:1934:33: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] unsigned long output_binding = NULL; ^ em.cpp:1938:10: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp:1948:10: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] return NULL; ^ em.cpp: In member function 'void EventMachine_t::SignalLoopBreaker()': em.cpp:294:34: warning: ignoring return value of 'ssizet write(int, const void, size_t)', declared with attribute warn_unused_result [-Wunused-result] write (LoopBreakerWriter, "", 1); ^ em.cpp: In member function 'void EventMachine_t::_ReadLoopBreaker()': em.cpp:922:50: warning: ignoring return value of 'ssizet read(int, void, size_t)', declared with attribute warn_unusedresult [-Wunused-result] read (LoopBreakerReader, buffer, sizeof(buffer)); ^ compiling ed.cpp ed.cpp: In member function 'virtual int ConnectionDescriptor::SendOutboundData(const char, int)': ed.cpp:503:76: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ProxiedFrom && MaxOutboundBufSize && GetOutboundDataSize() + length > MaxOutboundBufSize) ^ ed.cpp: In member function 'void ConnectionDescriptor::_WriteOutboundData()': ed.cpp:956:67: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ProxiedFrom && MaxOutboundBufSize && GetOutboundDataSize() < MaxOutboundBufSize && ProxiedFrom->IsPaused()) ^ compiling cplusplus.cpp compiling rubymain.cpp rubymain.cpp: In function 'VALUE t_connect_server(VALUE, VALUE, VALUE)': rubymain.cpp:468:42: error: format not a string literal and no format arguments [-Werror=format-security] rb_raise (EM_eConnectionError, e.what()); ^ rubymain.cpp: In function 'VALUE t_bind_connect_server(VALUE, VALUE, VALUE, VALUE, VALUE)': rubymain.cpp:488:42: error: format not a string literal and no format arguments [-Werror=format-security] rb_raise (EM_eConnectionError, e.what()); ^ cc1plus: some warnings being treated as errors make: *\ [rubymain.o] Error 1

Gem files will remain installed in /var/lib/gems/1.9.1/gems/eventmachine-0.12.10 for inspection. Results logged to /var/lib/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out An error occurred while installing eventmachine (0.12.10), and Bundler cannot continue. Make sure that gem install eventmachine -v '0.12.10' succeeds before bundling. 2014/10/16 17:03:35 The command [/bin/sh -c cd /usr/local && wget -qO- https://github.com/EmergingTechnologyInstitute/microscaler/tarball/master | tar xzf - -C /tmp && mv /tmp/EmergingTechnologyInstitute-microscaler-/microscaler-agent /usr/local && rm -Rf /tmp/EmergingTechnologyInstitute-microscaler- && cd microscaler-agent && mkdir /.bundle && echo --- >> /.bundle/config && echo 'BUNDLE_BUILD__EVENTMACHINE: --with-cflags="-O2 -pipe -march=native -w" ' >> /.bundle/config && echo 'BUNDLE_BUILD__THIN: --with-cflags="-O2 -pipe -march=native -w" ' >> /.bundle/config && bundle install && chmod a+x lib/docker_agent.rb && chmod a+x lib/rest_client.rb] returned a non-zero code: 5

amoghe commented 9 years ago

The fix for this is to edit the Dockerfile, and replace all instances of /.bundle with .bundle (i.e. - remove the leading slash). This will cause bundler to look for its config in the local dir (instead of /), and things will work again.

Note that this has to be done in the microscaler/Dockerfile.template , which is used to create the actual Dockerfile at build time.