Project

General

Profile

Actions

Bug #2195

closed

Cronjobs should use bundle exec in Debian package of foreman.

Added by Taylan Develioglu over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Category:
Packaging
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The rake tasks in /etc/cron.d/foreman should use bundle exec.

--- etc/cron.d/foreman 2013-02-05 22:31:45.000000000 0100
++ etc/cron.d/foreman.bundle 2013-02-11 19:07:15.147455681 +0100
@ -5,21 +5,21 @
FOREMAN_HOME=/usr/share/foreman

  1. Clean up the session entries in the database
    -15 23 * * * foreman cd ${FOREMAN_HOME} && /usr/bin/rake db:sessions:clear
    +15 23 * * * foreman cd ${FOREMAN_HOME} && bundle exec /usr/bin/rake db:sessions:clear
  1. Send out daily summary
    -0 7 * * * foreman cd ${FOREMAN_HOME} && /usr/bin/rake reports:summarize
    +0 7 * * * foreman cd ${FOREMAN_HOME} && bundle exec /usr/bin/rake reports:summarize
  1. Expire old reports
    -30 7 * * * foreman cd ${FOREMAN_HOME} && /usr/bin/rake reports:expire
    +30 7 * * * foreman cd ${FOREMAN_HOME} && bundle exec /usr/bin/rake reports:expire
  1. Collects trends data
    -/30 * * * * foreman cd ${FOREMAN_HOME} && /usr/bin/rake trends:counter
    +
    /30 * * * * foreman cd ${FOREMAN_HOME} && bundle exec /usr/bin/rake trends:counter
  1. Only use the following cronjob if you're using stored configs!
  2. Populate hosts
    -/30 * * * * foreman cd ${FOREMAN_HOME} && /usr/bin/rake puppet:migrate:populate_hosts
    +
    /30 * * * * foreman cd ${FOREMAN_HOME} && bundle exec /usr/bin/rake puppet:migrate:populate_hosts
  1. Only uncomment the following cronjob if you're not using stored configs!
    ---EOF---

Files

bundle.diff bundle.diff 1.33 KB Taylan Develioglu, 02/11/2013 01:14 PM
Actions #1

Updated by Taylan Develioglu over 11 years ago

Redmine doesn't like pasting.

Actions #2

Updated by Greg Sutcliffe over 11 years ago

  • Assignee set to Greg Sutcliffe

You can paste, but you have to indent everything with 4 spaces (like markdown).

Thanks for reporting - I'll get this fixed...

Actions #3

Updated by Anonymous over 11 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:"2021f7207189fd70ed2be3a3b9b88b54c7445d31".

Actions

Also available in: Atom PDF