Simone Tiraboschi has posted comments on this change. Change subject: loading broker.conf and vm.conf from the shared storage ......................................................................
Patch Set 20: > -1 just because I need one answer, otherwise it looks good. > > I wonder what will happen when the whole datacenter goes down > (power outage) and up (in random order - hosted engine tries to > start before storage). Won't the missing config (/var/run) cause > issues? I originally wanted to use /var/lib. We basically have 3 involved conf files here: 1. hosted-engine.conf 2. vm.conf 3. broker.conf hosted-engine includes the storage connection parameters and so it must be on the local file system of each host in order to allow it mounting the shared storage so it's under /etc/ovirt-hosted-engine/, no alternatives there. vm.conf includes dynamic VM parameters (sooner or later we will be able to edit it - directly or converting back from OVF - from the web UI); the master copy is on the shared storage and than we have a local cache copy under /var/ but with have to carefully refresh it. With this path I'm refreshing it in: - start_monitoring https://gerrit.ovirt.org/#/c/42209/20/ovirt_hosted_engine_ha/agent/hosted_engine.py@368 - start_engine_vm https://gerrit.ovirt.org/#/c/42209/20/ovirt_hosted_engine_ha/agent/hosted_engine.py@983 I preferred avoiding storing vm.conf under /var/lib to be sure that it's always using a fresher one under /var/run after a reboot. As you pointed out there is a possible problematic condition when after a general power outage the host is already up while the shared storage it's not: on boot the agent tries to restart 10 times before giving up, so it could give up if the storage doesn't come up in time (restarting the agent service will be enough to recover) cause it's not able to find vm.conf. By the way it would probably be the same if it has a local vm.conf copy under /var/lib but it's not able to get sanlock status cause the shared storage is not up and it will also not be able to start the VM till the shared storage comes up. So, for this, I don't see any advantages storing vm.conf under /var/lib instead of /var/run while I see possible drawbacks taking the wrong decision based on old copy not up-to-date local copy of vm.conf. The simplest solution to that on my opinion is raising the restart attempt limit or raising the time between each attempt in order to have it waiting more for the storage. broker.conf is a bit different cause it's really important to be able to send notification also if the shared storage doesn't come up and so having a permanent copy under /var/lib makes a lot of sense. The location of vm.conf is specified here: https://gerrit.ovirt.org/#/c/42234/8/src/ovirt_hosted_engine_setup/constants.py@145 the broker and the agent after this this patch simply reads it from hosted-engine.conf -- To view, visit https://gerrit.ovirt.org/42209 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia6a1a6213834f9c8b97834ebd95456fac2ca224d Gerrit-PatchSet: 20 Gerrit-Project: ovirt-hosted-engine-ha Gerrit-Branch: master Gerrit-Owner: Simone Tiraboschi <stira...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Lev Veyde <lve...@redhat.com> Gerrit-Reviewer: Martin Sivák <msi...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Simone Tiraboschi <stira...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches