Skip to content

e2e: More useful logs #1686

@nirs

Description

@nirs

e2e logs are too noisy and does not provide enough info. We want to use the same code in the new ramenctl tool (#1702), running on real clusters, so having good logging is much more important.

Guidelines:

  • Use INFO log for important events, explaining what the test is doing

    • deployed
    • workload deployed on cluster ...
    • protecting protection
    • workload protected
    • starting failover
    • finished failover
    • starting relocate
    • finished relocate
    • unprotecting workload
    • workload unprotected
    • undeployed
    • workload undeployed
  • Provide useful info in INFO logs

    • when deploying/undeploying - which cluster
    • failover, relocate: current cluster, target cluster
    • other info that may help to understand the operation
  • Anything else should be DEBUG log

  • Provide useful info in DEBUG logs

    • when creating or deleting a resource, the cluster, namespace, and resource name
    • when changing a resource, the changes in the resource, or the entire updated resource
    • any detail that can help debug failing tests or help to understand what the code is doing
  • Log levels:

    • log file: DEBUG level to make it easier to debug failed test, specially in the CI
    • console: INFO level to make running the tests nicer

Example INFO messages for a subscription based test:

INFO  subscr-deploy-rbd-busybox   Deploying workload on cluster "dr1"
INFO  subscr-deploy-rbd-busybox   Protecting workload
INFO  subscr-deploy-rbd-busybox   Waiting for first replication
INFO  subscr-deploy-rbd-busybox   Failing over workload from clsuter "dr1" to cluster "dr2"
INFO  subscr-deploy-rbd-busybox   Waiting until workload is failedover
INFO  subscr-deploy-rbd-busybox   Waiting for first replication
INFO  subscr-deploy-rbd-busybox   Relocating workload from clsuter "dr2" to cluster "dr1"
INFO  subscr-deploy-rbd-busybox   Waiting until workload is relocated
INFO  subscr-deploy-rbd-busybox   Waiting for first replication
INFO  subscr-deploy-rbd-busybox   Unprotecting workload
INFO  subscr-deploy-rbd-busybox   Undeploying workload on cluster "dr1"

Notes:

  • Maybe include drpc action, phase and progression names (see basic-test logs)
  • Maybe include timing for each step (deploy, protect, ...). We have timing in the test summary but it is useful to have info in the logs. This means adding a completion log for every operation:
    Deploying workload on cluster "dr1"
    Workload deployed in xxx seconds
    
  • when getting resource, important details from the resource, or the entire resource

Sub-issues

Metadata

Metadata

Assignees

Labels

highIssue is of high priority and needs attentiontestTesting related issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions