Bug #21965
closedrake tasks are getting executed multiple times on yum update with plugins
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1524417
Foreman, as well as each plugin, run some rake tasks, such as db:migrate
or apipie:cache:index
in the posttrans. This means multiple such calls during the yum update
session.
The solution might be:
1. in %postrans, every affected rake run would create some mark that it was run. The subsequent rake runs would notice this and would skip it's call again
2. in %pretrans, we would clear the marks from previous run to allow the posttrans to be run in case of the new update session
The mark could be achieved by a simple file, that would contain all the rake calls that were already run during the update.
Updated by Evgeni Golov almost 6 years ago
- Subject changed from rake tasks are getting executed multiple times on yum update with plugins to rake tasks are getting executed multiple times on yum update with plugins
I think RPM triggers would be better suited here. http://ftp.rpm.org/api/4.4.2.2/triggers.html
Updated by Eric Helms over 4 years ago
- Blocked by Feature #28791: Drop database actions from RPM posttrans added