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

Gather migration hooks logs #46

Merged
merged 4 commits into from Mar 3, 2022
Merged

Conversation

aufi
Copy link
Collaborator

@aufi aufi commented Feb 23, 2022

A VM migration can include pre and post migration hooks which are Jobs (k8s resources) that could contain relevant information in their log files. Adding migration hooks jobs logs to the targeted gathering.

Addresses #45 and fixes https://bugzilla.redhat.com/show_bug.cgi?id=2059335

Update targeted DataVolumes gathering to keep consistency in resources
list tracking.
Migration hooks creates Jobs executed pre and post migration, adding
support to gather their logs for debugging purposes.
Migration hooks jobs are xecuted in their pods, adding their logs
collection.
@aufi aufi changed the title [WIP] Gather migration hooks logs Gather migration hooks logs Mar 2, 2022
@aufi
Copy link
Collaborator Author

aufi commented Mar 2, 2022

Jobs CRs and pod logs with their execution outputs are now part of the must-gather archive.

Image for testing: quay.io/maufart/forklift-must-gather:hook-logs

$ oc adm must-gather --image quay.io/maufart/forklift-must-gather:hook-logs -- PLAN=<PLAN_NAME> /usr/bin/targeted

Example output:

...
[must-gather-bmb7j] POD 2022-03-02T12:48:39.759689806Z Targeted gathering for Forklift in namespaces [openshift-mtv]
[must-gather-bmb7j] POD 2022-03-02T12:48:39.764206688Z Targeted gathering for Plan: plan2j
[must-gather-bmb7j] POD 2022-03-02T12:48:39.975084768Z Gathering plans..
[must-gather-bmb7j] POD 2022-03-02T12:48:39.975084768Z Dumping plan: plan2j from openshift-mtv
[must-gather-bmb7j] POD 2022-03-02T12:48:40.103606106Z Gathering virtualmachines..
[must-gather-bmb7j] POD 2022-03-02T12:48:40.398411067Z Dumping datavolume: plan2j-vm-3696-fb424 from mdest2
[must-gather-bmb7j] POD 2022-03-02T12:48:40.580650231Z Dumping virtualmachine: maufart-centos-13 from mdest2
[must-gather-bmb7j] POD 2022-03-02T12:48:43.309469648Z Dumping job: plan2j-vm-3696-posthook-4mx85 from openshift-mtv
[must-gather-bmb7j] POD 2022-03-02T12:48:43.624831099Z Dumping job: plan2j-vm-3696-prehook-mwqnl from openshift-mtv
[must-gather-bmb7j] POD 2022-03-02T12:48:43.952179873Z Condition for targeted logs filtering:
[must-gather-bmb7j] POD 2022-03-02T12:48:43.954873968Z openshift-migration\/plan2j|maufart-centos-13
[must-gather-bmb7j] POD 2022-03-02T12:48:43.957027117Z Gathering logs for namespaces [openshift-mtv]
...
[must-gather-bmb7j] POD 2022-03-02T12:48:46.744625505Z [ns=openshift-mtv][job=plan2j-vm-3696-posthook-4mx85--1-92b5z] Collecting migration hook job's pod logs...
[must-gather-bmb7j] POD 2022-03-02T12:48:47.785087080Z [ns=openshift-mtv][job=plan2j-vm-3696-prehook-mwqnl--1-bsr47] Collecting migration hook job's pod logs...
...

@aufi aufi merged commit 2937e14 into kubev2v:main Mar 3, 2022
@ahadas ahadas linked an issue Aug 17, 2023 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

Gather jobs to allow pre/post hooks debugging
1 participant