Project

General

Profile

Bug #21965

rake tasks are getting executed multiple times on yum update with plugins

Added by Ivan Necas almost 3 years ago. Updated 8 months ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

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.


Related issues

Blocked by Packaging - Feature #28791: Drop database actions from RPM posttransClosed

History

#1 Updated by Evgeni Golov almost 2 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

#2 Updated by Eric Helms 9 months ago

  • Blocked by Feature #28791: Drop database actions from RPM posttrans added

#3 Updated by Eric Helms 8 months ago

  • Status changed from New to Resolved

Also available in: Atom PDF