Skip to content

Commit

Permalink
Merge pull request cri-o#8124 from bitoku/reload-config-e2e
Browse files Browse the repository at this point in the history
Wait for configuration reload completion to stabilize e2e tests
  • Loading branch information
openshift-merge-bot[bot] authored May 8, 2024
2 parents 6846596 + c3bfcd3 commit 2afe77b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion contrib/test/ci/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
state: present
loop: "{{ ['cgroups.bats'] | product(kata_skip_cgroups_tests) \
+ ['command.bats'] | product(kata_skip_command_tests) \
+ ['reload_config.bats'] | product(kata_skip_reload_config_tests) \
+ ['config.bats'] | product(kata_skip_config_tests) \
+ ['config_migrate.bats'] | product(kata_skip_config_migrate_tests) \
+ ['crio-wipe.bats'] | product(kata_skip_crio_wipe_tests) \
Expand Down
4 changes: 0 additions & 4 deletions contrib/test/ci/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ kata_skip_cgroups_tests:
kata_skip_command_tests:
- 'test "crio commands"'
- 'test "log max boundary testing"'
kata_skip_reload_config_tests:
- "test \"reload config should update 'pinned_images'\""
- "test \"reload config should update 'pinned_images' and only 'pause_image' is pinned\""
- "test \"reload config should update 'pause_image' and it becomes 'pinned_images'\""
kata_skip_config_tests:
- 'test "choose different default runtime should succeed"'
- 'test "runc not existing when default_runtime changed should succeed"'
Expand Down
1 change: 1 addition & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ func (s *Server) startReloadWatcher(ctx context.Context) {
// ImageServer compiles the list with regex for both
// pinned and sandbox/pause images, we need to update them
s.StorageImageServer().UpdatePinnedImagesList(append(s.config.PinnedImages, s.config.PauseImage))
logrus.Info("Configuration reload completed")
}
}()

Expand Down
3 changes: 3 additions & 0 deletions test/reload_config.bats
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ EOF
reload_crio
# image becomes pinned
expect_log_success $OPTION $EXAMPLE_IMAGE
wait_for_log "Configuration reload completed"
output=$(crictl images -o json | jq ".images[] | select(.repoTags[] == \"$EXAMPLE_IMAGE\") |.pinned")
[ "$output" == "true" ]
}
Expand All @@ -251,6 +252,7 @@ EOF
OPTION="pause_image"
printf '[crio.image]\npinned_images = [""]\n' > "$CRIO_CONFIG_DIR"/00-default
reload_crio
wait_for_log "Configuration reload completed"
output=$(crictl images -o json | jq '.images[] | select(.pinned == true) | .repoTags[]')
# only pause image is pinned
[[ "$output" == *"pause"* ]]
Expand All @@ -262,6 +264,7 @@ EOF
printf '[crio.image]\npinned_images = [""]\npause_image = "%s"\n' $EXAMPLE_IMAGE > "$CRIO_CONFIG_DIR"/04-overwrite
reload_crio
expect_log_success $OPTION $EXAMPLE_IMAGE
wait_for_log "Configuration reload completed"
output=$(crictl images -o json | jq '.images[] | select(.pinned == true) | .repoTags[]')
# pause image is pinned
[[ "$output" == *"fedora-crio-ci"* ]]
Expand Down

0 comments on commit 2afe77b

Please sign in to comment.