Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integration testing of harbor-trivy StatefulSet on GitHub runenrs. #23

Open
aznashwan opened this issue Jul 30, 2024 · 0 comments
Open

Comments

@aznashwan
Copy link
Contributor

aznashwan commented Jul 30, 2024

Summary

Currently the integration tests checks all components defined in the upstream Harbor Helm chart except for the harbor-trivy StatefulSet, which consistently seems to have issues getting its PVC allocated for it on the GitHub runners with errors such as:

# https://github.com/aznashwan/harbor-rocks/actions/runs/10151954257/job/28078474328#step:8:2728
$ kubectl describe pod harbor-trivy-0
...
Events:
  Type     Reason       Age                   From               Message
  ----     ------       ----                  ----               -------
  Normal   Scheduled    5m29s                 default-scheduler  Successfully assigned default/harbor-trivy-0 to k8s-integration-89872c-3
  Warning  FailedMount  79s (x10 over 5m29s)  kubelet            MountVolume.MountDevice failed for volume "pvc-aa087c05-b90b-4bcb-b4be-a7399d2c01c6" : rpc error: code = Unknown desc = Exception calling application: Command 'losetup --direct-io=on -f /data/pvc-aa087c05-b90b-4bcb-b4be-a7399d2c01c6/disk.img' returned non-zero exit status 1.

Or:

# https://github.com/aznashwan/harbor-rocks/actions/runs/10148154466/job/28068574283#step:8:7532
$ kubectl describe pod harbor-trivy-0
...
Events:
  Type     Reason            Age                    From               Message
  ----     ------            ----                   ----               -------
  Warning  FailedScheduling  5m43s                  default-scheduler  running PreBind plugin "VolumeBinding": binding volumes: provisioning failed for PVC "data-harbor-trivy-0"
  Warning  FailedScheduling  5m36s (x2 over 5m40s)  default-scheduler  running PreBind plugin "VolumeBinding": binding volumes: provisioning failed for PVC "data-harbor-trivy-0"

What Should Happen Instead?

The integration tests should run fine on the GitHub amd64 runners, as they seem to consistently run fine in local setups when straight-up copy-pasting the exact same helm install command.

Reproduction Steps

Enable the checks for the harbor-trivy StatefulSet in the integration tests and re-run the pull_request.yaml workflow on this repo on the default Ubuntu-based GitHub AMD64 runners.

Can you suggest a fix?

Might be related to the number of loopback devices defined in the LXD profile used for integration testing.

Are you interested in contributing with a fix?

In the future, yes, but I currently need to focus on other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant