Project

General

Profile

Actions

Bug #10375

closed

Entering Discovered Host - Provision edit form deletes attributes immediately

Added by Bryan Kearney almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1218293
Description of problem:

[root@dhcp201-172 yum.repos.d]# hammer -d --username admin --password changeme discovery list

[DEBUG 2015-05-04 19:41:23 API] 500 Internal Server Error {
"error" => {
"message" => "Host::Discovered#memory delegated to discovery_attribute_set.memory, but discovery_attribute_set is nil: #<Host::Discovered id: 2, name: \"mac52540058ef64\", ip: \"192.168.100.11\", last_compile: nil, last_freshcheck: nil, last_report: \"2015-05-04 11:12:07\", updated_at: \"2015-05-04 11:12:07\", source_file_id: nil, created_at: \"2015-05-04 11:12:07\", mac: \"52:54:00:58:ef:64\", root_pass: nil, serial: nil, puppet_status: 0, domain_id: nil, architecture_id: nil, operatingsystem_id: nil, environment_id: nil, subnet_id: 1, ptable_id: nil, medium_id: nil, build: false, comment: nil, disk: nil, installed_at: nil, model_id: 2, hostgroup_id: nil, owner_id: nil, owner_type: nil, enabled: true, puppet_ca_proxy_id: nil, managed: false, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 1, location_id: 2, type: \"Host::Discovered\", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, content_source_id: nil, primary_interface: \"eth0\", grub_pass: \"\", discovery_rule_id: nil, content_view_id: nil, lifecycle_environment_id: nil>"
}
}
[ERROR 2015-05-04 19:41:23 Exception] Error: 500 Internal Server Error
Error: 500 Internal Server Error
[ERROR 2015-05-04 19:41:23 Exception]

RestClient::InternalServerError (500 Internal Server Error):
/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
/usr/share/ruby/net/http.rb:852:in `start'
/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:51:in `get'
/usr/share/gems/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:279:in `call_client'
/usr/share/gems/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:210:in `http_call'
/usr/share/gems/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:160:in `call'
/usr/share/gems/gems/apipie-bindings-0.0.11/lib/apipie_bindings/resource.rb:14:in `call'
/usr/share/gems/gems/hammer_cli-0.1.4.9/lib/hammer_cli/apipie/command.rb:43:in `send_request'
/usr/share/gems/gems/hammer_cli_foreman-0.1.4.10/lib/hammer_cli_foreman/commands.rb:185:in `send_request'
/usr/share/gems/gems/hammer_cli_foreman-0.1.4.10/lib/hammer_cli_foreman/commands.rb:270:in `send_request'
/usr/share/gems/gems/hammer_cli_foreman-0.1.4.10/lib/hammer_cli_foreman/commands.rb:316:in `retrieve_and_print'
/usr/share/gems/gems/hammer_cli_foreman-0.1.4.10/lib/hammer_cli_foreman/commands.rb:303:in `browse_collection'
/usr/share/gems/gems/hammer_cli_foreman-0.1.4.10/lib/hammer_cli_foreman/commands.rb:288:in `execute'
/usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/share/gems/gems/hammer_cli-0.1.4.9/lib/hammer_cli/abstract.rb:23:in `run'
/usr/share/gems/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/share/gems/gems/hammer_cli-0.1.4.9/lib/hammer_cli/abstract.rb:23:in `run'
/usr/share/gems/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/share/gems/gems/hammer_cli-0.1.4.9/lib/hammer_cli/abstract.rb:23:in `run'
/usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
/usr/share/gems/gems/hammer_cli-0.1.4.9/bin/hammer:108:in `<top (required)>'
/usr/bin/hammer:23:in `load'
/usr/bin/hammer:23:in `<main>'

Version-Release number of selected component (if applicable):
sat6.1 GA snap2 (Satellite-6.1.0-RHEL-7-20150429.2)

How reproducible:
always

Steps to Reproduce:
1. list the discovered host via hammer
2.
3.

Actual results:
(NoMethodError) undefined method `memory' for nil:NilClass

Expected results:
shouldn't raise any error.

Additional info:

production.log:

Actions #1

Updated by Ori Rabin almost 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Ori Rabin
Actions #2

Updated by The Foreman Bot almost 9 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_discovery/pull/181 added
  • Pull request deleted ()
Actions #3

Updated by Lukas Zapletal almost 9 years ago

  • Subject changed from [hammer] on listing discovered host via api and cli raises: (NoMethodError) undefined method `memory' for nil:NilClass to Entering Discovered Host - Provision edit form deletes attributes immediately
Actions #4

Updated by Lukas Zapletal almost 9 years ago

The description should be: If you try to enter Provision dialog for discovered host but cancel it, the discover host losts all it's attributes: memory, disks, disks amount. Therefore all actions with attributes fail (e.g. CLI commands).

Actions #5

Updated by Ori Rabin almost 9 years ago

  • Assignee changed from Ori Rabin to Lukas Zapletal
Actions #6

Updated by Anonymous almost 9 years ago

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

Also available in: Atom PDF