diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index d69067b025..21626acb4d 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -81,6 +81,7 @@ function _run_sys() { } function _run_upgrade_test() { + export SUPPRESS_BOLTDB_WARNING=true showrun bats test/upgrade |& logformatter } diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go index 83ee8de148..db2f7084b9 100644 --- a/libpod/boltdb_state.go +++ b/libpod/boltdb_state.go @@ -81,12 +81,14 @@ func NewBoltState(path string, runtime *Runtime) (State, error) { logrus.Debugf("Initializing boltdb state at %s", path) + ciDesiredDB := os.Getenv("CI_DESIRED_DATABASE") + // BoltDB is deprecated and, as of Podman 5.0, we no longer allow the // creation of new Bolt states. // If the DB does not already exist, error out. // To continue testing in CI, allow creation iff an undocumented env // var is set. - if os.Getenv("CI_DESIRED_DATABASE") != "boltdb" { + if ciDesiredDB != "boltdb" { if err := fileutils.Exists(path); err != nil && errors.Is(err, fs.ErrNotExist) { return nil, fmt.Errorf("the BoltDB backend has been deprecated, no new BoltDB databases can be created: %w", define.ErrInvalidArg) } @@ -94,9 +96,9 @@ func NewBoltState(path string, runtime *Runtime) (State, error) { logrus.Debugf("Allowing deprecated database backend due to CI_DESIRED_DATABASE.") } - // TODO: Up this to WARN level in 5.7, ERROR level in 5.8 - if os.Getenv("SUPPRESS_BOLTDB_WARNING") == "" { - logrus.Infof("The deprecated BoltDB database driver is in use. This driver will be removed in the upcoming Podman 6.0 release in mid 2026. It is advised that you migrate to SQLite to avoid issues when this occurs. Set SUPPRESS_BOLTDB_WARNING environment variable to remove this message.") + // TODO: Up this to ERROR level in 5.8 + if os.Getenv("SUPPRESS_BOLTDB_WARNING") == "" && ciDesiredDB != "boltdb" { + logrus.Warnf("The deprecated BoltDB database driver is in use. This driver will be removed in the upcoming Podman 6.0 release in mid 2026. It is advised that you migrate to SQLite to avoid issues when this occurs. Set SUPPRESS_BOLTDB_WARNING environment variable to remove this message.") } db, err := bolt.Open(path, 0o600, nil) diff --git a/test/system/005-info.bats b/test/system/005-info.bats index 4887a89422..1e807f3af6 100644 --- a/test/system/005-info.bats +++ b/test/system/005-info.bats @@ -289,6 +289,7 @@ EOF } +# TODO 6.0: Remove this @test "podman - BoltDB cannot create new databases" { skip_if_remote "DB checks only work for local Podman" @@ -302,7 +303,7 @@ EOF assert "$output" =~ "Allowing deprecated database backend" \ "with CI_DESIRED_DATABASE" - run_podman $safe_opts system reset --force + SUPPRESS_BOLTDB_WARNING=true run_podman $safe_opts system reset --force } @test "podman - empty string defaults for certain values" { diff --git a/test/system/252-quadlet.bats b/test/system/252-quadlet.bats index 0e9e9d9b83..901295db9e 100644 --- a/test/system/252-quadlet.bats +++ b/test/system/252-quadlet.bats @@ -207,6 +207,8 @@ function wait_for_journal() { # Ref https://github.com/containers/podman/pull/21563#issuecomment-1965145324 local quadlet_file=$PODMAN_TMPDIR/basic_$(safename).container cat > $quadlet_file <