Bug #22305

sub-man registration fails if system has checked in with puppet (and no org has been assigned)

Added by Justin Sherrill 2 months ago. Updated about 1 month ago.

Assigned To:Andrew Kofink
Target version:Team Brad - Iteration 27
Difficulty: Pull request:https://github.com/Katello/katello/pull/7168
Bugzilla link:1533201
Story points-
Velocity based estimate-
ReleaseKatello 3.5.2Release relationshipAuto


Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1533201

Description of problem:

If a host has checked in with puppet, but is not assigned to any org, and you try to register it with sub-man, you get:

Validation failed: Name has already been taken

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install satellite 6.3.0
2. Try to register the satellite to itself

Actual results:
Fails with "Name has already been taken"

Expected results:

Should register normally, and the host should be assigned to the specified org.

Additional info:

trace - server logs (23.7 KB) Andrew Kofink, 01/23/2018 03:41 PM

Associated revisions

Revision 4176ba11
Added by Andrew Kofink about 1 month ago

Fixes #22305: Unscope Host find on create via sub


#1 Updated by Justin Sherrill 2 months ago

  • Release set to Katello 3.5.2
  • Target version set to Team Brad - Iteration 26

#2 Updated by Andrew Kofink 2 months ago

  • Assigned To set to Andrew Kofink

#3 Updated by Brad Buckingham about 1 month ago

  • Target version changed from Team Brad - Iteration 26 to Team Brad - Iteration 27

#4 Updated by Andrew Kofink about 1 month ago

I am unable to reproduce this on the latest release, Katello 3.5; however, it has been reported in nightly.

#5 Updated by Andrew Kofink about 1 month ago

I am able to reproduce this on master. If you don't want to use puppet to repro, you can do the following:

1. Add a new host in `rake console`:
Host.new(name: 'katello.example.com').save!
2. Register katello.example.com

#6 Updated by Andrew Kofink about 1 month ago

#7 Updated by The Foreman Bot about 1 month ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7168 added

#8 Updated by Andrew Kofink about 1 month ago

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

Also available in: Atom PDF