Bug #4976

Partition table is not required when creating host with network provisioning

Added by Ivan Necas over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Ivan Necas
Category:Host creation
Target version:Sprint 22
Difficulty: Bugzilla link:
Found in release: Pull request:
Story points-
Velocity based estimate-
Release1.5.0Release relationshipAuto

Description

However, kickstart templates count on it and it fails badly
when rendering it:


    Processing by UnattendedController#provision as HTML
      Parameters: {"hostname"=>"rhel6-1.katellolabs.org"}
    Found rhel6-1.katellolabs.org
    Operation FAILED: private method `layout' called for nil:NilClass
    Completed 500 Internal Server Error in 145ms

      app/models/host/managed.rb:249:in `diskLayout'
      app/controllers/unattended_controller.rb:196:in `kickstart_attributes'
      app/controllers/unattended_controller.rb:170:in `load_template_vars'
      app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'

Associated revisions

Revision e4fde4e3
Added by Ivan Necas over 3 years ago

Fixes #4976 - ensure the process is really running inside a rake task

History

#1 Updated by Dominic Cleal over 3 years ago

  • Subject changed from Partitiona table is not required when creating host with network provisioning to Partition table is not required when creating host with network provisioning
  • Category set to Host creation

#2 Updated by Ivan Necas over 3 years ago

  • Status changed from New to Assigned
  • Assigned To set to Ivan Necas

More details: this happens only with Katello in place.

The cause is Foreman uses this to determine if it's running in rake task or not:

if defined? Rake

However, tire gem requires rake in non-rake task as well, so the constant is defined.

I will update the code, extract the checking on running in rake to a single method and
use more complex logic to determine it's really running from rake.

#3 Updated by Ivan Necas over 3 years ago

  • Status changed from Assigned to Ready For Testing

#4 Updated by Dominic Cleal over 3 years ago

  • Target version set to Sprint 22

#5 Updated by Dominic Cleal over 3 years ago

  • Release set to 1.5.0

#6 Updated by Ivan Necas over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF