<p dir="ltr"></p>
<p dir="ltr">Il 28/Set/2016 21:09, "Gervais de Montbrun" <<a href="mailto:gervais@demontbrun.com">gervais@demontbrun.com</a>> ha scritto:<br>
><br>
> Hi Gianluca,<br>
><br>
> Instead of editing the system's built in systemd configuration, you can do the following...<br>
><br>
> Create a file called /etc/systemd/system/ovirt-ha-broker.service<br>
><br>
>> # My custom ovirt-ha-broker.service config that ensures NFS starts before ovirt-ha-broker.service<br>
>> # thanks Gervais for this tip! :-)<br>
>><br>
>> .include /usr/lib/systemd/system/ovirt-ha-broker.service<br>
>><br>
>> [Unit]<br>
>> After=nfs-server.service<br>
><br>
><br>
> Then disable and enable ovirt-ha-broker.service (systemctl disable ovirt-ha-broker.service ; systemctl enable ovirt-ha-broker.service) and you should see that it is using your customized systemd unit definition. You can see that systemd is using your file by running systemctl status ovirt-ha-broker.service. You'll see something like "Loaded: loaded (/etc/systemd/system/ovirt-ha-broker.service;" in the output.<br>
><br>
> Your file will survive updates and therefore always wait for nfs to start prior to starting. You can do the same for your other customizations.<br>
><br>
> Cheers,<br>
> Gervais<br>
><br>
><br>
><br>
>> On Sep 28, 2016, at 1:31 PM, Gianluca Cecchi <<a href="mailto:gianluca.cecchi@gmail.com">gianluca.cecchi@gmail.com</a>> wrote:<br>
>><br>
>> On Sun, Sep 4, 2016 at 10:54 AM, Yedidyah Bar David <<a href="mailto:didi@redhat.com">didi@redhat.com</a>> wrote:<br>
>>><br>
>>> On Sat, Sep 3, 2016 at 1:18 PM, Gianluca Cecchi<br>
>>> <<a href="mailto:gianluca.cecchi@gmail.com">gianluca.cecchi@gmail.com</a>> wrote:<br>
>>> > Hello,<br>
>>> > how do the two modes apply in case of single host?<br>
>>> > During an upgrade phase, after having upgraded the self hosted engine and<br>
>>> > leaving global maintenance and having checked all is ok, what is the correct<br>
>>> > mode then to put host if I want finally to update it too?<br>
>>><br>
>>> The docs say to put hosts to maintenance from the engine before upgrading them.<br>
>>><br>
>>> This is (also) so that VMs on them are migrated away to other hosts.<br>
>>><br>
>>> With a single host, you have no other hosts to migrate VMs to.<br>
>>><br>
>>> So you should do something like this:<br>
>>><br>
>>> 1. Set global maintenance (because you are going to take down the<br>
>>> engine and its vm)<br>
>>> 2. Shutdown all other VMs<br>
>>> 3. Shutdown engine vm from itself<br>
>>> At this point, you should be able to simply stop HA services. But it<br>
>>> might be cleaner to first set local maintenance. Not sure but perhaps<br>
>>> this might be required for vdsm. So:<br>
>>> 4. Set local maintenance<br>
>>> 5. Stop HA services. If setting local maintenance didn't work, perhaps<br>
>>> better stop also vdsm services. This stop should obviously happen<br>
>>> automatically by yum/rpm, but perhaps better do this manually to see<br>
>>> that it worked.<br>
>>> 6. yum (or dnf) update stuff.<br>
>>> 7. Start HA services<br>
>>> 8. Check status. I think you'll see that both local and global maint<br>
>>> are still set.<br>
>>> 9. Set maintenance to none<br>
>>> 10. Check status again - I think that after some time HA will decide<br>
>>> to start engine vm and should succeed.<br>
>>> 11. Start all other VMs.<br>
>>><br>
>>> Didn't try this myself.<br>
>>><br>
>>> Best,<br>
>>> --<br>
>>> Didi<br>
>><br>
>><br>
>> Hello Didi,<br>
>> I would like to leverage the update I have to do on 2 small different lab environments to crosscheck the steps suggested.<br>
>> They are both single host environments with self hosted engine.<br>
>> One is 4.0.2 and the other is 4.0.3. Both on CentoS 7.2<br>
>> I plan to migrate to the just released 4.0.4<br>
>><br>
>> One note: in both environments the storage is NFS and is provided by the host itself, so a corner case (for all hosted_storage domain, main data domain and iso storage domain).<br>
>> I customized the init scripts, basically for start phase of the server and to keep in count of the NFS service, but probably something has to be done for stop too?<br>
>><br>
>> 1) In /usr/lib/systemd/system/ovirt-ha-broker.service<br>
>><br>
>> added in section [Unit]<br>
>><br>
>> After=nfs-server.service<br>
>><br>
>> The file is overwritten at update so one has to keep in mind this<br>
>><br>
>> 2) also in vdsmd.service changed <br>
>> from:<br>
>> After=multipathd.service libvirtd.service iscsid.service rpcbind.service \<br>
>> supervdsmd.service sanlock.service vdsm-network.service<br>
>><br>
>> to:<br>
>> After=multipathd.service libvirtd.service iscsid.service rpcbind.service \<br>
>> supervdsmd.service sanlock.service vdsm-network.service \<br>
>> nfs-server.service<br>
>><br>
>> Do you think any order setup I have to put in place related to NFS service and oVirt services stop?<br>
>><br>
>> _______________________________________________<br>
>> Users mailing list<br>
>> <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
>> <a href="http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a><br>
><br>
></p>
<p dir="ltr">Nice! I'm going to try and see.<br>
Any particular dependency I should add for shutdown order due to the fact that my host is also the NFS server providing data stores?<br>
Do I need to set up nfs stop only after a particular ovirt related service?<br>
Thanks,<br>
Gianluca<br>
</p>