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

[Draft] Add some initramfs debugging basics #796

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

fernflower
Copy link
Member

This topic has not been covered by our docs, let's finally
address this blank spot.

This topic has not been covered by our docs, let's finally
address this blank spot.
@fernflower fernflower changed the title Add some initramfs debugging basics [Draft] Add some initramfs debugging basics Aug 30, 2022
@github-actions
Copy link

Thank you for contributing to the Leapp project!

Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergable.
If you want to request a review or rebuild a package in copr, you can use following commands as a comment:

  • review please to notify leapp developers of review request
  • /packit copr-build to submit a public copr build using packit

To launch regression testing public members of oamg organization can leave the following comment:

  • /rerun to schedule basic regression tests using this pr build and leapp-repository*master* as artifacts
  • /rerun 42 to schedule basic regression tests using this pr build and leapp-repository*PR42* as artifacts
  • /rerun-all to schedule all tests (including sst) using this pr build and leapp-repository*master* as artifacts
  • /rerun-all 42 to schedule all tests (including sst) using this pr build and leapp-repository*PR42* as artifacts

Please open ticket in case you experience technical problem with the CI. (RH internal only)

Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra.

@centos-ci
Copy link

Can one of the admins verify this patch?

@fernflower
Copy link
Member Author

@MichalHe If you can expand some TBD sections or you have any other ideas on topics to be covered - you are welcome to just push a commit :)

docs/source/debugging.md Outdated Show resolved Hide resolved
5. [TBD] Put info how to collect the logs

> **_NOTE:_** When working in initramfs stage you will need a serial console. Though openstack machines can provide
you with a novnc console, unless you need a shared dev environment consider using vagrant/libvirt.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fernflower This is not good place to add this information. Keep in mind you are adding information about a initramfs debugging that is completely irrelevant for the framework. This is the framework documentation, not documentation for the content provided by leapp-repositories. If any debugging instrusctionts regarding that should be provided, it should not be here.

Copy link
Member Author

@fernflower fernflower Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is related to leapp as a whole, not repositories only, and as leapp has been historically containing general debugging docs (like how to debug actors with rpdb information you see above) I decided to put initramfs debugging there as well.
I want this information to be public but I am not opposed to moving it, just tell where should I move it to?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can find el7toel8 directory inside docs. You need to come up where under docs specific for our upgrade repositories we should put it. We have already a task to separate leapp & leapp-repository docs, however there was no time to deal with it yet.

@fernflower
Copy link
Member Author

/rerun

@github-actions
Copy link

Copr build succeeded: https://copr.fedorainfracloud.org/coprs/build/4998023

@github-actions
Copy link

Testing Farm request for RHEL-8.6-rhui/4996744;4998023 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-8.7.0-Nightly/4996744;4998023 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-8.6.0-Nightly/4996744;4998023 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-7.9-ZStream/4996744;4998023 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-7.9-rhui/4996744;4998023 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-7.9-ZStream/4996744;4998023 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

Copy link
Member

@matejmatuska matejmatuska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions

If `/sysroot` is not mounted at the time you may need to mount it manually, e.g. with `systemctl start sysroot.mount`.

4. If the binaries are complaining about missing shared libraries, you could either set `LD_LIBRARY_PATH` variable
to `LD_LIBRARY_PATH=/sysroot/lib64:/lib64` or change root to /sysroot: `chroot /sysroot`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before chroot, kernel interfaces such as /dev /sys /proc should be mounted into the /sysroot. Otherwise some commands, e.g lsblk won't work.

I am not sure if you assume this knowledge or if it should be in the docs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should definitely be in the docs, assumed knowledge is always knowledge lost :)
Do you have a ready to run command to share?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can look at the leapp_dbg_chroot funtion in #997, but I am not 100% sure all of them are included here.

Maybe we can wait until #997 is merged and then just point to the function

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chroot is problematic from this POV (depends, what everything you would like to do inside and what are expectations). from the point of upgrades, we should always run it in the same way as leapp, creating the systemd-nspawn container with the all parameters.

docs/source/debugging.md Show resolved Hide resolved
@fernflower
Copy link
Member Author

/rerun

@github-actions
Copy link

Copr build succeeded: https://copr.fedorainfracloud.org/coprs/build/5149512

@github-actions
Copy link

Testing Farm request for RHEL-8.6-rhui/5130510;5149512 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-7.9-rhui/5130510;5149512 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-8.6.0-Nightly/5130510;5149512 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-8.7.0-Nightly/5130510;5149512 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-7.9-ZStream/5130510;5149512 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-7.9-ZStream/5130510;5149512 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

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

Successfully merging this pull request may close these issues.

5 participants