PDA

View Full Version : SLES-Other When does RMT Update its Database?



rich_hanley
19-Jul-2019, 01:08
Hi there,

I'm just learning RMT and I've got a question on how it updates information contained in the systems and hw_infos tables. I've got an RMT Server running on SLES 15 SP1 and the client I'm registering is a SLES 12 SP4 box.

I install the 12 SP4 OS and on the registration installation screen I select to register the products against my local RMT Server (FQDN: nsi-rmt.netsysint.net). But I neglected to use the "Network Connection" button to define the hostname I wanted (which was supposed to be sles12sp4-rmt.netsysint.net). So the installation completes successfully, the 12 SP4 box is registered with the RMT Server, and when I look in YaST under "Software Repositories" I see all the repos with a URL of https://nsi-rmt.netsysint.net<something>.

So everything appears fine except the host name is linux-<something>. I change the hostname to sles12sp4-rmt.netsysint.net, reboot the box, and wait about 30 minutes.

I use the
mysql -u root -p rmt command to connect to the RMT Server's database and run
select * from systems; What I see for a hostname is "install" not "sles12sp4-rmt.netsysint.net".

After more reboots of the SLES 12 SP4 box and more waiting, the RMT Database never reflected the change in the hostname. I finally had to use the
SUSEConnect --url https://nsi-rmt.netsysint.net/ command to re-register the SLES 12 SP4 box with the RMT Server. But when I query the hw_infos table there are two rows that have the exact same uuid; and in the systems table there is still a record for the "install" hostname along with one for the new sles12sp4-rmt registration event.

My questions are as follows:

Is there some RMT client-side code that should run at boot-up to send updated information to the RMT Server? If so what is it?
How often does the RMT server code update / clean-up the rmt database?
And - will RMT ever delete the record information for the "install" hostname or does that have to be cleaned up manually by directly connecting to the database?


Thanks for any insight!

Rich...

malcolmlewis
19-Jul-2019, 01:51
Hi there,

I'm just learning RMT and I've got a question on how it updates information contained in the systems and hw_infos tables. I've got an RMT Server running on SLES 15 SP1 and the client I'm registering is a SLES 12 SP4 box.

I install the 12 SP4 OS and on the registration installation screen I select to register the products against my local RMT Server (FQDN: nsi-rmt.netsysint.net). But I neglected to use the "Network Connection" button to define the hostname I wanted (which was supposed to be sles12sp4-rmt.netsysint.net). So the installation completes successfully, the 12 SP4 box is registered with the RMT Server, and when I look in YaST under "Software Repositories" I see all the repos with a URL of https://nsi-rmt.netsysint.net<something>.

So everything appears fine except the host name is linux-<something>. I change the hostname to sles12sp4-rmt.netsysint.net, reboot the box, and wait about 30 minutes.

I use the
mysql -u root -p rmt command to connect to the RMT Server's database and run
select * from systems; What I see for a hostname is "install" not "sles12sp4-rmt.netsysint.net".

After more reboots of the SLES 12 SP4 box and more waiting, the RMT Database never reflected the change in the hostname. I finally had to use the
SUSEConnect --url https://nsi-rmt.netsysint.net/ command to re-register the SLES 12 SP4 box with the RMT Server. But when I query the hw_infos table there are two rows that have the exact same uuid; and in the systems table there is still a record for the "install" hostname along with one for the new sles12sp4-rmt registration event.

My questions are as follows:

Is there some RMT client-side code that should run at boot-up to send updated information to the RMT Server? If so what is it?
How often does the RMT server code update / clean-up the rmt database?
And - will RMT ever delete the record information for the "install" hostname or does that have to be cleaned up manually by directly connecting to the database?


Thanks for any insight!

Rich...
Hi
With SUSEConnect, you should be able to delete the data (-d) and then run a cleanup on the client with the --cleanup option, then re-register with the new hostname.

ikapelyukhin
25-Jul-2019, 14:55
Hello, Rich.



After more reboots of the SLES 12 SP4 box and more waiting, the RMT Database never reflected the change in the hostname. I finally had to use the
SUSEConnect --url https://nsi-rmt.netsysint.net/ command to re-register the SLES 12 SP4 box with the RMT Server. But when I query the hw_infos table there are two rows that have the exact same uuid; and in the systems table there is still a record for the "install" hostname along with one for the new sles12sp4-rmt registration event.


In order to update the hostname, change it on the client system and run SUSEConnect command without any parameters. The following message will be displayed:


Updating system details on http://your.rmt.server ...

...and hostname will be updated in RMT DB.



My questions are as follows:

Is there some RMT client-side code that should run at boot-up to send updated information to the RMT Server? If so what is it?
How often does the RMT server code update / clean-up the rmt database?
And - will RMT ever delete the record information for the "install" hostname or does that have to be cleaned up manually by directly connecting to the database?




No code is executed automatically on client instances (unless you automate it yourself, that is), all operations related to registration, de-registration or migration of client systems are done manually with SUSEConnect.
Registration data is never removed from RMT database unless you manually de-register the client system with SUSEConnect --de-register command. Removal of systems from RMT side has been requested/discussed, but it hasn't been implemented yet: https://github.com/SUSE/rmt/issues/434


HTH, Ivan.