[ovirt-users] Duplicate host_id after deployment via GUI, how is the hosted engine host_id selected?

Martin Sivak msivak at redhat.com
Tue Apr 24 08:01:15 UTC 2018


Hi Thomas,

I posted https://gerrit.ovirt.org/#/c/90549/ in an attempt to see how
to improve the clarity. The result is in the attachment.

The ID is still different, but the section header shows the hostname
as well. Do you think it would be enough for you? We can't expect
people to touch the DB every time they add a host out of order and the
SPM ID is not selectable by user, because it needs to fit some storage
constraints (we use it for protecting storage metadata) and must match
the hosted engine ID now.

Best regards

Martin Sivak

On Mon, Apr 23, 2018 at 2:47 PM, Thomas Klute <klute at ingenit.com> wrote:
> Hi Martin,
>
> I fully understand.
> The only reason is that it's not only me administering this oVirt setup,
> it's a setup for a client that has 2 local administrators.
> We are trying to eliminate any configuration that might cause confusion.
> When doing a
>
> hosted-engine --vm-status
>
> a list like this is shown:
>
> --== Host 1 status ==--
> ...
> Hostname                           : ovirt1.munk.de
> Host ID                            : 1
> ...
>
> --== Host 2 status ==--
> ...
> Hostname                           : ovirt3.munk.de
> Host ID                            : 2
> ...
>
> and so on.
> This "Host 2" -> ovirt3 will sooner or later cause confusion and will
> lead to administrative actions applied to the wrong hosts.
>
> I'll give it a try and try to align the hosts and ids. I'll backup the
> old values in order to be able to roll back the changes if it does not work.
>
> Thanks for your help!!
> Best regards,
>  Thomas
>
>
>
>> Hi Thomas,
>>
>> is there a real need to have them aligned? Both SPM ID and Hosted
>> engine ids are quite hidden and accompanied by hostname where visible.
>>
>> I understand the urge to have everything neatly organized, but playing
>> with hosted engine IDs and SPM IDs will bring you nothing but trouble.
>>
>> Theoretically you could put all hosts to maintenance, hosted engine to
>> global maintenance, stop the engine service and update the DB and
>> hosted engine config files. Changing anything when active is a big
>> NO-NO. And I can't promise stability even if you stop everything
>> first.
>>
>> The short version: Please change hosted engine ID to match SPM ID
>> (/etc/ovirt-hosted-engine/hosted-engine.conf) and ignore the hostname
>> vs ID mismatch. All other options might cost you..
>>
>> Best regards
>>
>> --
>> Martin Sivak
>> SLA / oVirt
>>
>> On Mon, Apr 23, 2018 at 2:26 PM, Thomas Klute <klute at ingenit.com> wrote:
>>> Dear Simone,
>>>
>>> thanks for the help, I already have noticed, that there is a mismatch
>>> between SPM IDs and the hosts.
>>> From my knowledge this may be our fault.
>>>
>>>  vds_name | vds_spm_id
>>>  oVirt4   |          3
>>>  oVirt2   |          4
>>>  oVirt6   |          6
>>>  oVirt5   |          5
>>>  oVirt1   |          1
>>>  oVirt3   |          2
>>>
>>> oVirt3 was re-installed using the node ng image - and was assigned id 2 that
>>> was available at that time (taken into account this database query).
>>> It was not available in fact because of the host ovirt2 having the host_id=2
>>> entry in the configuration on the host and the sanlock having locked the
>>> appropriate space.
>>>
>>> I can't remember where this mismatch came from but I assume that some time
>>> ago someone maybe manually changed the entry on oVirt2 host in order to
>>> match with the hostname (oVirtX -> Host id X).
>>> Thus I think it is not a bug at the moment.
>>>
>>> But that leads me to the next question:
>>>
>>> Is there a manual way to align numbers in the hostnames with the SPM IDs?
>>> (oVirt4 should be spm id 4)
>>>
>>> Does this work? Update the database, change the entry in hosted-engine.conf
>>> and then reboot the node?
>>>
>>> Thanks & best regards,
>>> Thomas
>>>
>>>
>>>
>>>
>>> On Mon, Apr 23, 2018 at 1:04 PM, Martin Sivak <msivak at redhat.com> wrote:
>>>> Hello,
>>>>
>>>> the ID should be coming from the SPM ID of the host as assigned by the
>>>> engine and duplicates should not be happening indeed.
>>>>
>>>> Can you please tell us what version of engine you have and how was
>>>> first hosted engine node deployed? We recently changed the default
>>>> deployment method (4.2.2 in fact) and we would like to know whether
>>>> this might be related to that change or not.
>>>>
>>>> Simone, do you know how to debug this? Are there logs we could use to
>>>> check the behavior? The host-deploy logs maybe?
>>>
>>> Thomas,
>>> can you please share the output of
>>>   sudo -u postgres scl enable rh-postgresql95 -- psql -d engine -c "select
>>> vds_id, vds_name, vds_spm_id from vds"
>>> executed on the engine VM
>>>
>>> and the content of /var/log/ovirt-engine/host-deploy (still from the engine
>>> VM)?
>>>
>>>>
>>>> Best regards
>>>>
>>>> --
>>>> Martin Sivak
>>>> SLA / oVirt
>>>>
>>>> On Mon, Apr 23, 2018 at 12:54 PM, Thomas Klute <klute at ingenit.com> wrote:
>>>>> Dear oVirt Users,
>>>>>
>>>>> we installed a third ovirt node using the ovirt node ng image (4.2.2),
>>>>> and
>>>>> added that node using the web interface of the hosted engine:
>>>>>
>>>>> Compute->Hosts->New - including the Hosted engine option "Choose hosted
>>>>> engine deployment action" set to "Deploy"
>>>>>
>>>>> After that we found out, that on the new node the host_id entry was
>>>>> causing
>>>>> problems. In
>>>>>
>>>>> /etc/ovirt-hosted-engine/hosted-engine.conf
>>>>>
>>>>> we found the entry
>>>>>
>>>>> ...
>>>>> host_id=2
>>>>> ...
>>>>>
>>>>> But that host id already exists and was alive during deployment process.
>>>>> So my questions are:
>>>>>
>>>>> How is the host id chosen (when adding a new host via GUI)?
>>>>> Is there an option to preselect the host id in the GUI for a new node?
>>>>> How can we prevent further duplicate host ids?
>>>>>
>>>>> Thanks and best regards,
>>>>> Thomas
>>>>>
>>>>>
>>>>> --
>>>>> ________________________________________________________________________
>>>>>
>>>>>  Dipl.-Inform. Thomas Klute                           klute at ingenit.com
>>>>>  Geschäftsführer / CEO
>>>>>  ----------------------------------------------------------------------
>>>>>  ingenit GmbH & Co. KG                       Tel. +49 (0)231 58 698-120
>>>>>  Emil-Figge-Strasse 76-80                    Fax. +49 (0)231 58 698-121
>>>>>  D-44227 Dortmund                                       www.ingenit.com
>>>>>
>>>>>  Registergericht: Amtsgericht Dortmund, HRA 13 914
>>>>>  Gesellschafter : Thomas Klute, Marc-Christian Schröer
>>>>> ________________________________________________________________________
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at ovirt.org
>>>>> http://lists.ovirt.org/mailman/listinfo/users
>>>>>
>>>
>>>
>>> Sollten noch Fragen offen sein, stehen wir Ihnen natürlich jederzeit
>>> gerne zur Verfügung.
>>>
>>> Mit Grüßen aus Dortmund,
>>>  Thomas Klute
>>>
>>> --
>>> ________________________________________________________________________
>>>
>>>  Dipl.-Inform. Thomas Klute                           klute at ingenit.com
>>>  Geschäftsführer / CEO
>>>  ----------------------------------------------------------------------
>>>  ingenit GmbH & Co. KG                       Tel. +49 (0)231 58 698-120
>>>  Emil-Figge-Strasse 76-80                    Fax. +49 (0)231 58 698-121
>>>  D-44227 Dortmund                                       www.ingenit.com
>>>
>>>  Registergericht: Amtsgericht Dortmund, HRA 13 914
>>>  Gesellschafter : Thomas Klute, Marc-Christian Schröer
>>> ________________________________________________________________________
>>
>
> Sollten noch Fragen offen sein, stehen wir Ihnen natürlich jederzeit
> gerne zur Verfügung.
>
> Mit Grüßen aus Dortmund,
>  Thomas Klute
>
> --
> ________________________________________________________________________
>
>  Dipl.-Inform. Thomas Klute                           klute at ingenit.com
>  Geschäftsführer / CEO
>  ----------------------------------------------------------------------
>  ingenit GmbH & Co. KG                       Tel. +49 (0)231 58 698-120
>  Emil-Figge-Strasse 76-80                    Fax. +49 (0)231 58 698-121
>  D-44227 Dortmund                                       www.ingenit.com
>
>  Registergericht: Amtsgericht Dortmund, HRA 13 914
>  Gesellschafter : Thomas Klute, Marc-Christian Schröer
> ________________________________________________________________________
>
-------------- next part --------------
[root at dev-13 ~]# hosted-engine --vm-status


