59 Commits

Author SHA1 Message Date
Sean Eagan
b1a247e7f5 Helm 3 - Fix Job labels
If labels are not specified on a Job, kubernetes defaults them
to include the labels of their underlying Pod template. Helm 3
injects metadata into all resources [0] including a
`app.kubernetes.io/managed-by: Helm` label. Thus when kubernetes
sees a Job's labels they are no longer empty and thus do not get
defaulted to the underlying Pod template's labels. This is a
problem since Job labels are depended on by
- Armada pre-upgrade delete hooks
- Armada wait logic configurations
- kubernetes-entrypoint dependencies

Thus for each Job template this adds labels matching the
underlying Pod template to retain the same labels that were
present with Helm 2.

[0]: https://github.com/helm/helm/pull/7649

Change-Id: I3b6b25fcc6a1af4d56f3e2b335615074e2f04b6d
2021-09-30 16:01:31 -05:00
Parsons, Cliff (cp769u)
a0aec27ebc Fix Ceph checkDNS script
The checkDNS script which is run inside the ceph-mon pods has had
a bug for a while now. If a value of "up" is passed in, it adds
brackets around it, but then doesn't check for the brackets when
checking for a value of "up". This causes a value of "{up}" to be
written into the ceph.conf for the mon_host line and that causes
the mon_host to not be able to respond to ceph/rbd commands. Its
normally not a problem if DNS is working, but if DNS stops working
this can happen.

This patch changes the comparison to look for "{up}" instead of
"up" in three different files, which should fix the problem.

Change-Id: I89cf07b28ad8e0e529646977a0a36dd2df48966d
2021-08-25 14:17:54 +00:00
DeJaeger, Darren (dd118r)
f26d4db145 Update mon-check with latest monmap outputs
This PS updates the mon-check reap-zombies python script to consider
the more recent Ceph changes, including the fact that there is now
a v1 and v2 backend. In addition, it executes the reap-zombies script
with the python3 binary, as the basic 'python' binary does not exist
in the container.

Change-Id: Id079671f03cc5ddbe694f2aa8c9d2480dc573983
2021-08-02 13:16:39 +00:00
Stephen Taylor
07ceecd8d7 Export crash dumps when Ceph daemons crash
This change configures Ceph daemon pods so that
/var/lib/ceph/crash maps to a hostPath location that persists
when the pod restarts. This will allow for post-mortem examination
of crash dumps to attempt to understand why daemons have crashed.

Change-Id: I53277848f79a405b0809e0e3f19d90bbb80f3df8
2021-06-30 14:24:15 -06:00
Samuel Liu
0f1974f1c0 Remove deprecated svc annotation tolerate-unready-endpoints
Since k8s v1.11+, the annotation `service.alpha.kubernetes.io/tolerate-unready-endpoints` is deprecated.  we should use Service.spec.publishNotReadyAddresses instead.

Change-Id: Ic4f82b8e78770ff29637937c4bcb9af71b53f8d3
2021-05-11 07:10:10 +00:00
Chinasubbareddy Mallavarapu
4eee89ccba [ceph-mon] Fix python3 issue for util scripts
This is to update python3 for checkObjectReplication.py script
since python2 got removed from ceph images.

Change-Id: I006a4becaeefb2a0cbef6f5d1fb56c7fc40b0170
2021-05-05 14:17:45 +00:00
Kabanov, Dmitrii
cda359ef1f [Ceph] Add Ceph CSI plugin
The PS adds Ceph CSI plugin (RBD only)

Change-Id: I3ddc69e49d12ff178263f38ac10aff90bb82b902
2021-03-09 16:54:45 +00:00
Chinasubbareddy Mallavarapu
da289c78cb [CEPH] Uplift from Nautilus to Octopus release
This is to uplift ceph charts from 14.X release to 15.X

Change-Id: I4f7913967185dd52d4301c218450cfad9d0e2b2b
2021-02-03 22:34:53 +00:00
Ritchie, Frank (fr801x)
75a115ea29 Run mon container as ceph user
This PS is to address security best practices concerning running
containers as a non-privileged user and disallowing privilege
escalation.

Change-Id: If4c0e9fe446091ba75d1a9818ffd3a0933285af4
2021-01-26 20:14:27 +00:00
Frank Ritchie
9b1ac0ffcb Enable shareProcessNamespace in mon daemonset
This is to address zombie processes found in ceph-mon containers due
to the mon-check.sh monitoring script. With shareProcessNamespace the
/pause container will properly handle the defunct processes.

Change-Id: Ic111fd28b517f4c9b59ab23626753e9c73db1b1b
2020-12-11 11:57:39 -05:00
diwakar thyagaraj
5d50433362 Enable Application Armor to all ceph key-generator pods.
1) Changed the pod name and container name to pick name dynamically for
   osd,mon,mgr and mds.

2) Added Init container for ceph-provisioners.

Change-Id: I3e27d51c055010cff982ddb0951d01ea8adac234
Signed-off-by: diwakar thyagaraj <diwakar.chitoor.thyagaraj@att.com>
2020-07-20 01:29:42 +00:00
Andrii Ostapenko
41f02d3c98
Fix service account name for ceph-mon keyring generator
Fix issues introduced by https://review.opendev.org/#/c/735648
with extra 'ceph-' in service_account and security context not
rendered for keyring generator containers.

Change-Id: Ie53b3407dbd7345d37c92c60a04f3badf735f6a6
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-07-07 15:06:23 -05:00
Andrii Ostapenko
824f168efc Undo octal-values restriction together with corresponding code
Unrestrict octal values rule since benefits of file modes readability
exceed possible issues with yaml 1.2 adoption in future k8s versions.
These issues will be addressed when/if they occur.

Also ensure osh-infra is a required project for lint job, that matters
when running job against another project.

Change-Id: Ic5e327cf40c4b09c90738baff56419a6cef132da
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-07-07 15:42:53 +00:00
Andrii Ostapenko
83e27e600c Enable key-duplicates and octal-values yamllint checks
With corresponding code changes.

Change-Id: I11cde8971b3effbb6eb2b69a7d31ecf12140434e
2020-06-17 13:14:30 -05:00
Andrii Ostapenko
dfb32ccf60 Enable yamllint rules for templates
- braces
- brackets
- colons
- commas
- comments
- comments-indentation
- document-start
- hyphens
- indentation

With corresponding code changes.

Also idempotency fix for lint script.

Change-Id: Ibe5281cbb4ad7970e92f3d1f921abb1efc89dc3b
2020-06-17 13:13:53 -05:00
KHIYANI, RAHUL (rk0850)
ddfa7a4741 Ceph-mon: Add pod/container security context
This updates the ceph-mon chart to include the pod
security context on the pod template

This also adds the container security context to set
readOnlyRootFilesystem flag to true

Change-Id: I4c9e292eaf3d76ee80f50553d1cbc8cdc6f57cac
2020-06-16 23:59:34 +00:00
Kabanov, Dmitrii
2aa6b3cf1c [Ceph] Add kubernetes tolerations for ceph deployments
The PS adds kubernetes tolerations for deployments from ceph-client,
ceph-mon, ceph-provisioners and ceph-rgw charts.

Change-Id: If96f5f2058fca6e145e537e95af39089f441ccbb
2020-05-20 19:32:06 +00:00
Gage Hugo
d14d826b26 Remove OSH Authors copyright
The current copyright refers to a non-existent group
"openstack helm authors" with often out-of-date references that
are confusing when adding a new file to the repo.

This change removes all references to this copyright by the
non-existent group and any blank lines underneath.

Change-Id: I1882738cf9757c5350a8533876fd37b5920b5235
2020-05-07 02:11:15 +00:00
diwakar thyagaraj
ccaa11b649 Enable Apparmor to ceph client bootstrap Pods
Change-Id: Ia8fd1e50a2478743f0ff625ffdd8801610f05ee1
Signed-off-by: diwakar thyagaraj <diwakar.chitoor.thyagaraj@att.com>
2020-04-29 14:43:50 +00:00
diwakar thyagaraj
fb0cd00a56 Enable Apparmor to ceph-bootstrap Pods
Change-Id: Ifa8d43a2a68fffaea554f04a5df63fb6b7ea5422
Signed-off-by: diwakar thyagaraj <diwakar.chitoor.thyagaraj@att.com>
2020-04-24 02:22:17 +00:00
Chinasubbareddy Mallavarapu
8d9b7fdd2b [ceph-mon-check] fix the command to connect correct ceph cluster
This is to fix the command to connect to the cluster name instead of
namesapce.

Change-Id: I8b8f7c10d7667245a8f6cb02fb5b69dd122099e5
2020-04-22 20:02:14 +00:00
Pete Birley
19a1fbf8f7 Ceph: Dont mount log directories to host
This PS updates the bind mounts for ceph logs directorys to be
emptydirs. This ensures we do not polute the hosts permanantly
with ceph logs, which should be directed to stdout.

Change-Id: I6d72c0864b9ecc493cd62564e0e0450d90cfcf00
Signed-off-by: Pete Birley <pete@port.direct>
2020-04-07 18:05:04 +00:00
Chinasubbareddy Mallavarapu
f098f760f0 [ceph-mon] update stop script not to remove mons from monmap
This is to update ceph-mon stop script  not to remove mons from
monmap as in multinode clusters three mons in the monmap are required
to handle the quorum properly.

Change-Id: I0dd643007ea0558244bfecae1d90db78828e9834
2020-03-09 20:11:23 +00:00
Chinasubbareddy Mallavarapu
7425e3e5c0 [CEPH] update all ceph daemons startup scripts to support msgr2
This is to update all ceph daemons startup scripts as per msgr2 protocol and
also to update v2 port for mon_host config.
This also removes setting mon_addr config since we already have mon_host config.

v1 default port: 6789
V2 default port: 3300

Change-Id: I3d95edbd89f5ac8b40a34f41c1099311cee4f875
2020-03-04 23:22:02 -06:00
Chinasubbareddy Mallavarapu
07c62ddfd5 [ceph-mon] Add mon hosts as per msgr2 protocol
This is to update mon_host configuration to support both v1 and v2
of messenger.

ex: mon_host = [v1:172.29.0.11:6790/0,v2:172.29.0.11:3300/0]

Change-Id: I02785ea42c07d1aecbef2cf0c32dd6a1a236659f
Signed-off-by: Pete Birley <pete@port.direct>
2020-02-27 20:36:16 +00:00
diwakar thyagaraj
344c0543fa Enable runtime Apparmor default for All Ceph Components
Change-Id: Id62fe453846ffe6ab01198177d5d8046378d61bf
Signed-off-by: diwakar thyagaraj <diwakar.chitoor.thyagaraj@att.com>
2020-02-24 15:52:11 +00:00
Zuul
75474c01b8 Merge "Address bandit gate failures" 2020-02-18 17:35:45 +00:00
Chinasubbareddy Mallavarapu
622f604cbe [Ceph-Mon] Check for ceph-mon messenger V2
This adds a new check to make sure msgr2 is enabled if it is
supported by all of the mons. When mon quorum is lost the
mons revert to the v1 protocol, which results in a Ceph
warning state if v2 is supported by all of the available
mons.

Change-Id: Ib85243d38f122c1993aba945b7ae943eed262dbf
2020-02-10 16:43:19 -06:00
Gage Hugo
86e56b2aee Address bandit gate failures
This change addresses the results that were found when running
bandit against the templated python files in the various charts.

