[ovirt-users] Suggestions on changing hosts' network
Gianluca Cecchi
gianluca.cecchi at gmail.com
Mon Jan 8 16:08:58 UTC 2018
On Mon, Jan 8, 2018 at 12:57 PM, Edward Haas <ehaas at redhat.com> wrote:
>
>>>
>>
>> hello,
>> any update on how to give JSON representation (or other way) to use
>> vdsm-client and change ip/gateway of ovirt-ng node?
>> Thanks
>>
>
> How to use vdsm-client in general: Just check its man page.
> You will need to fill up the existing management network details in the
> json format, replacing just the IP address.
> The main concern here is, that if you missed something, it may be removed.
> You should follow https://access.redhat.com/solutions/168983 for full
> details.
>
> I would suggest using a different approach, although I have not tested it
> myself:
> Edit the persisted relevant configuration files: /var/lib/vdsm/persistence/
> netconf
> (Change the IP there, without touching the other stuff)
> Then, reboot the host.. It should identify that the existing config is not
> in sync with the persisted one and a reconfig will be issued automatically.
> The risk here is that the config will not successfully get applied, so
> make sure you save the previous version.
>
> Thanks,
> Edy.
>
>
Actually I see some misalignment between what I see in man page, what I get
with "-h" option and real command usage.
Eg in oVirt 4.1.7 (vdsm-client-4.19.37-1.el7.centos.noarch):
man vdsm-client
"
Invoking commands with complex parameters
For invoking commands with complex or many arguments, you can read a
JSON dictionary from a file:
vdsm-client Lease info -f lease.json
where lease.json file content is:
{
"lease": {
"sd_id": "75ab40e3-06b1-4a54-a825-2df7a40b93b2",
"lease_id": "b3f6fa00-b315-4ad4-8108-f73da817b5c5"
}
}
"
But actually if I create a json file and execute
[root at ovirtng4101 ~]# vdsm-client Host setupNetworks -f network.json
I get:
usage: vdsm-client [-h] [-a HOST] [-p PORT] [--unsecure] [--insecure]
[--timeout TIMEOUT] [-f FILE]
namespace method [arg=value] ...
vdsm-client: error: unrecognized arguments: -f
I have to try it in 4.1.8 if solved
The workaround to change in place the file (in my case ipaddr and gateway
fileds):
/var/lib/vdsm/persistence/netconf.1515365150707441369/nets/ovirtmgmt
and then shutdown/power on seems to work ok instead. I can reinstall the
host and the change remains persistent across reboots
Thanks for the pointer for RHEV doc, because I didn't find it at first
glance and I have to do the same for a RHEV eval too; but it seems the
problem is present also there with RHV-H installed in December (nodectl
info reports that current layer is rhvh-4.1-0.20171101.0+1; probably the
problem has been already solved, I have to check). I can give more details
on this off-list if you like as this doesn't directly relate with oVirt.
Thanks in the mean time for the persistence file method that I think/hope
will work for RHV-H too if I don't update the image
Gianluca
PS: ok also for the "not officially supported." advise. This is only a test
where two hosts are to be moved from datacenter 1 to datacenter 2...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180108/0192bfa5/attachment.html>
More information about the Users
mailing list