Commit Graph

46 Commits

Author SHA1 Message Date
Anselme, Schubert (sa246v) 78315ae509 Deprecating the Ingress Class Annotation
Upgrading htk to version 0.2.55, which deprecates the ingress class
annotation (kubernetes.io/ingress.class) with .spec.ingressClassName

https://review.opendev.org/c/openstack/openstack-helm-infra/+/891720

Change-Id: I03f3c5a33f21079492505550c9a5d42570d8506a
Signed-off-by: Anselme, Schubert (sa246v) <sa246v@att.com>
2023-10-05 22:24:14 +00:00
Markin, Sergiy (sm515x) 0ba6181058 [zuul] Zuul gates fixes and Helm version upgrade to 3.x
Add firewall flush rules to zuul pre-update gates.

Wrap gate scripts by run-gates.sh script in order to preserve the scripts execution contexts.

Also migrated chart building process to Helm v3.x.

Fixed 020-test-divingbell.sh script.

Change-Id: I6295d55338a6a75ac43b54c092704670d61854d9
2022-09-30 01:17:39 +00:00
Phil Sphicas 1858d0ef37 perm: Optionally ignore missing files
The default behavior of divingbell-perm is to fail when trying to assign
permissions to non-existent files.

This change adds an option to values.yaml to skip any missing files and
proceed with the rest of the assignments.

    conf:
      perm:
        ignore_missing: true   # default is false

This may be useful in cases where files will never exist on a node, or
cases where the file does not exist yet, but will exist later. Note that
with this option enabled, a run in which files are skipped is considered
successful, so the rerun_policy and rerun_interval will determine if and
when another attempt will be made.

Change-Id: I15505d6292dda66942c66eea5a4d0666bd6bdfa7
2021-09-07 20:32:12 +00:00
Phil Sphicas c8eba1688c Update helm installation script
Updates the helm installation script to download and install v2.17.0
from get.helm.sh (instead of v2.16.9 from storage.googleapis.com).

Change-Id: I805bf95abcc97dc5dacfb6b2b0f1b671404df2cd
2021-09-07 17:20:52 +00:00
KAVVA, JAGAN MOHAN REDDY (jk330k) f9de95a6cc Update divingbell to use Ubuntu 18.04
Updated divingbell to use Ubuntu 18.04.

Change-Id: I721ffddbe8d8939303a1d38266462e751feca2f0
2020-09-23 08:57:02 -05:00
KAVVA, JAGAN MOHAN REDDY (jk330k) 634421a2e9 Move Tiller version to 2.16.9
Update Helm chart for Divingbell to use Tiller version 2.16.9.
Updated package reno>=2.5.0 to reno>=3.2.0.

Change-Id: Id6340c629986e9c6d92359cedd8839c803e0425f
2020-09-16 17:04:32 +00:00
Crank, Daniel c39963341f Fix problems with test script
1. OSH jobs now require gate_scripts_relative_path
variable to be explicitly defined.

2. Strict-mode test cases require a test package
that does not have to install dependencies, or
the test case will fail (since strict mode will
uninstall the dependency package and thus the
originally requested package).

3. Reduce redundant logging of the entire pod log
every time the pod status is checked; this was
causing long test cases (e.g. apt strict mode) to
fail.

4. Add a helper function to dump the pod log for
debugging failed test cases, since we will no
longer have the redundant logs above.


Change-Id: I7d2f6d2d161689a8744275b3d07571c83862a89c
2020-09-14 16:39:20 +00:00
Crank, Daniel f0eb0b7582 [ad-hoc] Fix test case exit conditions
While working on another change, I discovered conditions
in many test cases that echoed fail messages but did not
actually exit, so the gate could succeed even though some
tests failed. This patchset aims to fix those problems, and
then fix the problems masked by those problems:

