Project

General

Profile

Bug #7812

Bootdisk_Plugin : undefined method `empty?'

Added by Apely AGAMAKOU over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

I've got this error message when i try to create a full host bootdisk :
I'm running Foreman 1.6.0 with bootdisk_plugin 3.2.0

NoMethodError
undefined method `empty?' for #<URI::HTTP:0x00000006aea078>
app/models/concernsvforeman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

whatever the interface : web , hammer , rake same error message. thanks !

Associated revisions

Revision a73bb350 (diff)
Added by Ronald van Zantvoort over 4 years ago

fixes #7812 - pass URI string in to fix empty? error on Ruby 1.8/1.9

Revision 4383c3ff (diff)
Added by Ronald van Zantvoort over 4 years ago

fixes #7812 - pass URI string in to fix empty? error on Ruby 1.8/1.9

(cherry picked from commit a73bb350087bd63a04f7f86e2e268fd6f496ac4e)

History

#1 Updated by Dominic Cleal over 4 years ago

  • Project changed from Foreman to Boot disk

Hm, I can't see where that might be triggered from. Could you try enabling debugging and see if it generates any more details in /var/log/foreman/production.log? http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging

#2 Updated by Ronald van Zantvoort over 4 years ago

Started GET "/bootdisk/api/hosts/11?full=true" for ::1 at 2014-10-17 17:48:07 +0200
Processing by ForemanBootdisk::Api::V2::DisksController#host as JSON
  Parameters: {"full"=>"true", "apiv"=>"v2", "id"=>"11", "disk"=>{}}
  ESC[1mESC[36mUser Load (0.6ms)ESC[0m  ESC[1mSELECT `users`.* FROM `users` WHERE `users`.`login` = 'admin' LIMIT 1ESC[0m
  ESC[1mESC[35mAuthSource Load (0.2ms)ESC[0m  SELECT `auth_sources`.* FROM `auth_sources` WHERE `auth_sources`.`id` = 1 LIMIT 1
  ESC[1mESC[36mCACHE (0.0ms)ESC[0m  ESC[1mSELECT `users`.* FROM `users` WHERE `users`.`login` = 'admin' LIMIT 1ESC[0m
Authenticated user Admin User against INTERNAL authentication source
  ESC[1mESC[35mUser Load (0.4ms)ESC[0m  SELECT `users`.* FROM `users` WHERE `users`.`login` = 'foreman_admin' LIMIT 1
Setting current user thread-local variable to foreman_admin
  ESC[1mESC[36m (0.2ms)ESC[0m  ESC[1mBEGINESC[0m
  ESC[1mESC[35m (0.4ms)ESC[0m  UPDATE `users` SET `last_login_on` = '2014-10-17 15:48:07', `updated_at` = '2014-10-17 15:48:07' WHERE `users`.`id` = 1
  ESC[1mESC[36mRole Load (0.2ms)ESC[0m  ESC[1mSELECT `roles`.* FROM `roles` WHERE `roles`.`name` = 'Anonymous' LIMIT 1ESC[0m
  ESC[1mESC[35mSQL (0.2ms)ESC[0m  SELECT `roles`.id FROM `roles` INNER JOIN `user_roles` ON `roles`.`id` = `user_roles`.`role_id` WHERE `user_roles`.`owner_id` = 1 AND `user_roles`.`owner_type` = 'User'
  ESC[1mESC[36m (1.4ms)ESC[0m  ESC[1mCOMMITESC[0m
  ESC[1mESC[35mCACHE (0.0ms)ESC[0m  SELECT `roles`.* FROM `roles` WHERE `roles`.`name` = 'Anonymous' LIMIT 1
  ESC[1mESC[36mRole Exists (0.2ms)ESC[0m  ESC[1mSELECT 1 AS one FROM `roles` INNER JOIN `user_roles` ON `roles`.`id` = `user_roles`.`role_id` WHERE `user_roles`.`owner_id` = 1 AND `user_roles`.`owner_type` = 'User' AND `roles`.`id` = 8 LIMIT 1ESC[0m
Setting current user thread-local variable to nil
Setting current user thread-local variable to admin
  ESC[1mESC[35mAuthSourceHidden Load (0.2ms)ESC[0m  SELECT `auth_sources`.* FROM `auth_sources` WHERE `auth_sources`.`type` IN ('AuthSourceHidden')
  ESC[1mESC[36mUser Load (0.2ms)ESC[0m  ESC[1mSELECT `users`.* FROM `users` WHERE `users`.`login` = 'admin' AND (users.auth_source_id <> 2) ORDER BY firstname LIMIT 1ESC[0m
Authorized user admin(Admin User)
Setting current user thread-local variable to admin
  ESC[1mESC[35mHost::Managed Load (0.3ms)ESC[0m  SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`type` IN ('Host::Managed') AND `hosts`.`id` = 11 LIMIT 1
  ESC[1mESC[36mOperatingsystem Load (0.2ms)ESC[0m  ESC[1mSELECT `operatingsystems`.* FROM `operatingsystems` WHERE `operatingsystems`.`id` = 1 ORDER BY operatingsystems.name LIMIT 1ESC[0m
  ESC[1mESC[35mArchitecture Load (0.2ms)ESC[0m  SELECT `architectures`.* FROM `architectures` WHERE `architectures`.`id` = 1 LIMIT 1
  ESC[1mESC[36mConfigTemplate Load (0.2ms)ESC[0m  ESC[1mSELECT `config_templates`.* FROM `config_templates` INNER JOIN `config_templates_operatingsystems` ON `config_templates_operatingsystems`.`config_template_id` = `config_templates`.`id` INNER JOIN `operatingsystems` ON `operatingsystems`.`id` = `config_templates_operatingsystems`.`operatingsystem_id` INNER JOIN `template_kinds` ON `template_kinds`.`id` = `config_templates`.`template_kind_id` INNER JOIN `template_combinations` ON `template_combinations`.`config_template_id` = `config_templates`.`id` WHERE `operatingsystems`.`id` = 1 AND `template_kinds`.`name` = 'PXELinux' AND `template_combinations`.`hostgroup_id` = 10 AND `template_combinations`.`environment_id` = 4 ORDER BY config_templates.name LIMIT 1ESC[0m
  ESC[1mESC[35mConfigTemplate Load (0.2ms)ESC[0m  SELECT `config_templates`.* FROM `config_templates` INNER JOIN `config_templates_operatingsystems` ON `config_templates_operatingsystems`.`config_template_id` = `config_templates`.`id` INNER JOIN `operatingsystems` ON `operatingsystems`.`id` = `config_templates_operatingsystems`.`operatingsystem_id` INNER JOIN `template_kinds` ON `template_kinds`.`id` = `config_templates`.`template_kind_id` INNER JOIN `template_combinations` ON `template_combinations`.`config_template_id` = `config_templates`.`id` WHERE `operatingsystems`.`id` = 1 AND `template_kinds`.`name` = 'PXELinux' AND `template_combinations`.`hostgroup_id` = 10 AND `template_combinations`.`environment_id` IS NULL ORDER BY config_templates.name LIMIT 1
  ESC[1mESC[36mConfigTemplate Load (0.2ms)ESC[0m  ESC[1mSELECT `config_templates`.* FROM `config_templates` INNER JOIN `config_templates_operatingsystems` ON `config_templates_operatingsystems`.`config_template_id` = `config_templates`.`id` INNER JOIN `operatingsystems` ON `operatingsystems`.`id` = `config_templates_operatingsystems`.`operatingsystem_id` INNER JOIN `template_kinds` ON `template_kinds`.`id` = `config_templates`.`template_kind_id` INNER JOIN `template_combinations` ON `template_combinations`.`config_template_id` = `config_templates`.`id` WHERE `operatingsystems`.`id` = 1 AND `template_kinds`.`name` = 'PXELinux' AND `template_combinations`.`hostgroup_id` IS NULL AND `template_combinations`.`environment_id` = 4 ORDER BY config_templates.name LIMIT 1ESC[0m
  ESC[1mESC[35mConfigTemplate Load (0.2ms)ESC[0m  SELECT `config_templates`.* FROM `config_templates` INNER JOIN `config_templates_operatingsystems` ON `config_templates_operatingsystems`.`config_template_id` = `config_templates`.`id` INNER JOIN `operatingsystems` ON `operatingsystems`.`id` = `config_templates_operatingsystems`.`operatingsystem_id` INNER JOIN `template_kinds` ON `template_kinds`.`id` = `config_templates`.`template_kind_id` INNER JOIN `os_default_templates` ON `os_default_templates`.`config_template_id` = `config_templates`.`id` WHERE `operatingsystems`.`id` = 1 AND `template_kinds`.`name` = 'PXELinux' AND `os_default_templates`.`operatingsystem_id` = 1 ORDER BY config_templates.name LIMIT 1
  ESC[1mESC[36mMedium Load (0.2ms)ESC[0m  ESC[1mSELECT `media`.* FROM `media` WHERE `media`.`id` = 7 ORDER BY media.name LIMIT 1ESC[0m
  ESC[1mESC[35mMedium Exists (0.2ms)ESC[0m  SELECT 1 AS one FROM `media` INNER JOIN `media_operatingsystems` ON `media`.`id` = `media_operatingsystems`.`medium_id` WHERE `media_operatingsystems`.`operatingsystem_id` = 1 AND `media`.`id` = 7 ORDER BY media.name LIMIT 1
  ESC[1mESC[36mArchitecture Exists (0.2ms)ESC[0m  ESC[1mSELECT 1 AS one FROM `architectures` INNER JOIN `architectures_operatingsystems` ON `architectures`.`id` = `architectures_operatingsystems`.`architecture_id` WHERE `architectures_operatingsystems`.`operatingsystem_id` = 1 AND `architectures`.`id` = 1 LIMIT 1ESC[0m
  ESC[1mESC[35mToken Load (0.2ms)ESC[0m  SELECT `tokens`.* FROM `tokens` WHERE `tokens`.`host_id` = 11 LIMIT 1
  ESC[1mESC[36mCommonParameter Load (0.2ms)ESC[0m  ESC[1mSELECT `parameters`.* FROM `parameters` WHERE `parameters`.`type` IN ('CommonParameter') ORDER BY parameters.nameESC[0m
  ESC[1mESC[35mOrganization Load (0.2ms)ESC[0m  SELECT `taxonomies`.* FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Organization') AND `taxonomies`.`id` = 1 ORDER BY title LIMIT 1
  ESC[1mESC[36mOrganizationParameter Load (0.2ms)ESC[0m  ESC[1mSELECT `parameters`.* FROM `parameters` WHERE `parameters`.`type` IN ('OrganizationParameter') AND `parameters`.`reference_id` = 1 ORDER BY parameters.nameESC[0m
  ESC[1mESC[35mLocation Load (0.2ms)ESC[0m  SELECT `taxonomies`.* FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location') AND `taxonomies`.`id` = 5 ORDER BY title LIMIT 1
  ESC[1mESC[36mLocation Load (0.2ms)ESC[0m  ESC[1mSELECT `taxonomies`.* FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location') AND `taxonomies`.`id` IN (7, 5) ORDER BY titleESC[0m
  ESC[1mESC[35mLocationParameter Load (0.2ms)ESC[0m  SELECT `parameters`.* FROM `parameters` WHERE `parameters`.`type` IN ('LocationParameter') AND `parameters`.`reference_id` = 7 ORDER BY parameters.name
  ESC[1mESC[36mLocationParameter Load (0.2ms)ESC[0m  ESC[1mSELECT `parameters`.* FROM `parameters` WHERE `parameters`.`type` IN ('LocationParameter') AND `parameters`.`reference_id` = 5 ORDER BY parameters.nameESC[0m
  ESC[1mESC[35mDomain Load (0.2ms)ESC[0m  SELECT `domains`.* FROM `domains` WHERE `domains`.`id` = 10 ORDER BY domains.name LIMIT 1
  ESC[1mESC[36mDomainParameter Load (0.2ms)ESC[0m  ESC[1mSELECT `parameters`.* FROM `parameters` WHERE `parameters`.`type` IN ('DomainParameter') AND `parameters`.`reference_id` = 10 ORDER BY parameters.nameESC[0m
  ESC[1mESC[35mOsParameter Load (0.2ms)ESC[0m  SELECT `parameters`.* FROM `parameters` WHERE `parameters`.`type` IN ('OsParameter') AND `parameters`.`reference_id` = 1 ORDER BY parameters.name
  ESC[1mESC[36mHostgroup Load (0.2ms)ESC[0m  ESC[1mSELECT `hostgroups`.* FROM `hostgroups` WHERE `hostgroups`.`id` = 10 ORDER BY hostgroups.title LIMIT 1ESC[0m
  ESC[1mESC[35mHostgroup Load (0.2ms)ESC[0m  SELECT `hostgroups`.* FROM `hostgroups` WHERE `hostgroups`.`id` IN (2, 9, 10) ORDER BY hostgroups.title
  ESC[1mESC[36mGroupParameter Load (0.2ms)ESC[0m  ESC[1mSELECT `parameters`.* FROM `parameters` WHERE `parameters`.`type` IN ('GroupParameter') AND `parameters`.`reference_id` = 2 ORDER BY parameters.nameESC[0m
  ESC[1mESC[35mGroupParameter Load (0.2ms)ESC[0m  SELECT `parameters`.* FROM `parameters` WHERE `parameters`.`type` IN ('GroupParameter') AND `parameters`.`reference_id` = 9 ORDER BY parameters.name
  ESC[1mESC[36mGroupParameter Load (0.2ms)ESC[0m  ESC[1mSELECT `parameters`.* FROM `parameters` WHERE `parameters`.`type` IN ('GroupParameter') AND `parameters`.`reference_id` = 10 ORDER BY parameters.nameESC[0m
  ESC[1mESC[35mHostParameter Load (0.2ms)ESC[0m  SELECT `parameters`.* FROM `parameters` WHERE `parameters`.`type` IN ('HostParameter') AND `parameters`.`reference_id` = 11 ORDER BY parameters.name
  ESC[1mESC[36mEnvironment Load (0.2ms)ESC[0m  ESC[1mSELECT `environments`.* FROM `environments` WHERE `environments`.`id` = 4 ORDER BY environments.name LIMIT 1ESC[0m
  ESC[1mESC[35mSQL (0.2ms)ESC[0m  SELECT `config_groups`.id FROM `config_groups` INNER JOIN `host_config_groups` ON `config_groups`.`id` = `host_config_groups`.`config_group_id` WHERE `host_config_groups`.`host_id` = 11 AND `host_config_groups`.`host_type` = 'Host::Base' ORDER BY config_groups.name
  ESC[1mESC[36mHostgroup Load (0.2ms)ESC[0m  ESC[1mSELECT `hostgroups`.* FROM `hostgroups` WHERE `hostgroups`.`id` IN (2, 9, 10) ORDER BY (case when hostgroups.ancestry is null then 0 else 1 end), hostgroups.ancestryESC[0m
  ESC[1mESC[35mSQL (0.2ms)ESC[0m  SELECT `config_groups`.id FROM `config_groups` INNER JOIN `host_config_groups` ON `config_groups`.`id` = `host_config_groups`.`config_group_id` WHERE `host_config_groups`.`host_id` = 2 AND `host_config_groups`.`host_type` = 'Hostgroup' ORDER BY config_groups.name
  ESC[1mESC[36mSQL (0.2ms)ESC[0m  ESC[1mSELECT `config_groups`.id FROM `config_groups` INNER JOIN `host_config_groups` ON `config_groups`.`id` = `host_config_groups`.`config_group_id` WHERE `host_config_groups`.`host_id` = 9 AND `host_config_groups`.`host_type` = 'Hostgroup' ORDER BY config_groups.nameESC[0m
  ESC[1mESC[35mSQL (0.2ms)ESC[0m  SELECT `config_groups`.id FROM `config_groups` INNER JOIN `host_config_groups` ON `config_groups`.`id` = `host_config_groups`.`config_group_id` WHERE `host_config_groups`.`host_id` = 10 AND `host_config_groups`.`host_type` = 'Hostgroup' ORDER BY config_groups.name
  ESC[1mESC[36mSQL (0.2ms)ESC[0m  ESC[1mSELECT `config_group_classes`.`puppetclass_id` FROM `config_group_classes` WHERE `config_group_classes`.`config_group_id` IN (2)ESC[0m
  ESC[1mESC[35mSQL (0.2ms)ESC[0m  SELECT `hostgroup_classes`.`puppetclass_id` FROM `hostgroup_classes` WHERE `hostgroup_classes`.`hostgroup_id` IN (2, 9, 10)
  ESC[1mESC[36mSQL (0.3ms)ESC[0m  ESC[1mSELECT `host_classes`.`puppetclass_id` FROM `host_classes` WHERE `host_classes`.`host_id` = 11ESC[0m
  ESC[1mESC[35mSQL (0.2ms)ESC[0m  SELECT DISTINCT puppetclasses.id FROM `puppetclasses` INNER JOIN `environment_classes` ON `puppetclasses`.`id` = `environment_classes`.`puppetclass_id` WHERE `environment_classes`.`environment_id` = 4 AND `puppetclasses`.`id` IN (272, 275)
  ESC[1mESC[36mLookupKey Load (0.3ms)ESC[0m  ESC[1mSELECT `lookup_keys`.* FROM `lookup_keys` WHERE `lookup_keys`.`puppetclass_id` IN (272, 275) ORDER BY lookup_keys.keyESC[0m
  ESC[1mESC[35mSQL (0.2ms)ESC[0m  SELECT `config_groups`.id FROM `config_groups` INNER JOIN `host_config_groups` ON `config_groups`.`id` = `host_config_groups`.`config_group_id` WHERE `host_config_groups`.`host_id` = 11 AND `host_config_groups`.`host_type` = 'Host::Base' ORDER BY config_groups.name
  ESC[1mESC[36mCACHE (0.0ms)ESC[0m  ESC[1mSELECT `hostgroups`.* FROM `hostgroups` WHERE `hostgroups`.`id` IN (2, 9, 10) ORDER BY (case when hostgroups.ancestry is null then 0 else 1 end), hostgroups.ancestryESC[0m
  ESC[1mESC[35mSQL (0.2ms)ESC[0m  SELECT `config_groups`.id FROM `config_groups` INNER JOIN `host_config_groups` ON `config_groups`.`id` = `host_config_groups`.`config_group_id` WHERE `host_config_groups`.`host_id` = 2 AND `host_config_groups`.`host_type` = 'Hostgroup' ORDER BY config_groups.name
  ESC[1mESC[36mSQL (0.2ms)ESC[0m  ESC[1mSELECT `config_groups`.id FROM `config_groups` INNER JOIN `host_config_groups` ON `config_groups`.`id` = `host_config_groups`.`config_group_id` WHERE `host_config_groups`.`host_id` = 9 AND `host_config_groups`.`host_type` = 'Hostgroup' ORDER BY config_groups.nameESC[0m
  ESC[1mESC[35mSQL (0.3ms)ESC[0m  SELECT `config_groups`.id FROM `config_groups` INNER JOIN `host_config_groups` ON `config_groups`.`id` = `host_config_groups`.`config_group_id` WHERE `host_config_groups`.`host_id` = 10 AND `host_config_groups`.`host_type` = 'Hostgroup' ORDER BY config_groups.name
  ESC[1mESC[36mSQL (0.2ms)ESC[0m  ESC[1mSELECT `config_group_classes`.`puppetclass_id` FROM `config_group_classes` WHERE `config_group_classes`.`config_group_id` IN (2)ESC[0m
  ESC[1mESC[35mSQL (0.2ms)ESC[0m  SELECT `hostgroup_classes`.`puppetclass_id` FROM `hostgroup_classes` WHERE `hostgroup_classes`.`hostgroup_id` IN (2, 9, 10)
  ESC[1mESC[36mSQL (0.2ms)ESC[0m  ESC[1mSELECT `host_classes`.`puppetclass_id` FROM `host_classes` WHERE `host_classes`.`host_id` = 11ESC[0m
  ESC[1mESC[35mSQL (0.2ms)ESC[0m  SELECT DISTINCT puppetclasses.id FROM `puppetclasses` INNER JOIN `environment_classes` ON `puppetclasses`.`id` = `environment_classes`.`puppetclass_id` WHERE `environment_classes`.`environment_id` = 4 AND `puppetclasses`.`id` IN (272, 275)
  ESC[1mESC[36mCACHE (0.0ms)ESC[0m  ESC[1mSELECT `lookup_keys`.* FROM `lookup_keys` WHERE `lookup_keys`.`puppetclass_id` IN (272, 275) ORDER BY lookup_keys.keyESC[0m
  ESC[1mESC[35mSubnet Load (0.2ms)ESC[0m  SELECT `subnets`.* FROM `subnets` WHERE `subnets`.`id` = 7 ORDER BY vlanid LIMIT 1
  ESC[1mESC[36mCACHE (0.0ms)ESC[0m  ESC[1mSELECT 1 AS one FROM `media` INNER JOIN `media_operatingsystems` ON `media`.`id` = `media_operatingsystems`.`medium_id` WHERE `media_operatingsystems`.`operatingsystem_id` = 1 AND `media`.`id` = 7 ORDER BY media.name LIMIT 1ESC[0m
  ESC[1mESC[35mCACHE (0.0ms)ESC[0m  SELECT 1 AS one FROM `architectures` INNER JOIN `architectures_operatingsystems` ON `architectures`.`id` = `architectures_operatingsystems`.`architecture_id` WHERE `architectures_operatingsystems`.`operatingsystem_id` = 1 AND `architectures`.`id` = 1 LIMIT 1
Boot file BOOT/UBUNTU_14_04_X86_64_LINUX, source http://apt-get.eu/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux
Boot file BOOT/UBUNTU_14_04_X86_64_INITRD_GZ, source http://apt-get.eu/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz
Fetching http://apt-get.eu/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux
undefined method `empty?' for #<URI::HTTP:0x007f422083a928> (NoMethodError)
/usr/lib/ruby/1.9.1/net/http.rb:1861:in `initialize'
/usr/lib/ruby/1.9.1/net/http.rb:2094:in `initialize'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:108:in `new'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:108:in `block (2 levels) in fetch'
/usr/lib/ruby/1.9.1/net/http.rb:746:in `start'
/usr/lib/ruby/1.9.1/net/http.rb:557:in `start'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:107:in `block in fetch'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:97:in `open'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:97:in `fetch'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:64:in `block (3 levels) in generate'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:63:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:63:in `block (2 levels) in generate'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:62:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:62:in `block in generate'
/usr/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:40:in `generate'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:29:in `generate_full_host'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/controllers/foreman_bootdisk/api/v2/disks_controller.rb:34:in `host'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:167:in `process_action'

etc. :)

#3 Updated by Ronald van Zantvoort over 4 years ago

Changing line 108 in /usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_bootdisk-3.2.0/app/services/foreman_bootdisk/iso_generator.rb:

       Rails.logger.info("Fetching #{uri}")
        write_cache = use_cache
        uri = URI(uri)
        Net::HTTP.start(uri.host, uri.port) do |http|
          #request = Net::HTTP::Get.new uri
          request = Net::HTTP::Get.new(uri.to_s)

          http.request request do |response|
            response.read_body do |chunk|
              file.write chunk

Works for me

#4 Updated by Dominic Cleal over 4 years ago

Ah great, thanks for finding that out! I'd been testing with Ruby 2.0.0 where it works without that. Fixed in git, will see about releasing a 3.2.1 too.

#5 Updated by Ronald van Zantvoort over 4 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF