dice-cyfronet/atmosphere

Method new_vms_tmpls_and_flavors_and_tenants in manual optimization strategy should check if optimization policy params are present

Closed this issue · 6 comments

I, [2015-01-08T12:45:12.947823 #26651]  INFO -- :   Parameters: {"appliance"=>{"configuration_template_id"=>"214", "appliance_set_id"=>"536", "params"=>{}, "name"=>nil, "user_key_id"=>"39", "dev_mode_property_set"=>{"preference_cpu"=>"0", "preference_memory"=>"0", "preference_disk"=>"0"}, "compute_site_ids"=>nil}}
I, [2015-01-08T12:45:13.040284 #26651]  INFO -- : Completed 500 Internal Server Error in 92ms
F, [2015-01-08T12:45:13.897698 #26651] FATAL -- : 
NoMethodError (undefined method `[]' for nil:NilClass):
  vendor/bundle/ruby/2.1.0/bundler/gems/atmosphere-3dee9558043d/app/providers/atmosphere/optimization_strategy/manual.rb:21:in `new_vms_tmpls_and_flavors'

It it even worse - manual optimization policy assume that there are optimization_policy_params available in appliance

@tbartynski can you explain why it was implemented in such a way and how we can use manual policy to start new appliance (not given in start new appliance_set request).

/cc @bwilk

@tbartynski any deadline for this issue? It is quite important for ISMOP, what is more it blocks https://redmine.dev.cyfronet.pl/issues/3328

@tbartynski any news here?

It is not outdated. The scenario is as follow:

create new appliance set with e.g. type development and optimization policy set to true, next try to create new appliance with following params:

{ 
  "appliance":  {
    "configuration_template_id": "REAL_ID", 
    "appliance_set_id": "REAL_ID", 
    "params": {}, 
    "name": nil, 
    "user_key_id": "REAL_ID", 
    "dev_mode_property_set": {
      "preference_cpu": 0, 
      "preference_memory": 0, 
      "preference_disk": 0
    }
  }
}

The issue described in the issue description occurs.

Closed via #246