1) fix bug in revert function of file permissions module
preventing permissions from being reverted.
2) fix various syntax and logic problems in test script
3) add wait_for_tiller_ready function to avoid race condition
with test script using helm too early
4) add install for ethtool in test script
5) ignore ethtool pod failures (see note #1 in [0])
6) make logging of test results more uniform
7) Fix error message logic in perm.sh
8) Fix case in _shcommon.tpl where error message was not
logged, causing test script to unnecessarily wait for
container timeout

[0]: https://review.opendev.org/676010

Change-Id: I22182d35250c37c96e73d9f5f49abfb2246f2a35
2020-03-12 15:25:30 +00:00
KAVVA, JAGAN MOHAN REDDY (jk330k) 37594c8d16 Add Docker default AppArmor profile to divingbell
This adds default AppArmor profile to divingbell.

Also, update to gate script to install ethtool if it is not present.

Change-Id: I7abb13a533b596f4db5fe65fdae5eb7fc57ec00a
2020-02-13 14:43:44 -08:00
Crank, Daniel 44525162a5 Add "strict" mode for apt package removal
Currently, divingbell-apt will only remove packages that aren't
on the current requested package list when they were previously
installed by divingbell-apt. This patchset adds a "strict" mode
which causes it to remove packages not on the requested package
list regardless of whether divingbell installed them (i.e., it
can remove unwanted packages that were part of the host's base
image).

Change-Id: Ie2ba5d47646bfaaf030cb54673e644ab0e917fd4
2020-01-24 12:19:22 -06:00
Phil Sphicas 788501e806 apt: chart update: allow conf.apt.packages as map
This change allows conf.apt.packages to be defined as a map of lists,
allowing for logical grouping and easier substitution when values.yaml
is being assembled from multiple sources.

The existing format (conf.apt.packages as a list) is still supported.

Change-Id: I4d4c09723b2e9ac1f0ecf847e786d991cc6e669a
2020-01-07 12:31:53 -08:00
Phil Sphicas 524c1b1e32 Fix airship-divingbell-ubuntu zuul gate
Fixes the airship-divingbell-ubuntu zuul gate.

Change-Id: I83642d43f4a4ae8a4882b120e965fcacd166700a
2020-01-07 12:31:53 -08:00
anthony.bellino d917166a73 apt: Add allow-downgrades option per package
This change adds the ability to include the --allow-downgrades
option per package install.

Change-Id: I2e0c6f11a51c1b78994e77084e3b2046c179d888
2019-10-17 03:11:19 +00:00
Anderson, Craig (ca846m) e541ec72b7 Fix gate script trackback printout
Change-Id: I9111cddf89ad57641b163309e5d2202a44cd36eb
2019-08-26 13:53:58 -07:00
Anderson, Craig (ca846m) 34c6d930e4 ignore ethtool failures, other gate improvements
Gate enhancements:

1. On certain opendev hardware, it's not possible to change
   ethtool tunables, or the expected tunables are unavailable.
   Until we have a mechanism to schedule to the right hardware,
   we will issue a warning whenever these tests fail instead of
   failing the gate.
2. Add a check so that gate script will not run until there are
   no other instances of the gate script running on the same node,
   as this can cause spurious gate failures.
3. Print gate script tracebacks in the event of gate script faliure
4. Increase check interval for two exec tests that were seen to fail
   on one ocassion due to insufficient wait time.

Change-Id: Ifdbb203a1b14242e3801ba10ef7e932931771878
2019-08-16 00:30:26 -07:00
Anderson, Craig (ca846m) c68a3ff61f Various gate fixes to make gate green
1. There is an ocassional timing issue when container logs are
   unavailabile at certain points in the crash loop at the same
   time the gate script tries to request them. The gate will now retry
   this operation, instead of terminating right away with failure.
2. Re-enable uamlite security context so that useradd operations would
   succeed.
3. Change apt pinning tests to use a version of the package that is
   available in the apt repo. Upstream repos change, so we should not
   pin to an explicit version that will be removed in the future and
   break the gate.
4. Update helm version to 2.14.1 to sync with openstack-helm-infra
5. Fix divingbell build script: git --depth=1 incompatible with explicit
   non-master commit checkout
6. Enhance overrides test case #7 to test for the issue identified in
   [0].
7. Change hostname scheduling to match minikube hostname now configured
   by OSH gate, instead of using the node's actual hostname
8. Re-enable gate voting

[0] https://storyboard.openstack.org/#!/story/2005936

Depends-On: https://review.opendev.org/671875/
Change-Id: Iad983ce363711e16ccd54e663c23d30a4a6a1177
2019-07-29 14:42:18 -07:00
Zuul 00cebd8b3b Merge "Use common logger for consistent log output" 2019-04-24 18:24:35 +00:00
Zuul 213040b429 Merge "CI: Add chart build job for latest Helm toolkit" 2019-04-17 16:17:26 +00:00
Anderson, Craig (ca846m) 87268308f8 Use common logger for consistent log output
Use the common logger for consistent log output for some echo statements
that were not making use of it.

Change-Id: I7fae2a950318f5cd3245a4571dc464009726d4ae
2019-04-11 13:23:05 -07:00
Dmitrii Kabanov 8f102a878a Add possibility to add repository and GPG key
The PS adds possibility to add repository and GPG key.

Change-Id: Ie4bfc3ba9501b8af484515e9d2946725bd9eff4b
2019-04-04 01:35:53 -07:00
Drew Walters 4846a2d5c1 CI: Add chart build job for latest Helm toolkit
This commit introduces a non-voting job to lint Helm charts against the
latest version of Helm toolkit from OpenStack-Helm Infra. This job
should serve as an indicator of when it's safe to advance the version of
Helm toolkit used by Airship.

Additionally, this commit modifies all Helm chart lint jobs to run on
each commit, regardless of the files modified by a change. This should
not introduce a noticeable difference in CI runtime, as these jobs
execute quicker than the tox jobs.

Change-Id: Iffbe718f2f8cabaac74910e0c40a13e17e3f0578
2019-04-03 14:25:44 +00:00
Drew Walters 9a632008a1 tools: Update Helm to v2.13.1
Helm v2.13.1 has been released [0]. This change uplifts Helm to v2.13.1
and restores usage of the latest Helm toolkit to match other Airship
projects.

[0] https://github.com/helm/helm/releases/tag/v2.13.1

Depends-On: https://review.openstack.org/647812
Change-Id: I613d78284bab8784e2cbe18bd6c8ad2fb5f0f49b
2019-03-28 15:20:13 +00:00
Drew Walters 7bfb48db43 Update helm-toolkit pin
This pins the version of helm-toolkit used during the build process to a
compatible version. This should be updated to master once helm 2.13.1
releases with this fix [0].

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

Change-Id: I8f273b96e35e66479e62dd2c7f362fd10c1e3bff
2019-03-13 14:36:57 +00:00
Pete Birley 85534b7796 Exec: Use nsenter to enter all host namespaces when running exec
This PS moves to pivot to the hosts namespaces rather than chroot
so as to allow scripts to run fully in the context of the host.

Change-Id: I6b4dab92b6f8a7f9fa5b895d546117fdae43d731
Signed-off-by: Pete Birley <pete@port.direct>
2019-03-11 19:32:48 -07:00
anthony.bellino f4c8228ff6 Add rerun support for perm module
- Adds the ability to rerun divingbell-perm at specified interval.

- Adds the ability to specify a rerun policy of
  'always', 'never', 'once_successfully'. Default value is 'always'.

Demo: https://asciinema.org/a/220289

Change-Id: I3909b4d92f8e2bdb0d826ca1cfbd62f937c2532d
2019-01-10 17:39:32 +00:00
Nikita Koshikov 606cf35bda Add new apparmor daemonset
Implemented daemonset that will manage host apparmor profiles.
Tests and documentation added.

demo: https://asciinema.org/a/uQjlWgC4bjI3WkfontmThf8t0

Co-Authored-By: Vladyslav Drok <vdrok@mirantis.com>
Change-Id: I13f7357c15b5c4386a61bba50f097eb434d7f211
2018-12-14 19:02:00 -08:00
Craig Anderson 4ed467e512 Add retry/rerun support for exec module
Add support for retries and reruns at specified intervals for
divingbell-exec scripts. Also adds support for timeouts.

Also update osh-infra-upgrade-host to allow gate to run.

Change-Id: I5f4cd43b13a467d94f67b358f3190f515256ae66
2018-12-14 19:45:38 +00:00
Craig Anderson 012800d854 Add new divingbell-exec module
Stopgap module to provide generic node exec capability until shift
to [0] and [1].

[0] https://github.com/GoogleCloudPlatform/metacontroller
[1] https://github.com/argoproj/argo

Change-Id: I278548e1e09ed31dcc4212142f1e6465ee8d9792
2018-12-04 18:22:51 +00:00
skovaleff 0731ac5d3a Add ability to control owner:group and permissions
via new module 'perm'

1) DaemonSet
2) Secret (instead of old ConfigMap)
3) Include module /bin/_perm.sh.tpl
4) Commented example in values.yaml
5) Demo: https://asciinema.org/a/209509
6) Increased # of expected DaemonSets
7) Rebased after a few merges
8) Addressing comments
9) Migrated from ConfigMap to Secret
10) Got rid of 'eval'
11) Test
12) Demo for host targeting: https://asciinema.org/a/213125

Change-Id: Ia3181dcb7fc1ccc7422c635b010000f6d3fbcf4d
2018-11-27 09:08:11 -08:00
Zuul 97bcc9760f Merge "Create Makefile target to install Helm binary" 2018-11-27 15:31:05 +00:00
Dimitrios Markou 63230b9f6b Create Makefile target to install Helm binary
In Makefile there is no target which actually installs
Helm binary.

Change-Id: Idca3ed4d0c6d8734b7b6bcfc9d8a1ba9e50693ee
Signed-off-by: Dimitrios Markou <dm844v@att.com>
2018-11-26 16:34:45 -06:00
Anderson, Craig (ca846m) 072249dc5f Allow override test to be run in helm-toolkit gate
Change-Id: Ieaa2e3c66c8855eec6c97796f175f769b268dccc
2018-11-19 23:10:53 -08:00
Vladyslav Drok da532c32aa Add options to apt-get install call
This change also adds an apt-get update call and a possibility to
provide debconf options that might be needed for some packages.
In case of dpkg interruptions dpkg --configure -a is added to
try to handle the failures.

Change-Id: Ib1f9a412bc544b4f7754634740fb04569bae6d34
2018-11-15 14:27:07 -08:00
Aaron Sheffield 3524908910 Blacklist Packages as an Extention of Apt
- Extends apt daemonset to remove packages.
  - Uses a list of packages in remove and automove, so if a
    package gets installed that should not be it will be
    uninstalled when Divingbell runs again.

Change-Id: Id5c7ccead399a8c78621a0e593033e55412ff315
2018-11-12 22:11:34 +00:00
Vladyslav Drok 0f5567dc58 Add the ability to install packages via divingbell
This change adds a possibility to install or upgrade to packages
with a specific version. The daemonset also tracks the packages
installed, and will be removing the packages that were deleted
from the chart but were previously installed by divingbell.

Change-Id: Ia6066679e549190054eb2cf71589065177447447
2018-11-12 13:34:58 -08:00
skovaleff 7ed8c29f99 Add ability to control pam_limits via new module 'limits'
1) 'Values' configures limit settings to be persisted.
2) Previous DivingBell controlled limits those were set
but now are gone are cleared.
3) Previous values of newly set limits are backed up
to /var/divingbell/limits
4) New limit is applied via adding a separate conf file
to /etc/security/limits.d
5) The Doc is updated with appropriate details.
6) Dev env with Vagrant
7) Increase number of expected DaemonSets in 020-test
8) Demo: https://asciinema.org/a/209619

