Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1361309 - Re-Registering host with uppercase hostname errors 'Name has already been taken'
Re-Registering host with uppercase hostname errors 'Name has already been ta...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: katello-agent (Show other bugs)
6.2.0
Unspecified Unspecified
high Severity high (vote)
: 6.2.2
: Unused
Assigned To: Justin Sherrill
Peter Ondrejka
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-28 14:29 EDT by Justin Sherrill
Modified: 2018-04-22 18:06 EDT (History)
11 users (show)

See Also:
Fixed In Version: rubygem-katello-3.0.0.74-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-14 17:01:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to handle uppercase hostnames (832 bytes, text/plain)
2016-08-30 20:20 EDT, Justin Sherrill
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Article) 3420711 None None None 2018-04-22 18:06 EDT
Foreman Issue Tracker 15891 None None None 2016-07-28 15:00 EDT
Red Hat Product Errata RHBA-2016:1885 normal SHIPPED_LIVE Satellite 6.2.2 bug fix update 2016-09-14 20:57:56 EDT

  None (edit)
Description Justin Sherrill 2016-07-28 14:29:10 EDT
If a host has a hostname with any uppercase letters, re-registration will try to find it, but not be able to because its stored with lowercase letters.


Steps to reproduce:

1) hostname 'FooBar.example.com'
2) subscription-manager register
3) subscription-manager register --force


<pre>
2016-07-28 13:24:50 [foreman-tasks/action] [E] Validation failed: Name has already been taken (ActiveRecord::RecordInvalid)
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/validations.rb:57:in `save!'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/attribute_methods/dirty.rb:29:in `save!'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:273:in `block in save!'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:199:in `transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:208:in `transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:326:in `with_transaction_returning_status'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:273:in `save!'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.18/app/models/foreman_tasks/concerns/action_triggering.rb:33:in `block in save!'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.18/app/models/foreman_tasks/concerns/action_triggering.rb:133:in `dynflow_task_wrap'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.18/app/models/foreman_tasks/concerns/action_triggering.rb:33:in `save!'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.2/app/lib/actions/katello/host/register.rb:26:in `block in plan'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/execution_plan.rb:281:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/execution_plan.rb:281:in `switch_flow'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action.rb:369:in `sequence'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.2/app/lib/actions/katello/host/register.rb:8:in `plan'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action.rb:461:in `block (3 levels) in execute_plan'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `call'
</pre>
Comment 1 Justin Sherrill 2016-07-28 14:29:12 EDT
Created from redmine issue http://projects.theforeman.org/issues/15891
Comment 2 Justin Sherrill 2016-07-28 14:29:15 EDT
Upstream bug assigned to jsherril@redhat.com
Comment 4 Bryan Kearney 2016-08-02 10:17:18 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/15891 has been closed
Comment 5 Justin Sherrill 2016-08-30 20:20 EDT
Created attachment 1196122 [details]
Patch to handle uppercase hostnames
Comment 8 errata-xmlrpc 2016-09-14 17:01:05 EDT
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/RHBA-2016:1885
Comment 9 Djebran Lezzoum 2017-09-26 08:11:46 EDT
qe_test_coverage PR: https://github.com/SatelliteQE/robottelo/pull/5311

Note You need to log in before you can comment on or make changes to this bug.