Description of problem: I am opening this bug because current [1], which is for bug 1169099, fails, because I added there an event SECRETS_FILTERED_FROM_SETUP_ATTRS_MODULES to run before CORE_LOG_INIT but without setting priority. A later patch [2] adds several new events to run before SECRETS_FILTERED_FROM_SETUP_ATTRS_MODULES. I'd rather not set priorities to all of these, and instead give names and set before=/after= as needed, which is much cleaner and more transparent. Priorities were added to otopi as a means to affect order of running the events quite early, and later before/after were added [3]. Some of the then-existing code that used priorities, was not changed to use before/after, and today it's a bit hard to understand the exact reasons for the priorities - as opposed to before/after, which say specifically that some event should run before or after some specific events. I am opening this bug mainly to document what I currently think/understand about this. So the following is an analysis of current state, partially a guesswork, with comments about what can/should be done. I am also documenting here the relevant code from engine's packaging/setup, from host-deploy (which is simpler - only two events), ovirt-hosted-engine-setup (only 1 event). CORE_LOG_INIT ============= is in otopi:src/plugins/otopi/core/log.py has PRIORITY_HIGH Many _BOOT events in the engine and all in host-deploy and hosted-engine-setup that have before=CORE_LOG_INIT also need to have a specific priority. Plan: - Drop priority from this and all related events - Check which events in _BOOT write to the log and either move them to _INIT or make them after=CORE_LOG_INIT CORE_CONFIG_INIT ================ is in otopi:src/plugins/otopi/core/config.py is in stage_INIT, not _BOOT sets a default CONFIG_FILE_NAME if not set yet sas PRIORITY_HIGH - 10 CONFIG_FILE_NAME is actually set by both engine and host-deploy at stage _BOOT, so no need to have priority for either for it or engine/host-deploy, as _boot runs before _init. Plan: - Drop priority from it and events setting CONFIG_FILE_NAME in engine/host-deploy otopi packagers =============== dnf has: PRIORITY_LOW yum has: PRIORITY_LOW+1 It's set so that dnf runs before yum, because if a system has both, we want dnf to be used and not yum. Plan: - Drop priority - Add a name to yum - Make dnf run before=yum otopi dialect ============= is in otopi:src/plugins/otopi/dialog/misc.py has PRIORITY_HIGH sets default dialog to be human machine and human plugins _BOOT events run at PRIORITY_MEDIUM Plan: - Remove priorities - Give misc.py a name - Run the others after it other stuff =========== otopi:src/plugins/otopi/core/misc.py PRIORITY_LOW Logs the sequence and the initial environment otopi:src/plugins/otopi/system/info.py PRIORITY_LOW Logs random system info I guess both are LOW so that they run after the log file is created. Plan: - Remove priority - Run after=CORE_LOG_INIT [1] https://gerrit.ovirt.org/#/c/79343/4 [2] https://gerrit.ovirt.org/#/c/79344/4 [3] https://gerrit.ovirt.org/11778
Could you please provide verification steps if there are any? Thank you.
(In reply to Jiri Belka from comment #1) > Could you please provide verification steps if there are any? Thank you. Comment 0 is very detailed, and IIRC the patches actually do exactly what I wrote there. Most of the stuff there would probably have been noticed already by basic sanity tests done elsewhere - e.g. log file in /tmp and not in /var, stuff like that. Feel free to review it and decide to do a few specific tests if you think they make sense. Other than that, can't think of anything specific, setting CodeChange.
ok, otopi-1.7.2-0.0.master.20170919135351.gitf2bfc9c.el7.centos.noarch ovirt-host-deploy-1.7.0-0.0.master.20170912090102.git1eeb5a2.el7.centos.noarch deploying hosts works ok
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017. Since the problem described in this bug report should be resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.