--== Host dev-03.****.***.***.***.******.com (id: 1) status ==--

conf_on_shared_storage             : True
Status up-to-date                  : True
Hostname                           : dev-03.****.***.***.***.******.com
Host ID                            : 1
Engine status                      : {"health": "good", "vm": "up", "detail": "Up"}
Score                              : 3400
stopped                            : False
Local maintenance                  : False
crc32                              : b5b8dbee
local_conf_timestamp               : 5246546
Host timestamp                     : 5246532
Extra metadata (valid at timestamp):
	metadata_parse_version=1
	metadata_feature_version=1
	timestamp=5246532 (Tue Apr 24 09:29:59 2018)
	host-id=1
	score=3400
	vm_conf_refresh_time=5246546 (Tue Apr 24 09:30:13 2018)
	conf_on_shared_storage=True
	maintenance=False
	state=EngineUp
	stopped=False


--== Host dev-13.****.***.***.***.******.com (id: 2) status ==--

conf_on_shared_storage             : True
Status up-to-date                  : True
Hostname                           : dev-13.****.***.***.***.******.com
Host ID                            : 2
Engine status                      : {"reason": "vm not running on this host", "health": "bad", "vm": "down", "detail": "unknown"}
Score                              : 3400
stopped                            : False
Local maintenance                  : False
crc32                              : 04c648ff
local_conf_timestamp               : 1017701
Host timestamp                     : 1017700
Extra metadata (valid at timestamp):
	metadata_parse_version=1
	metadata_feature_version=1
	timestamp=1017700 (Tue Apr 24 09:30:21 2018)
	host-id=2
	score=3400
	vm_conf_refresh_time=1017701 (Tue Apr 24 09:30:22 2018)
	conf_on_shared_storage=True
	maintenance=False
	state=EngineDown
	stopped=False

[root at dev-13 ~]# 


More information about the Users mailing list