Created attachment 1142474 [details] "Power on" to newly created container on atomic host raises error - uninitialized constant Fog::Errors::Error::NotFound Description of problem: I created a container on registered atomic host using 'docker hub'. Container was created successfully. But when I click on 'power on' button, I got following error: Error: Error - uninitialized constant Fog::Errors::Error::NotFound No error in production.log: 2016-04-01 04:05:42 [app] [I] Started PUT "/containers/1/power" for 10.65.193.200 at 2016-04-01 04:05:42 -0400 2016-04-01 04:05:43 [app] [I] Processing by ContainersController#power as HTML 2016-04-01 04:05:43 [app] [I] Parameters: {"authenticity_token"=>"PWbuBmdIUUdTJRr9E/nEIW3loH1O6Xf8NGccK3kmsMg=", "id"=>"1"} 2016-04-01 04:05:43 [app] [D] Setting current user thread-local variable to admin 2016-04-01 04:05:43 [app] [D] Setting current organization thread-local variable to Default Organization 2016-04-01 04:05:43 [app] [D] Setting current location thread-local variable to none 2016-04-01 04:05:43 [app] [I] Redirected to https://cloud-qe-15.idmqe.lab.eng.bos.redhat.com/containers/1 2016-04-01 04:05:43 [app] [I] Completed 302 Found in 382ms (ActiveRecord: 12.9ms) Version-Release number of selected component (if applicable): sat6.2 beta snap6 How reproducible: always Steps to Reproduce: 1. create a container on atomic host 2. Power on the container 3. Actual results: Error: Error - uninitialized constant Fog::Errors::Error::NotFound Expected results: on clicking 'Power ON" container should be up and running and no error should be raised. Additional info:
Please note that I can run container on docker host via `docker run` cmd. But not using satellite webUI. thanks
It looks like this only happens for certain containers. On that URL you posted (https://cloud-qe-15.idmqe.lab.eng.bos.redhat.com/containers/) I was able to turn on all containers but one. I'll investigate what's wrong.
Apparently it only fails when the container entrypoint is wrong. There's something rescuing the wrong constant, not in Foreman or ForemanDocker though (Fog::Errors::Error::NotFound). I'll fix it to rescue the actual problem and display the error. Removing the blocker tag...
Created redmine issue http://projects.theforeman.org/issues/14442 from this bug
Hmmm looks like I can't reproduce this easily - Error - Cannot start container 6f64bd5cb629c37d29e2f2b05cf71c2f35cc293ce66b6261a9e2785cb0e52809: [8] System error: exec: "top": executable file not found in $PATH is what I get when I try to reproduce with the same container: http://imgur.com/a/DQG6y Any other hints?
I can reproduce this with Sat6.2 snap7.1. I created a container using docker hub and selected fedora 23. here is traceback: 2016-04-12 03:42:42 [app] [W] Action failed | NameError: uninitialized constant Fog::Errors::Error::NotFound | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_hooks-0.3.9/lib/foreman_hooks.rb:83:in `load_missing_constant_with_hooks' | /opt/theforeman/tfm/root/usr/share/gems/gems/fog-1.37.0/lib/fog/fogdocker/requests/compute/container_action.rb:16:in `rescue in container_action' | /opt/theforeman/tfm/root/usr/share/gems/gems/fog-1.37.0/lib/fog/fogdocker/requests/compute/container_action.rb:6:in `container_action' | /opt/theforeman/tfm/root/usr/share/gems/gems/fog-1.37.0/lib/fog/fogdocker/models/compute/server.rb:107:in `start' | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.3/app/models/service/containers.rb:101:in `run_container' | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.3/app/models/service/containers.rb:11:in `block in start_container!' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction' | /opt/rh
Created attachment 1146266 [details] complete traceback when this error appeared: Oops, we're sorry but something went wrong uninitialized constant Fog::Errors::Error::NotFound
Created attachment 1146267 [details] Fog error on webUI
This bug happened to be fixed in Fog 1.38 by David Davis: - https://github.com/fog/fog/commit/9ac62416512501d30ebcf9a1c49dadec1f0cc7cc Upstream, there's no action we should do to fix it, Foreman nightly asks for Fog 1.38. Downstream, Foreman uses Fog 1.37, which does NOT include this fix. We're not maintaining our own fork of Fog, so to close this bugzilla I guess we could link it with https://github.com/theforeman/foreman/commit/27ae0a7da15b3b26e85645c4773d15ac3d4d5157 Anyone knows how to proceed with this? I'd say we should link this BZ with the Fog 1.38 commit and let Jenkins cherry pick it, but I'd like someone to confirm that first. Thanks!
Alright, I'll close the current Redmine linked to this and link to the update to Fog 1.38 one.
Connecting redmine issue http://projects.theforeman.org/issues/14368 from this bug
Verification of this bz depends on bz 1336748
Verified with sat62 GA snap13.1 The reported issue is fixed. I can create a container of fedora23 from docker hub successfully. and In case I specify some thing wrong, I can see exact error
Created attachment 1163174 [details] I can power on conatiner successfully
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1501