I added this to my bootstrap, right after the do not edit line

echo "Removing spacwalk-client"
rpm -e  rhncfg-management python2-rhncfg-management rhn-client-tools rhn-setup python2-rhn-client-tools rhn-check yum-rhn-plugin python2-rhn-setup  python2-rhn-check rhnsd python2-rhncfg python2-osad rhncfg osad rhncfg-client rhncfg-actions python2-spacewalk-usix spacewalk-usix rhncfg-actions rhncfg-client python2-rhncfg-client python2-rhncfg-actions jabberpy osad python2-osa-common

systemctl stop osad


echo "Cleaning yum cache"
yum clean all

# Rebuild uuid since vms were cloned and causes issue with registration.
rm -f /etc/machine-id
rm -f /var/lib/dbus/machine-id
dbus-uuidgen --ensure
systemd-machine-id-setup

One removes spacewalk if you have it installed, the other part changed the UUID.  Please note this only works on Centos7/Redhat 7/Oracle Linux 7
---------------

Len Ewen

Systems Administrator 1

Information Technology

University of Indianapolis

(317) 788-3362

UIndyIT.jpg

Confidentiality Notice: This communication and/or its content are for the sole use of the intended recipient, and may be privileged, confidential, or otherwise protected from disclosure by law. If you are not the intended recipient, please notify the sender and then delete all copies of it. Unless you are the intended recipient, your use or dissemination of the information contained in this communication may be illegal.



On Mon, Sep 28, 2020 at 8:50 AM Simon Avery <Simon.Avery@atass-sports.co.uk> wrote:
Thanks, Nicola.

My issue is now resolved - in a slightly simpler way. On affected machines;

rm /etc/machine-id
systemd-machine-id-setup

Then bootstrap to Uyuni and all is well. My problematic machines are co-existing and additional ones added.

I've also now gathered the values of this file for the 200+ centos machines I help manage and found another 13 machines sharing the same values (which have not yet migrated to Uyuni) and fixed those.

A classic example of a lurking problem that's ignored until something decided it was useful.

Regards

Simon

-----Original Message-----
From: Nicola Di Marzo <nicola.dimarzo@suse.com>
Sent: 28 September 2020 10:42
To: uyuni-users@opensuse.org
Subject: Re: [EXTERNAL EMAIL] Re: [uyuni-users] RE: Uyuni System ID: not incrementing since upgrade.

Hi Simon,

I am not sure if it can help but i have fixed duplicate ID issues in the past following this giude.

https://www.uyuni-project.org/uyuni-docs/uyuni/administration/tshoot-registerclones.html

Regards


On 28/09/2020 09:09, Simon Avery wrote:
> Hi Silvio
>
> Thanks for this - this does indeed look to be the core of the issue;
>
> machine1# cat /etc/machine-id
> 57dcc3a1bbed44f6a97dc4c8058eb4d3
>
> machine2# cat /etc/machine-id
> 57dcc3a1bbed44f6a97dc4c8058eb4d3
>
> I don't know the history of these machines, but cloning does seem possible.  Both machine co-existed on Spacewalk okay, but of course they used osad and rhnsd which presumably don't care about this value.
>
> Thanks to you and Robert for your help - I think I'm good to take it on from here.
>
> Regards
>
> S
>
> -----Original Message-----
> From: Silvio Moioli <moio@suse.de>
> Sent: 28 September 2020 08:34
> To: uyuni-users@opensuse.org
> Subject: [EXTERNAL EMAIL] Re: [uyuni-users] RE: Uyuni System ID: not incrementing since upgrade.
>
> On 28/09/2020 09.27, Simon Avery wrote:
>> I'm puzzled - how could both machines get the same ID?  Surely Uyuni issues it to the client during the bootstrap process?
> The machine-id is a unique identifier that comes either from hardware, or from your virtualization software, or in worst case randomly generated - but it should really be unique.
>
> Uyuni does _not_ set it, rather it uses it to determine if a client is the same of another that's already registered or not (despite possible changes in hostname, IP addresses and so on).
>
> Note that the machine-id is very different from the minion key, or the name that you see in the Uyuni Web UI!
>
> You can learn more about machine-id here:
>
> https://www.man7.org/linux/man-pages/man5/machine-id.5.html
>
> It is a requirement that any Uyuni client has a unique and fixed machine-id. Note that if you clone VMs the machine-id might be cloned as well, so you need to change it.
>
> https://www.uyuni-project.org/uyuni-docs/uyuni/administration/tshoot-r
> egisterclones.html
>
> HTH
>
> Regards,
> --
> Silvio Moioli
> SUSE Manager Development Team

--
Kind Regards,

Nicola Di Marzo
SUSE Premium Engineer

nicola.dimarzo@suse.com
+44 7973 975049
--
To unsubscribe, e-mail: uyuni-users+unsubscribe@opensuse.org
To contact the owner, e-mail: uyuni-users+owner@opensuse.org