Investigate CI failures - #313
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Jakob-Naucke The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideRefactors the trustee operator to integrate directly with the KBS API (using JWT auth and kbs-client), replaces in‑pod volume-based secret and policy management with explicit sync controllers and config maps/secrets, updates Trustee/KBS configuration and versions, and extends tests and CI to validate LUKS key and attestation key resync behavior and aid debugging intermittent CI failures. Sequence diagram for trustee deployment sync controller interactions with KBSsequenceDiagram
participant Controller as TrusteeSyncController
participant Kube as KubernetesAPI
participant KBS
Controller->>Kube: watch Deployment label app=TRUSTEE_APP_LABEL
Kube-->>Controller: Deployment with status Available=True
Controller->>Controller: trustee_deployment_reconcile()
alt Deployment Available
Controller->>KBS: sync_resource_policy() / kbs_client::set_resource_policy
Controller->>KBS: sync_attestation_policy() / kbs_client::set_attestation_policy
Controller->>Kube: sync_reference_values_from_configmap()
Controller->>KBS: sync_reference_values() / kbs_client::set_sample_rv
Controller->>Kube: sync_all_machine_luks_key() / list Machine, get Secret
Controller->>KBS: send_secret() / kbs_client::set_resource
Controller->>Kube: update_attestation_keys() / list Secret
Controller->>KBS: register_ak() / kbs_client::set_sample_rv
else Deployment not Available
Controller-->Controller: Action::await_change()
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
4de09c8 to
00e5c14
Compare
|
Now we had a failure, but no log from guest-components. Built a new image with journal console forwarding so we can see. |
|
I'm adding some logging to confirm this, but to me, this looks like 4.5 minutes for a GET (?!) (grepped for |
d4be821 to
5072ba7
Compare
51648f2 to
e0cc677
Compare
Signed-off-by: Roy Kaufman <rkaufman@redhat.com>
All trustee resources, including the resource policy, attestation policy, RV, LUKS key, and AK, are now synchronized using the KBS API.
The main motivation for this is replacing the patch mechanism that causes a restart of the trustee deployment.
Also, this abstraction over the trustee backend simplifies the process of upgrading to future versions of trustee.
Config:
- Update kbs-config.toml to v0.20.0 format
- Store reference values in dedicated ConfigMap (trustee-rv-data)
instead of trustee-data
API-driven resource management:
- Add KBS API client functions: send_secret, delete_secret,
register_ak, sync_resource_policy, sync_attestation_policy,
sync_reference_values
- Replace volume-mount approach for secrets with KBS API calls
- Add trustee deployment reconciler that syncs policies, reference
values, and secrets when deployment becomes available
Dependencies:
- Add kbs-client and jsonwebtoken crates
- Bump trustee image tag to v0.20.0
Signed-off-by: Roy Kaufman <rkaufman@redhat.com>
test_luks_key_sync - verify the initial LUKS key upload, re-sync after trustee restart, and LUKS key deletion on machine removal. test_attestation_key_sync - verify that attestation keys are registered with the KBS and re-registered after trustee restarts. Signed-off-by: Roy Kaufman <rkaufman@redhat.com>
Tested functions: - sync_all_machine_luks_key - update_attestation_keys Signed-off-by: Roy Kaufman <rkaufman@redhat.com>
required on OpenShift SCC Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
for crates and testing Fixes: trusted-execution-clusters#227 Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
so that status is updated in a timely manner Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Signed-off-by: Jakob Naucke <jnaucke@redhat.com> Assisted-by: AI
Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
to fail fast Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
a2611df to
70074f5
Compare
Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
535fbb2 to
11cbcaa
Compare
Signed-off-by: Jakob Naucke <jnaucke@redhat.com> Assisted-by: AI
11cbcaa to
6fb3b8d
Compare
but keep the log. test failure was irreproducible with the policy. Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
This reverts commit 6fb3b8d. Error was not seen when audit logging was enabled at all. Try again. Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
GHA & openshift/release#79393 saw many random failures, most related to finalizer. Most recent run on the latter showed a resource apparently taking 4 minutes to patch. (Also) testing here for a faster feedback loop.
Summary by Sourcery
Integrate the trustee operator more tightly with an external KBS, switching from in-pod secret mounting to API-based secret and policy synchronization, updating trustee configuration and image versions, and enhancing logging and tests to diagnose and stabilize CI behavior.
New Features:
Bug Fixes:
Build:
CI: