Commit Graph

26 Commits

Author SHA1 Message Date
Mosher, Jaymes (jm616v) 502a74064c Add optional pre/post install commands to divingbell-apt
Change-Id: I3fdee4b128bfba80bd827fb6a64b800652cdee2f
2023-11-30 10:59:46 -07:00
Ruslan Aliev 9ef6046f33 Add whitelist of packages to bypass verification
Change-Id: I459f4a241496cf98bd0bb00f3843f2b58bb397c1
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2023-05-16 18:23:27 -05:00
Ruslan Aliev 234248c272 Add readiness probe to divingbell-exec
Also add dist-upgrade verification.

Change-Id: I0716ee878e9a2fa9a557debe543996691c0540ce
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2023-04-30 23:03:17 -05:00
SPEARS, DUSTIN (ds443n) 7d533d65c3 Adding readiness/liveness probes to apt
This adds readiness and liveness probes to set daemonset to a non-ready status during dpkg usage

Change-Id: I5b9d029f1f8f696b4132a27ea29a77465babc29c
2022-10-19 15:09:04 -04:00
SPEARS, DUSTIN (ds443n) ebf0e22964 Add checks for dpkg availability
Check that dpkg is available before continuing to prevent unwanted pod restarts.

Change-Id: I6925cd074b88d10a858f044da21c7e20a7a238e5
2022-09-30 10:47:30 -04:00
Walter Wahlstedt 229bbe75b0 Create option to turn on verbose logging.
Change-Id: I1ad71a603a92e44ee93e0663c7b2db216a1811ff
2022-01-19 16:34:26 -05:00
Phil Sphicas d657f7968c apt: Remove /var/lib/apt/lists before update
When divingbell-apt is managing the apt sources list, remove the
contents of /var/lib/apt/lists before running apt-get update.

Change-Id: I379af0b1a887bc81bc76f57289f35bae64e146c6
2021-03-14 06:46:08 +00:00
Anderson, Craig (ca846m) 32da2fbd4b Add ability to disable package uninstalls
Allow users to disable auto-uninstall functionality for packages.

Change-Id: Ib59ff175fc474a592118374c23974c6a9439cd72
2020-03-23 10:23:20 -07:00
Zuul db4f382b59 Merge "Update dpkg commands to be non-interactive" 2020-03-20 20:37:00 +00:00
Michael Beaver b98efc4f29 Update dpkg commands to be non-interactive
The current `dpkg --configure -a` command does not always work if the
package that needs to be configured has a modified conffile which can
require user input to resolve. This change adds flags to make these
lines work as intended in that scenario.

Change-Id: I8f459b0c1c2fc7ecbe1ff478bdb77fd9af31dc90
2020-03-19 14:10:44 +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
Michael Beaver fe0a034ec7 Add --no-install-recommends to apt install
This change adds the --no-install-recommends flag to the apt-get
install command portion of _apt.sh.tpl. This will modify Divingbell
to only install direct dependencies of packages instead of following
the default apt behavior, which is to also install recommended packages

Change-Id: I118a72e1e591101b0e2878e088e9fbaa96067d2c
2020-01-29 18:29:06 -06:00
Drew Walters fe270ec595 apt: Add whitelist for strict mode
This change adds a whitelist of packages that will be ignored when using
strict mode.

Change-Id: I9138f35a72618100e6094575271f6160336332f4
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-01-27 21:23:27 +00:00
Crank, Daniel 3cc1620319 Remove 'autoremove' from strict mode apt purge
This patchset makes two changes for strict mode only:

1) Removes the --autoremove flag from the apt-get purge
   command line
2) Causes the install stage to call apt-get install on
   all packages regardless of whether they're already
   installed. This will have the effect of marking all
   requested packages as manually installed if they
   were previously auto-installed.

Change-Id: Ic1a39205c941973af9d82685180d28457ea2011f
2020-01-25 13:15:46 -06: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
Schiefelbein, Andrew (as3525) as3525@att.com ac357b9bff This is to allow for ganged install of packages instead of single
package installations with apt

Change-Id: Ifd268e7eca212fb5686b30213c1c7c1e47f5eb25
2020-01-17 16:03:03 -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
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
Drew Walters 2e5ffaccca apt: Add full-system upgrade feature
Currently, the APT daemonset allows the installation of new packages or
upgrade of existing packages to a newer version. Sometimes, it may be
desirable to trigger an update for all packages. This change introduces
the ability to trigger a full-system upgrade using the .conf.apt.upgrade
chart value. The new option is disabled by default.

Change-Id: I611422c2093b9dbbae4e2d7cc05ebd726e895c88
Signed-off-by: Drew Walters <andrew.walters@att.com>
2019-08-21 16:07:54 +00:00
Zuul 00cebd8b3b Merge "Use common logger for consistent log output" 2019-04-24 18:24:35 +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 2fb6a299a3 Add support of older versions of Helm
This PS allows to avoid of using assignments which are not supported
in older versions of Helm (GO<1.11).
Change-Id: Ic0dad4d1b60071c4366c63834f1ad7e3a76fdcd8
2019-04-11 12:14:20 -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
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