Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: I tried deleting deployment whose state was mixed. In this multi instance deployment i had few running ec2 and few failed instances. UI displays: "The deployment ec2-multi was scheduled for deletion". Expected Result: For multi instance deployment whose state is mixed, means it has running instances in the deployment, so it cannot be allowed for deletion. so proper validation message should be displayed. deltacloud-core log displays: thin server (localhost:3002) [deltacloud-mock][3507]: [NO HANDLED] NoMethodError: undefined method `[]' for nil:NilClass /usr/share/deltacloud-core/bin/../lib/deltacloud/drivers/ec2/ec2_driver.rb:791:in `convert_instance' /usr/share/deltacloud-core/bin/../lib/deltacloud/drivers/ec2/ec2_driver.rb:186:in `instance' /usr/share/deltacloud-core/bin/../lib/deltacloud/base_driver/exceptions.rb:151:in `call' /usr/share/deltacloud-core/bin/../lib/deltacloud/base_driver/exceptions.rb:151:in `safely' /usr/share/deltacloud-core/bin/../lib/deltacloud/drivers/ec2/ec2_driver.rb:184:in `instance' /usr/share/deltacloud-core/bin/../lib/deltacloud/helpers/application_helper.rb:93:in `send' /usr/share/deltacloud-core/bin/../lib/deltacloud/helpers/application_helper.rb:93:in `show' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/share/deltacloud-core/bin/../lib/deltacloud/helpers/application_helper.rb:92:in `show' /usr/share/deltacloud-core/bin/../lib/deltacloud/server.rb:468 /usr/share/deltacloud-core/bin/../lib/sinatra/rabbit.rb:125:in `instance_eval' /usr/share/deltacloud-core/bin/../lib/sinatra/rabbit.rb:125:in `GET /api/instances/:id' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1151:in `call' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1151:in `compile!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:724:in `instance_eval' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:724:in `route_eval' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:708:in `route!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:758:in `process_route' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:755:in `catch' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:755:in `process_route' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:707:in `route!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:706:in `each' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:706:in `route!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:843:in `dispatch!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:644:in `call!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `instance_eval' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `invoke' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `catch' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `invoke' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:644:in `call!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:629:in `call' /usr/share/deltacloud-core/bin/../lib/sinatra/rack_syslog.rb:48:in `call' /usr/share/deltacloud-core/bin/../lib/sinatra/rack_date.rb:31:in `call' /usr/share/deltacloud-core/bin/../lib/sinatra/rack_accept.rb:149:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/head.rb:9:in `call' /usr/share/deltacloud-core/bin/../lib/sinatra/rack_driver_select.rb:45:in `call' /usr/share/deltacloud-core/bin/../lib/sinatra/rack_matrix_params.rb:106:in `call' /usr/share/deltacloud-core/bin/../lib/sinatra/rack_runtime.rb:36:in `call' /usr/share/deltacloud-core/bin/../lib/sinatra/rack_etag.rb:41:in `call' /usr/lib/ruby/gems/1.8/gems/rack-accept-0.4.3/lib/rack/accept/context.rb:22:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/head.rb:9:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/methodoverride.rb:24:in `call' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1272:in `call' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1303:in `synchronize' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1272:in `call' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:84:in `pre_process' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:82:in `catch' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:82:in `pre_process' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `call' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `spawn_threadpool' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1057:in `initialize' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1057:in `new' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1057:in `spawn_threadpool' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1049:in `defer' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:54:in `process' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:42:in `receive_data' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/backends/base.rb:61:in `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/server.rb:159:in `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/controllers/controller.rb:86:in `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `send' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `run_command' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!' /usr/share/deltacloud-core/bin/deltacloudd:235 /usr/bin/deltacloudd:5:in `load' /usr/bin/deltacloudd:5 thin server (localhost:3002) [deltacloud-mock][3507]: 127.0.0.1 - - [25/Jan/2012 06:19:05] "GET /api/instances/i-f05b22c0 HTTP/1.1" 500 259 0.6505 Additional info: rpm -qa | grep aeolus rubygem-aeolus-image-0.3.0-3.el6.noarch aeolus-conductor-doc-0.8.0-11.el6.noarch rubygem-aeolus-cli-0.3.0-5.el6.noarch aeolus-configure-2.5.0-7.el6.noarch aeolus-conductor-daemons-0.8.0-11.el6.noarch aeolus-conductor-0.8.0-11.el6.noarch aeolus-all-0.8.0-11.el6.noarch
Created attachment 557431 [details] msg
The fact that the deployment with running instances was queued for deletion is not a bug - if you delete a deployment which has running instances, these instances are sopped first and the deployment is deleted after all instances are stopped. I wasn't able to reproduce the error message printed by dc-core to logfile (NoMethodError: undefined method `[]' for nil:NilClass), maybe some dc internal not related bug? According to screenshot no error was displayed which means that stop request was sent successfully to all running instances. I would suggest to close this BZ as notabug.
After reproducing this bug on a testing machine, here is more info: there is a bug in conductor's stop_instances_and_destroy! method - when iterating through all deployment's instances if there is an instance in not running state, all following instances are skipped. Switching this bug back to ON_DEV
Discussed with Jan. bug reproduced on: rpm -qa | grep aeolus aeolus-conductor-0.8.0-17.el6.noarch rubygem-aeolus-cli-0.3.0-7.el6.noarch aeolus-configure-2.5.0-11.el6.noarch aeolus-conductor-daemons-0.8.0-17.el6.noarch aeolus-all-0.8.0-17.el6.noarch aeolus-conductor-doc-0.8.0-17.el6.noarch rubygem-aeolus-image-0.3.0-7.el6.noarch
patch sent: https://fedorahosted.org/pipermail/aeolus-devel/2012-February/008538.html
commit f9766608efcf78e440a02f30dd4be25fb6442784
Created attachment 565510 [details] mixed Tried to delete a deployment with some running and some pending instance in it. Proper message was displayed. rpm -qa|grep aeolus aeolus-conductor-0.8.0-35.el6.noarch rubygem-aeolus-cli-0.3.0-10.el6.noarch aeolus-conductor-doc-0.8.0-35.el6.noarch rubygem-aeolus-image-0.3.0-9.el6.noarch aeolus-all-0.8.0-35.el6.noarch aeolus-conductor-daemons-0.8.0-35.el6.noarch aeolus-configure-2.5.0-15.el6.noarch