Problem re-provisioning RHEL9 system

Problem:

I am trying to re-provision existing RHEL9 system. System was running before. Before I start I un-register it similar to what I did for RHEL8. However, I am still getting error during installation:

An error occurred during registration attempt triggered by the rhsm kickstart
command. This could have happened due to incorrect rhsm command arguments or
subscription infrastructure issues. Would you like to ignore this and continue
with installation?

Error detail: Name has already been taken

Please respond 'yes' or 'no':

If I answer ‘yes’, installation continues and I can register node manually.
Similar process works well on RHEL 8 if I un-register host before rebuild, so this seems to be specific to RHEL 9 only.
Expected outcome:
Ecpected automatic provisioning including registration
Foreman and Proxy versions:
Foreman 3.6.2, Katello 4.8.4

Distribution and version:
Rocky 8

Actually I run into a similar problem. Are there any new information to it?

Did you delete the system out of Foreman before reinstalling? That is what I always have done, not just a unregister.

In my case the cause for the registration problem raised by a strange behaviour of kickstart:
The hostname for the registration used by the rhsm option is not set at the right time if DHCP is used :face_with_raised_eyebrow:

https://bugzilla.redhat.com/show_bug.cgi?id=1975349
After setting the hostname manually in the %pre section of the kickstart file it works fine.

1 Like

I tried to avoid deleting the system. It is VM, new MAC is generated every time and I need to edit DHCP which is not managed by Foreman. It worked on RHEL8 but is failing on RHEL9 mysteriously.

This sounds like my problem with DHCP vs static (see my last post). Is the DHCP configured to send/set the hostname? Do you try to set the hostname manually as I described?
In my case RHEL8 works also without problem, but RHEL9 stucks.

I am now moving from Foreman to Satellite (slowly !) and all RHEL8/9 systems are in Satellite now. I don’t see any issues I described in my original post on the Satellite. Re-provisioning just works. I am using the same DHCP server for both systems. As I don’t have any RHEL systems left on Foreman, it would be difficult for me troubleshoot this issue any further. My solution was to move to Satellite. It was not because of that issue, of course.