Change-Id: I5efb39c498c2b666b4ba97271b59757f4a0c1ca7
2018-11-01 09:09:48 -07:00
Zuul b2250bddbe Merge "Improve test stability" 2018-10-04 17:57:30 +00:00
Zuul 66de9440d1 Merge "Improve gate NIC HW compatibility/portability" 2018-10-02 18:04:43 +00:00
Andrey Volkov 38634f1aa6 Improve test stability
See false positive in I234a50e9b2e46d5c92a89eb8073771043b4eaf56.
This patch makes the following changes to improve gate stability:

- Increase timeout while waiting for container logs from 30 to 60.
- Exclude terminating containers and get container name on each iteration.

NAME                               READY  STATUS             RESTARTS  AGE
divingbell-apparmor-default-984mc  0/1    Terminating        0         26s
divingbell-apparmor-default-splhc  0/1    ContainerCreating  0         8s
divingbell-ethtool-default-62dlt   0/1    ContainerCreating  0         8s
divingbell-ethtool-default-v975n   0/1    Terminating        0         26s
divingbell-mounts-default-2xhv5    0/1    ContainerCreating  0         8s
divingbell-sysctl-default-c8nhn    0/1    Pending            0         8s
divingbell-sysctl-default-mlsnp    0/1    Terminating        0         26s
divingbell-uamlite-default-dv9cv   0/1    Pending            0         8s

Change-Id: I35ba6844d41c92bf9f581a97218275363e9ee0bd
2018-10-02 09:23:45 -07:00
Roman Gorshunov d734925bb6 Fix: various documentation and URL fixes
1) UCP -> Airship
2) readthedocs.org -> readthedocs.io (there is redirect)
3) http -> https
4) attcomdev -> airshipit (repo on quay.io)
5) att-comdev -> openstack/airship-* (repo on github/openstack git)
6) many URLs have been verified and adjusted to be current
7) no need for 'en/latest/' path in URL of the RTD
8) added more info to some setup.cfg and setup.py files
9) ucp-integration docs are now in airship-in-a-bottle
10) airship-divingbell-ubuntu gate repo split fix (tools/helm_tk.sh)
11) various other minor fixes

Change-Id: I1b7956e77fdd2f01368df1b81b44fdd51ee8443c
2018-09-25 11:44:57 +02:00
Craig Anderson d8570fe8ad Improve gate NIC HW compatibility/portability
Change-Id: I5d878b664f552fe04cd2e672293c27578560dab4
2018-09-20 22:01:14 +00:00
Anderson, Craig (ca846m) 73880a9973 fix divingbell gate scripts
Change-Id: I3b1f472b9e78436672c67ce73cdd92d24e2e21ac
2018-09-17 22:45:55 -07:00
Matt McEuen 0927b6a61c Add release uuid to pods and rc objects (dbell)
This PS adds the ability to attach a release uuid to pods and rc
objects as desired.  This can be used, for example, to force an
artificial manifest change in CICD scenarios, for upgradability
testing purposes.

Change-Id: I2f5279c6983f43288e4ef3cb48898d5a36b33833
2018-09-14 17:45:47 -05:00
Pete Birley 00927b2383 Zuul: Initial Airship-Divingbell checks
This PS adds the skeleton for a set of zuul checks and gates for
Airship, using the framework from OpenStack-Helm.

Change-Id: I757aef16f023248ab37e87d47e36fc1eae1e23c4
Signed-off-by: Pete Birley <pete@port.direct>
2018-05-17 12:37:14 -05:00
Scott Hussey 4f141f2c22 [Fix] Makefile default target failed
- Fix the default target

Change-Id: I2d3d19f8cce0ca1b729ff74d34a05a412dabb6bc
2018-03-29 16:32:45 -05:00
Scott Hussey 651cb8f816 [390506] support update strategy
- Update Makefile to more closely resemble UCP standards
- Add tools for downloading helm-toolkit
- Support update strategy

Change-Id: I21d50ade416552eeb6be9bbebbfc1effd1ae7f15
2018-03-23 22:56:44 +00:00