# When does RMT Update its Database?

**URL:** <https://forums.suse.com/t/when-does-rmt-update-its-database/34192>\
**Category:** SLES Configure-Administer\
**Created:** [July 19, 2019, 3:08am UTC](https://forums.suse.com/t/when-does-rmt-update-its-database/34192 "2019-07-19T03:08:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rich\_hanley](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rich\_hanley](https://forums.suse.com/u/rich_hanley)\
**Post date:** [July 19, 2019, 3:08am UTC](https://forums.suse.com/t/when-does-rmt-update-its-database/34192/1 "2019-07-19T03:08:57Z")

</div>

Hi there,

I’m just learning RMT and I’ve got a question on how it updates information contained in the [COLOR="#008000"]systems [/COLOR]and [COLOR="#008000"]hw\_infos[/COLOR] 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: [COLOR="#008000"][nsi-rmt.netsysint.net](http://nsi-rmt.netsysint.net)[/COLOR]). But I neglected to use the “Network Connection” button to define the hostname I wanted (which was supposed to be [COLOR="#008000"][sles12sp4-rmt.netsysint.net](http://sles12sp4-rmt.netsysint.net)[/COLOR]). 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 [COLOR="#008000"][https://nsi-rmt.netsysint.net](https://nsi-rmt.netsysint.net)[/COLOR].

So everything appears fine except the host name is [COLOR="#008000"]linux-[/COLOR]. I change the hostname to [COLOR="#008000"][sles12sp4-rmt.netsysint.net](http://sles12sp4-rmt.netsysint.net)[/COLOR], 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 “[COLOR=”#008000"]install[/COLOR]" not “[COLOR=”#008000"][sles12sp4-rmt.netsysint.net](http://sles12sp4-rmt.netsysint.net)[/COLOR]".

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:  
[LIST=1]  
[_]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?  
[/LIST]

Thanks for any insight!

Rich…

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [July 19, 2019, 3:51am UTC](https://forums.suse.com/t/when-does-rmt-update-its-database/34192/2 "2019-07-19T03:51:49Z")

</div>

[QUOTE=rich\_hanley;58142]Hi there,

I’m just learning RMT and I’ve got a question on how it updates information contained in the [COLOR="#008000"]systems [/COLOR]and [COLOR="#008000"]hw\_infos[/COLOR] 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: [COLOR="#008000"][nsi-rmt.netsysint.net](http://nsi-rmt.netsysint.net)[/COLOR]). But I neglected to use the “Network Connection” button to define the hostname I wanted (which was supposed to be [COLOR="#008000"][sles12sp4-rmt.netsysint.net](http://sles12sp4-rmt.netsysint.net)[/COLOR]). 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 [COLOR="#008000"][https://nsi-rmt.netsysint.net](https://nsi-rmt.netsysint.net)[/COLOR].

So everything appears fine except the host name is [COLOR="#008000"]linux-[/COLOR]. I change the hostname to [COLOR="#008000"][sles12sp4-rmt.netsysint.net](http://sles12sp4-rmt.netsysint.net)[/COLOR], 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 “[COLOR=”#008000"]install[/COLOR]" not “[COLOR=”#008000"][sles12sp4-rmt.netsysint.net](http://sles12sp4-rmt.netsysint.net)[/COLOR]".

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:  
[LIST=1]  
[_]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?  
[/LIST]

Thanks for any insight!

Rich…[/QUOTE]  
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.

---

<div class="post-metadata">

**Author:** ![ikapelyukhin](https://avatars.discourse-cdn.com/v4/letter/i/cdc98d/32.png) [@ikapelyukhin](https://forums.suse.com/u/ikapelyukhin)\
**Post date:** [July 25, 2019, 4:55pm UTC](https://forums.suse.com/t/when-does-rmt-update-its-database/34192/3 "2019-07-25T16:55:41Z")

</div>

Hello, Rich.

> [@rich\_hanley;58142](#):
>
> 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:

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

…and hostname will be updated in RMT DB.

> [@rich\_hanley;58142](#):
>
> My questions are as follows:  
> [LIST=1]  
> [_]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?  
> [/LIST]

[LIST]  
[_]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](https://github.com/SUSE/rmt/issues/434)  
[/LIST]

HTH, Ivan.
