<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Gianluca,<div class=""><br class=""></div><div class="">I forgot to mention that you need to ensure that systemd knows that the new file exists. You should likely run `systemctl&nbsp;daemon-reload` after creating/modifying your custom systemd files. You can see that the After directive is combined from both files. Check it out by running `systemctl show vdsmd.service | grep After`</div><div class=""><br class=""></div><div class="">It makes sense to make further changes to ensure that NFS stops last, but I haven't looked into that yet.</div><div class="">:-)<br class=""><div class="">
<div id="signature" class=""><br class="">Cheers,<br class="">Gervais<br class=""><br class=""><br class=""></div>

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