Bug #6566

renaming a node does not change the certname

Added by David Schmitt over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Aaron Stone
Category:Puppet integration
Target version:Sprint 27
Difficulty: Bugzilla link:
Found in release:1.4.2 Pull request:https://github.com/theforeman/foreman/pull/1604
Story points-
Velocity based estimate-
Release1.6.0Release relationshipAuto

Description

Reproduction:

1. Create a new host with the name 'test.example.com'
2. Render a provisioning template containing @host.certname. Output should contain 'test.example.com'
3. provision the host (I've not checked this step, but solely creating the host does not seem enough to repro this)
3. Edit the host and change the hostname to 'different.example.com'
4. Render a provisioning template containing @host.certname.

Expected output 'different.example.com'
Actual output 'test.example.com'

My specific use-case is renaming kickstartable hosts. When the certname does not change together with the hostname, this causes massive havok when trying to rebuild hosts.


Related issues

Related to Foreman - Bug #3222: Disabling UUID certificates leaves UUID certname in place... Closed 10/08/2013

Associated revisions

Revision d2823e35
Added by Aaron Stone over 3 years ago

Fixes #6566 - renaming a node now resets the certname on provision

If use_uuid_for_certificates is true, reuse the certname UUID value.
If false, then reset the certname if it does not match the hostname.

History

#1 Updated by Dominic Cleal over 3 years ago

  • Category set to Puppet integration

#2 Updated by Aaron Stone over 3 years ago

Related to #3222. Instead of zapping the certificate only if we've changed from uuid to named certificates, what if we always zap the certificate when we're in hostname mode? This will handle both the case described in #3222 (changing from uuid to hostname) and also when renaming a machine with hostname certnames.

#3 Updated by Aaron Stone over 3 years ago

  • Pull request https://github.com/theforeman/foreman/pull/1604 added

#4 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Target version set to Sprint 26

#5 Updated by Dominic Cleal over 3 years ago

  • Assigned To set to Aaron Stone
  • Release set to 1.6.0

#6 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 26 to Sprint 27

#7 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #3222: Disabling UUID certificates leaves UUID certname in place on newly created hosts added

#8 Updated by Aaron Stone over 3 years ago

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

Also available in: Atom PDF