This also makes the bandit gate only run when python template
files are changed as well as makes the job voting.

Change-Id: Ia158f5f9d6d791872568dafe8bce69575fece5aa
2020-02-04 15:33:17 -06:00
Tin Lam
c199addf3c Update apiVersion
This patch set updates and tests the apiVersion for rbac.authorization.k8s.io
from v1beta1 to v1 in preparation for its removal in k8s 1.20.

Change-Id: I4e68db1f75ff72eee55ecec93bd59c68c179c627
Signed-off-by: Tin Lam <tin@irrational.io>
2020-01-09 08:59:48 +00:00
diwakar thyagaraj
841feb7e82 Enable runtime apparmor for ceph-mon,ceph-mds & ceph-mgr.
Also changed ceph apparmor gate job.
Change-Id: I92b9a467b2a77d607dd431f031ec566cc18a86a4
2019-12-18 14:52:12 +00:00
Phil Sphicas
b4004c58bb ceph-mon fix logging when no zombie mons found
Change-Id: Ie45320bce6945cc1e3ea7ac4d6f46a1e50abf621
2019-10-08 22:42:01 +00:00
Andrii Ostapenko
fdcc9b7e0e Make all prints python3 compatible
Change-Id: Ie5a08859010453d276b42253f5f2130f80b82224
2019-10-01 01:28:35 +00:00
Daniel Pawlik
0b58aea135 Fix mon_host hosts when hostname contains 'ip'
Ceph-mon template script parse mon_host in wrong way, when
hostname contains'ip' word, e.g.: airship.

Change-Id: I0a097443d42ad2e9b6be6c61facd7932ddb4b3bb
Story: 2006255
2019-07-19 10:49:50 +00:00
Venkata, Krishna (kv988c)
ed574f456f Switch from default values being populated
for upgrade strategy for ceph components

This PS uses HelmToolKit function to add
upgrade strategy parameters to ceph Components

Change-Id: I54e71d2a52bd639b3e93fc899c1bf2cd075b5396
2019-06-18 01:42:38 +00:00
Pete Birley
656f51d8d9 Ceph: Dont attempt to reuse monmap if it exists
This PS forces the monmap to be clobbered each time the container starts
which is required to recover from ome senarios when using an emptydir
to back /etc/ceph.

Change-Id: I2cf271593591ce07435893336cff98a8b1c72166
Signed-off-by: Pete Birley <pete@port.direct>
2019-05-12 16:21:39 +00:00
RAHUL KHIYANI
a5e8953bd4 ceph-mon: Fix security context
This PS fixes the use of the security context macros for the
ceph-mon chart.

Change-Id: Ibde448481c44f2753ddfe57e590ea7d05671793a
2019-04-23 23:18:21 -05:00
Pete Birley
dece008337 Ceph: Make /etc/ceph and /run emptydirs uniformly across all pods
This PS updates the ceph charts to make /etc/ceph an emptydir
uniformly across all charts, both ensuring no default config is loaded,
and also permitting read-only filesystems to back the containers.

Additionally /run is uniformly applied across all long running pods
as a memory backed emptydir.

Change-Id: I00d1b15758b7eb4476fb950ddcb38db9a5149ad0
Signed-off-by: Pete Birley <pete@port.direct>
2019-04-21 19:06:18 +00:00
Pete Birley
2abf62ff4d OSH-Infra: Add emptydirs for tmp
This PS adds emptydirs backing the /tmp directory in pods, which
is required in most cases for full operation when using a read only
filesystem backing the container.

Additionally some yaml indent issues are resolved.

Change-Id: I8b7f1614da059783254aa6efc09facf23fca3cad
Signed-off-by: Pete Birley <pete@port.direct>
2019-04-20 20:50:59 +00:00
kranthikirang
6c45566132 ceph-mon, tenat-ceph storageclass schema
In order to align with ceph-provisioner storageclass
.Values we need to update ceph-mon .Values and tenant-
ceph scripts

