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

snactor(run): allow using leapp's execution contexts #873

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MichalHe
Copy link
Member

@MichalHe MichalHe commented Jul 3, 2024

Introduce the LEAPP_DEBUG_PRESERVE_CONTEXT environmental variable. When the variable is set to 1 and the environment has LEAPP_EXECUTION_ID set, the LEAPP_EXECUTION_ID is not overwritten with snactor's execution ID. This allows the developer to run actors in the same fashion as if the actor was run during the last leapp's execution, thus, avoiding to rerun the entire upgrade process. This, naturally, does not help when the actor has outside dependencies, i.e., it requires the filesystem to be set up in a specific way (e.g. a target container) must be present, e.t.c.

Usage:

  1. run leapp upgrade
  2. if you observe your actor crashing, run leapp-inspector executions and pick the latest execution ID
  3. do export LEAPP_DEBUG_PERSERVE_CONTEXT=1 LEAPP_EXECUTION_ID=<id> where <id> is the ID of the last exection (output of the previous step)
  4. run your actor as snactor run --config /etc/leapp/leapp.conf --actor-config IPUConfig <ActorName (class name)> --print-output
  5. your actor will be executed with the same input messages that caused the failure

Copy link

Based on your Packit configuration the settings of the @oamg/leapp Copr project would need to be updated as follows:

field old value new value
chroots ['epel-8-x86_64', 'fedora-39-aarch64', 'fedora-39-x86_64', 'fedora-40-x86_64', 'epel-7-x86_64', 'fedora-40-aarch64', 'fedora-rawhide-x86_64', 'fedora-rawhide-aarch64', 'epel-9-x86_64'] ['epel-7-ppc64le', 'epel-7-x86_64', 'epel-8-x86_64', 'epel-9-x86_64', 'fedora-39-aarch64', 'fedora-39-x86_64', 'fedora-40-aarch64', 'fedora-40-x86_64', 'fedora-rawhide-aarch64', 'fedora-rawhide-x86_64']

Diff of chroots:

+epel-7-ppc64le

Packit was unable to update the settings above as it is missing admin permissions on the @oamg/leapp Copr project.

To fix this you can do one of the following:

  • Grant Packit admin permissions on the @oamg/leapp Copr project on the permissions page.
  • Change the above Copr project settings manually on the settings page to match the Packit configuration.
  • Update the Packit configuration to match the Copr project settings.

Please retrigger the build, once the issue above is fixed.

@pirat89
Copy link
Member

pirat89 commented Jul 4, 2024

@MichalHe the rebase against master will fix packit :)

Introduce the 'LEAPP_DEBUG_PRESERVE_CONTEXT' environmental variable.
When the variable is set to 1 and the environment has
'LEAPP_EXECUTION_ID' set, the 'LEAPP_EXECUTION_ID' is not overwritten
with snactor's execution ID. This allows the developer to run actors
in the same fashion as if the actor was run during the last leapp's
execution, thus, avoiding to rerun the entire upgrade process.
This, naturally, does not help when the actor has outside dependencies,
i.e., it requires the filesystem to be set up in a specific way (e.g.
a target container) must be present, e.t.c.
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.

2 participants