Bug 1619575 - ceilometer-expirer cron job does not run correctly [osp10]
Summary: ceilometer-expirer cron job does not run correctly [osp10]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: puppet-tripleo
Version: 10.0 (Newton)
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
: 10.0 (Newton)
Assignee: Mehdi ABAAKOUK
QA Contact: Nataf Sharabi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-21 08:36 UTC by Cyril Lopez
Modified: 2022-06-23 17:22 UTC (History)
11 users (show)

Fixed In Version: puppet-tripleo-5.6.8-21.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-30 16:58:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 599421 0 'None' MERGED ceilometer: escape % in crontab 2021-01-18 16:29:51 UTC
Red Hat Issue Tracker OSP-11567 0 None None None 2021-12-10 17:13:01 UTC
Red Hat Product Errata RHBA-2019:0921 0 None None None 2019-04-30 16:59:10 UTC

Description Cyril Lopez 2018-08-21 08:36:47 UTC
Description of problem:

crontab ceilometer-expirer doesn't work.

Version-Release number of selected component (if applicable):
OSP10


Steps to Reproduce:
1. install osp10
2. wait n+24 hours
3. have a look on Cron daemon email on ceilometer user.

Actual results:

From: "(Cron Daemon)" <ceilometer@xxxxxx>
To: ceilometer@xxxx
Subject: Cron <ceilometer@xxxx> sleep $(($(od -A n -t d -N 3 /dev/urandom) 
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <XDG_SESSION_ID=138388>
X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/166>
X-Cron-Env: <LANG=en_US.UTF-8>
X-Cron-Env: <PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/var/lib/ceilometer>
X-Cron-Env: <LOGNAME=ceilometer>
X-Cron-Env: <USER=ceilometer>
Message-Id: <20180821000101.5B079141080@xx>
Date: Tue, 21 Aug 2018 00:01:01 +0000 (UTC)

/bin/sh: -c: line 0: unexpected EOF while looking for matching `)'
/bin/sh: -c: line 1: syntax error: unexpected end of file


Expected results:
Nothing

Additional info:

The crontab installed is 
1 0 * * * sleep $(($(od -A n -t d -N 3 /dev/urandom) % 86400)) && ceilometer-expirer

From here https://access.redhat.com/solutions/2497621 we suppose to get this

1 0 * * * sleep $(($(od -A n -t d -N 3 /dev/urandom) \% 86400)) && ceilometer-expirer


https://github.com/openstack/puppet-tripleo/blob/newton-eol/manifests/profile/base/ceilometer/expirer.pp#L34

Comment 2 Mehdi ABAAKOUK 2018-10-15 10:07:44 UTC
In the puppet file you must add two "/"

The fix is in review: https://review.openstack.org/#/c/599421/

You can looks here for the exact change: https://review.openstack.org/#/c/599421/5/manifests/profile/base/ceilometer/expirer.pp

Comment 12 Nataf Sharabi 2019-04-24 09:07:53 UTC
Hi,

I've installed OSP10 2019-04-18.1 & 
waited for approx. 36 hours.

# virsh list
 Id    Name                           State
----------------------------------------------------
 2     undercloud-0                   running
 8     compute-0                      running
 9     controller-0                   running


root@undercloud-0 spool]# ls -lah /var/spool/mail/
total 4.0K
drwxrwxr-x.  2 root        mail   79 Apr 24 03:23 .
drwxr-xr-x. 10 root        root  108 Apr 22 07:49 ..
-rw-rw----.  1 cloud-user  mail    0 Apr 22 07:39 cloud-user
-rw-------.  1 root        mail 2.1K Apr 24 03:23 root
-rw-rw----.  1 rpc         mail    0 Oct 10  2018 rpc
-rw-rw----.  1 stack       mail    0 Apr 22 07:40 stack
-rw-rw----.  1 validations mail    0 Apr 22 07:56 validations

There is no ceilometer file!!!

Comment 14 errata-xmlrpc 2019-04-30 16:58:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0921


Note You need to log in before you can comment on or make changes to this bug.