Change-Id: I36fb07de9e791ac33cf0b4c38b3e4d63337d3e72
Story: storageclass schema changes
Signed-off-by: kranthi guttikonda <kranthi.guttikonda@att.com>
Signed-off-by: kranthikirang <kranthi.guttikonda@b-yond.com>
2019-04-09 22:10:23 +00:00
Steve Wilkerson
84f30ec103 Add release-annotation to pod spec, add missing annotations
This adds the release-annotation to the pod spec for the charts in
openstack-helm-infra. This also adds missing configmap annotations
to charts in openstack-helm-infra

Change-Id: Ie23f0c16a7a21d3929e98928db2bbcef69ae6490
2019-03-21 09:10:48 -05:00
Steve Taylor
65de349d58 Move ceph-mon's checkPGs cron job to ceph-client
- Move the cronjob from ceph-mon to ceph-client
- Adding ceph-rbd-pool job as dependencies for cronjob
- checkPGs manifest set to true so it will always run
in gate.

Co-Authored-By: Chinasubbareddy Mallavarapu <cr3938@att.com>,
                Renis Makadia <renis.makadia@att.com>

Change-Id: I9855d8d22265e78c7e2f5fa7ece69c9ff532ecb2
2019-03-19 20:53:08 +00:00
Pete Birley
6ea6a85198 Ceph: Update default to use OSH image
This PS udpates the default image in the chart to the latest OSH image.

Change-Id: Ib8d2a72ad48049fe02560dc4405f0088890b6f64
Signed-off-by: Pete Birley <pete@port.direct>
2019-02-01 21:25:13 +00:00
Chris Wedgwood
0c4e37391f 'NOP' cleanup for more consistent white-space use in charts
Where we have the style '{{ ...' we should use the style '... }}'.

Change-Id: Ic3e779e4681370d396f95d3804ca27db5b9d3642
2019-01-03 22:45:49 +00:00
Pete Birley
90700f5a76 Ceph: Add labels to secrets created by charts
This PS adds labels to secrets created by charts, which allows them
to be easily identified in deployed sites.

PS4: This PS resolves undefined variable "$envAll" issue

Change-Id: Icbe3584b0ac18b23e32489c4a04ad5aa7aad67e6
Signed-off-by: Pete Birley <pete@port.direct>
2018-12-06 04:15:29 +00:00
Matthew Heler
35cce6cb43 Switch Ceph to IPs when DNS is down
Add helper scripts that are called by a POD to switch
Ceph from DNS to IPs. This POD will loop every 5 minutes
to catch cases where the DNS might be unavailable.

On a POD's Service start switch ceph.conf to using IPs rather
then DNS.

Change-Id: I402199f55792ca9f5f28e436ff44d4a6ac9b7cf9
2018-12-03 10:51:37 -06:00
Matthew Heler
e1c82f3465 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
2018-11-06 19:39:23 -06:00
Steve Wilkerson
45da8c2b69 Ceph: Update log directory host mount path
This updates the ceph-mon and ceph-osd charts to use the release
name for the hostpath defined for mounting the /var/log/ceph
directories to. This gives us a mechanism for creating unique log
directories for multiple releases of the same chart without the
need for specifying an override for each deployment of that chart

Change-Id: Ie6e05b99c32f24440fbade02d59c7bb14d8aa4c8
2018-10-29 13:05:46 -05:00
Chinasubbareddy M
a1b8f394b2 ceph: make log directory configurable
this is make log directory configurable incase if  another mon or
osd running on same host can point to other directory

Change-Id: I2db6dffd45599386f8082db8f893c799d139aba3
2018-10-25 14:34:14 +00:00
Zuul
f49461acc4 Merge "cronjob-checkPGs failure fix" 2018-10-23 20:21:46 +00:00