Bug 1513327
Summary: | Creating a host w/ Boot disk provisioning method failed at medium selection | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Sachin Ghai <sghai> | ||||||
Component: | Bootdisk Plugin | Assignee: | Lukas Zapletal <lzap> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Sachin Ghai <sghai> | ||||||
Severity: | high | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 6.3.0 | CC: | bbuckingham, ehelms, ldelouw, lzap, pcreech, shisingh, zhunting | ||||||
Target Milestone: | Unspecified | Keywords: | Reopened, Triaged | ||||||
Target Release: | Unused | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
URL: | http://projects.theforeman.org/issues/14797 | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | foreman_bootdisk-10.0.1 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 1708326 (view as bug list) | Environment: | |||||||
Last Closed: | 2019-04-17 12:32:47 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Sachin Ghai
2017-11-15 08:24:39 UTC
Created attachment 1352438 [details]
Note the setttings before submitting create host form
Created attachment 1352441 [details]
After submitting create host form, media selection changed
Installed bootdisk plugin: ~]# rpm -qa | grep bootdisk tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3.3-2.el7sat.noarch tfm-rubygem-foreman_bootdisk-9.0.0-2.fm1_15.el7sat.noarch rpm -qa | grep vsphere tfm-rubygem-fog-vsphere-1.7.0-1.el7sat.noarch We are tracking this upstream under http://projects.theforeman.org/issues/14797 but due to Rails 5 changes (http://projects.theforeman.org/issues/21243) we are unable to fix this upstream now and we need to branch and backport this patch: app/models/concerns/foreman_bootdisk/host_ext.rb: included do - alias_method_chain :validate_media?, :bootdisk alias_method_chain :can_be_built?, :bootdisk end Eric, not sure about the process here, can you guys branch foreman_discovery off, I don't see SATELLITE-6.3 branch. I have report from Sachin that after applying this patch he see a different issue, but I think it is a different bug, I need to confirm: 2017-11-15 05:43:27 67918d40 [app] [I] Processing by HostsController#create as */* 2017-11-15 05:43:27 67918d40 [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"zDIKtd4f4jAtrNE1g0CF2bNeKaEsKTHJJkX1oHP39Xol6OLKnx5FDmGYxCa1SXURZenpZOAfhz90ip7gf1SfZQ==", "host"=>{"name"=>"sghaivmwarehost", "organization_id"=>"1", "location_id"=>"2", "hostgroup_id"=>"", "compute_profile_id"=>"", "content_facet_attributes"=>{"lifecycle_environment_id"=>"2", "content_view_id"=>"2", "content_source_id"=>"1", "kickstart_repository_id"=>"16"}, "environment_id"=>"1", "puppet_proxy_id"=>"1", "puppet_ca_proxy_id"=>"1", "openscap_proxy_id"=>"", "puppetclass_ids"=>[""], "managed"=>"true", "uuid"=>"501e7139-63ae-06d9-6a30-973ddbb2a5a3", "compute_resource_id"=>"4", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"00:50:56:9e:ef:ac", "identifier"=>"", "name"=>"sghaivmwarehost", "domain_id"=>"1", "subnet_id"=>"2", "ip"=>"10.8.113.56", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"VirtualVmxnet3", "network"=>"network-154"}}}, "architecture_id"=>"1", "operatingsystem_id"=>"1", "provision_method"=>"bootdisk", "build"=>"1", "ptable_id"=>"90", "pxe_loader"=>"PXELinux BIOS", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"3-Users", "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}, "capabilities"=>"build image bootdisk", "provider"=>"Vmware", "media_selector"=>"synced_content", "bare_metal_capabilities"=>"build"} 2017-11-15 05:43:27 67918d40 [app] [I] Current user: admin (administrator) 2017-11-15 05:43:27 67918d40 [app] [W] Failed to create a compute vmware (VMware) instance sghaivmwarehost.satqe.lab.eng.rdu2.redhat.com: undefined method `merge' for nil:NilClass | | NoMethodError: undefined method `merge' for nil:NilClass | /usr/share/foreman/app/models/concerns/orchestration/compute.rb:76:in `setCompute' | /usr/share/foreman/app/models/concerns/orchestration.rb:216:in `execute' | /usr/share/foreman/app/models/concerns/orchestration.rb:144:in `block in process' | /usr/share/foreman/app/models/concerns/orchestration.rb:136:in `each' | /usr/share/foreman/app/models/concerns/orchestration.rb:136:in `process' | /usr/share/foreman/app/models/concerns/orchestration.rb:44:in `around_save_orchestration' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:432:in `block in make_lambda' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:312:in `block in halting' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:497:in `block in around' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:505:in `call' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:92:in `__run_callbacks__' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_save_callbacks' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/callbacks.rb:302:in `create_or_update' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/persistence.rb:120:in `save' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/validations.rb:37:in `save' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/attribute_methods/dirty.rb:21:in `save' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:286:in `block (2 levels) in save' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:351:in `block in with_transaction_returning_status' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' Lzap, the applied patch on my setup is working and the reported issue is fixed. now I'm getting different issue where create host failed w/ error: Failed to upload ISO image. I'm not sure if its due to some config issue. In any case, this issue is fixed w/ applied patch. thank you. Tested with sat6.3 GA snap28 I don't see the changes in app/models/concerns/foreman_bootdisk/host_ext.rb. As per comment 5 following should be removed from "app/models/concerns/foreman_bootdisk/host_ext.rb" file though I can still see that line. alias_method_chain :validate_media?, :bootdisk Verified with sat6.3 snap29. updated rpms: ~]# rpm -qa | grep bootdisk tfm-rubygem-foreman_bootdisk-10.0.1-1.fm1_15.el7sat.noarch tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3.3-2.el7sat.noarch I can still see same issue and don't see the changes in app/models/concerns/foreman_bootdisk/host_ext.rb. As per comment 5 following should be removed from "app/models/concerns/foreman_bootdisk/host_ext.rb" file though I can still see that line. alias_method_chain :validate_media?, :bootdisk Verified with sat6.3 snap33. The reported issue is no longer reproducible and I can create host using "bootdisk" provisioning method on vmware without any issue. ----- 2018-01-31 11:34:39 50ef9afb [app] [I] Started POST "/hosts" for 10.67.xx.xx at 2018-01-31 11:34:39 -0500 2018-01-31 11:34:39 50ef9afb [app] [I] Processing by HostsController#create as */* 2018-01-31 11:34:39 50ef9afb [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"bMW01w2grQ0FUfBwAnFaDPwS9aXiNKaXMQQTPUt9hK+Mt8WXXpeLbsmFiTLIBuNeOqpWD3r7QsqSaWgw1gIv7g==", "host"=>{"name"=>"sghaivmwarehosttty4", "organization_id"=>"1", "location_id"=>"2", "hostgroup_id"=>"1", "compute_resource_id"=>"2", "content_facet_attributes"=>{"lifecycle_environment_id"=>"2", "content_view_id"=>"2", "content_source_id"=>"1", "kickstart_repository_id"=>"7"}, "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"sghaivmwarehosttty4", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"10.8.113.20", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"VirtualVmxnet3", "network"=>"network-154"}}}, "compute_attributes"=>{"cpus"=>"1", "corespersocket"=>"1", "memory_mb"=>"2048", "firmware"=>"automatic", "cluster"=>"Satellite_Engineering", "resource_pool"=>"Resources", "path"=>"/Datacenters/RH_Engineering/vm", "guest_id"=>"otherGuest", "scsi_controller_type"=>"VirtualLsiLogicController", "hardware_version"=>"Default", "memoryHotAddEnabled"=>"0", "cpuHotAddEnabled"=>"0", "add_cdrom"=>"1", "start"=>"1", "annotation"=>"", "volumes_attributes"=>{"0"=>{"_delete"=>"", "storage_pod"=>"RDU2-NFS-Cluster", "name"=>"Hard disk", "size_gb"=>"10", "thin"=>"true", "eager_zero"=>"false", "mode"=>"persistent"}}}, "architecture_id"=>"1", "operatingsystem_id"=>"1", "provision_method"=>"bootdisk", "build"=>"1", "ptable_id"=>"90", "pxe_loader"=>"PXELinux BIOS", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"3-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "capabilities"=>"build image new_volume bootdisk", "provider"=>"Vmware", "media_selector"=>"synced_content", "bare_metal_capabilities"=>"build"} 2018-01-31 11:34:39 50ef9afb [app] [I] Current user: admin (administrator) 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/RHSA-2018:0336
This is a Technlogy Preview feature and this particular issue (or similar symptoms) persisted in Satellite 6.3 to 6.5. It will be fixed in Satellite 6.6. Workaround is possible: From f4a051a53d76d635b85a202f8d17da57bd7c4b7a Mon Sep 17 00:00:00 2001 From: Lukas Zapletal <lzap+git> Date: Thu, 11 Jan 2018 12:47:46 +0100 Subject: [PATCH] BZ #1513327 - media is not validated --- app/models/concerns/foreman_bootdisk/host_ext.rb | 5 ----- 1 files changed, 0 insertion(+), 1 deletions(-) diff --git a/app/models/concerns/foreman_bootdisk/host_ext.rb b/app/models/concerns/foreman_bootdisk/host_ext.rb index 94ac3bd..e1f9bac 100644 --- a/app/models/concerns/foreman_bootdisk/host_ext.rb +++ b/app/models/concerns/foreman_bootdisk/host_ext.rb @@ -4,7 +4,6 @@ module ForemanBootdisk::HostExt extend ActiveSupport::Concern included do - alias_method_chain :validate_media?, :bootdisk alias_method_chain :can_be_built?, :bootdisk end @@ -37,10 +36,6 @@ module ForemanBootdisk::HostExt /i.86|x86[_-]64/ =~ architecture.name end -- 2.18.1 |