Skip to content

Commit

Permalink
tests/integration: Workaround to Aktualizr reporting "no updates foun…
Browse files Browse the repository at this point in the history
…d" after TCB deploy

When the TCB performs a deploy, the OSTree version changes, but it does not
cause a change in the version recognized by Aktualizr. This leads to a
situation where, if an update is requested for the version before the TCB
deploy, Aktualizr reports "no updates found" and does not perform the update,
as it believes the requested update is for a version already present on the
device. The workaround used is to request an update to a nightly if
using a release and vice-versa.

Related-to: TOR-3518
Related-to: TOR-490
Related-to: TCCP-864

Signed-off-by: Lucas Bernardes <[email protected]>
  • Loading branch information
lucasbernardestoradex committed Nov 26, 2024
1 parent 9650085 commit 04b64ba
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/integration/aval/aval-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ build-aval-docker:
- cd tests/integration && python /aval/main.py --delegation-config $DELEGATION_CONFIG
--run-before-on-host "./run_all.sh --device --machine $TCB_MACHINE --report --tcb-tags requires-device
--tcb-custom-image ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${GITLAB_DOCKERREGISTRY_SUFFIX_LATEST}"
# To circumvent the mismatch between Aktualizr's database and ostree when an external entity manages ostree without
# Aktualizr, install a different version than the one Aktualizr thinks it's currently installed (the one before TCB
# deploy), which externally forces both Aktualizr and ostree to sync. In particular, if we're running a nightly, install
# a release build and vice-versa
- |
toggle_release_type() {
local current_release_type="$1"
if [ "$current_release_type" == "release" ]; then
echo "nightly"
elif [ "$current_release_type" == "nightly" ]; then
echo "release"
fi
}
- TARGET_BUILD_TYPE=$(toggle_release_type "$TARGET_BUILD_TYPE") python /aval/main.py --delegation-config $DELEGATION_CONFIG
"echo 'Updating to a different TOS version than the TCB tests version, to circumvent the mismatch between Aktualizr'\''s database and ostree when an external entity manages ostree without Aktualizr'"
- (! grep "^not ok" workdir/reports/*)

# $AVAL_TEST_ALL can be defined on a Gitlab schedule to run tests on all devices
Expand Down

0 comments on commit 04b64ba

Please sign in to comment.