Fix the checkPGs cronjob

Currently the cronjob is broken due to syntax and
permission issues.

Additionally move the cronjob from once a month to
every 15 minutes, and automatically disable the job
unless explicitly enabled.

Change-Id: Id72bdb286c805ccb0ea4e9fcf65fabca94a180dd
This commit is contained in:
Matthew Heler 2018-11-01 14:33:45 -05:00
parent fca344900f
commit e1c82f3465
4 changed files with 12 additions and 4 deletions

View File

@ -29,10 +29,12 @@ rules:
- "" - ""
resources: resources:
- pods - pods
- pods/exec
verbs: verbs:
- get - get
- list - list
- watch - watch
- create
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding kind: RoleBinding
@ -82,7 +84,7 @@ spec:
fieldPath: metadata.namespace fieldPath: metadata.namespace
command: command:
- /tmp/utils-checkPGs.sh - /tmp/utils-checkPGs.sh
volumeMounts: volumeMounts:
- name: ceph-mon-bin - name: ceph-mon-bin
mountPath: /tmp/utils-checkPGs.py mountPath: /tmp/utils-checkPGs.py
subPath: utils-checkPGs.py subPath: utils-checkPGs.py

View File

@ -107,8 +107,8 @@ network:
jobs: jobs:
pool_checkPGs: pool_checkPGs:
# Execute monthly on the 1st at 00:01 AM # Execute every 15 minutes
cron: "1 0 1 * *" cron: "*/15 * * * *"
history: history:
# Number of successful job to keep # Number of successful job to keep
successJob: 1 successJob: 1
@ -294,4 +294,4 @@ manifests:
service_mon: true service_mon: true
service_mon_discovery: true service_mon_discovery: true
job_storage_admin_keys: true job_storage_admin_keys: true
cronjob_checkPGs: true cronjob_checkPGs: false

View File

@ -74,6 +74,9 @@ conf:
journal: journal:
type: directory type: directory
location: /var/lib/openstack-helm/ceph/osd/journal-one location: /var/lib/openstack-helm/ceph/osd/journal-one
manifests:
cronjob_checkPGs: true
EOF EOF
for CHART in ceph-mon ceph-osd ceph-client ceph-provisioners; do for CHART in ceph-mon ceph-osd ceph-client ceph-provisioners; do

View File

@ -172,6 +172,9 @@ pod:
mds: 1 mds: 1
mgr: 1 mgr: 1
rgw: 1 rgw: 1
manifests:
cronjob_checkPGs: true
EOF EOF
for CHART in ceph-mon ceph-osd ceph-client ceph-provisioners; do for CHART in ceph-mon ceph-osd ceph-client ceph-provisioners; do