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