[BlueOnyx:21934] Re: Hostname changed

Michael Stauber mstauber at blueonyx.it
Wed Apr 11 01:41:09 -05 2018


Hi Robert,

> If I try to change the hostname in the GUI, it will go
> to a blank result without error or being changed.

Outch ... that's a bit disappointing. I'd love to see /var/log/messages
at or around the time this happened.

> I went to the command line and see the vsite hostname using the 
> hostname command and changed successfully using hostnamectl.

Very well.

> My bet is that it would change back on a reboot.

If you used 'hostnamectl' there is a good chance that it might stick.
But I'd suggest you run ...

/usr/sausalito/constructor/base/system/10_addSystem.pl

... this script. That will read the current hostname and will store it
into CODB.

> GUI still reports same vsite hostname with correct IP address.

Yeah, because the 'System' Object in CODB still has the wrong "hostname"
and "domainname" set.

You could also solve this via "/usr/sausalito/bin/cceclient". Just run
it and at the prompt type:

FIND System

It will report something like this:

104 OBJECT 1
201 OK

The "1" behind "OBJECT" tells us that the 'System'-Object has the OID
#1. Yours might have a different number.

Note that reported number and take a look at the Object with this command:

GET 1

(Of course you'd substitute your OID there).

In between the other data in the 'System'-Object you can find something
like this. That's the host- and domainname that the GUI assumes for the
server:

102 DATA hostname = "server"
102 DATA domainname = "blueonyx.it"

To change that you can use the SET command:

SET 1 hostname = "new-hostname" domainname = "new-domainname.com"

Again substitute the correct OID for your 'System'-Object.

But like said: If you already used hostnamectl to set the hostname, it
might be easier to just run
/usr/sausalito/constructor/base/system/10_addSystem.pl to update CODB
with the correct data.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list