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

Merged
merged 1 commit into from
Jan 8, 2025

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_PRESERVE_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.
@MichalHe MichalHe force-pushed the run-individual-actors branch from e2a7c77 to af494d5 Compare July 15, 2024 15:45
Copy link
Member

@pirat89 pirat89 left a comment

Choose a reason for hiding this comment

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

lgtm and works as expected. @MichalHe we should also document it, but let's do that after the new documentation is used, it's not a blocker now. merging

@pirat89 pirat89 added this to the 8.10/9.6 milestone Jan 8, 2025
@pirat89 pirat89 merged commit 52cd433 into oamg:main Jan 8, 2025
15 of 17 checks passed
pirat89 added a commit to pirat89/leapp that referenced this pull request Feb 14, 2025
## Announce
This is the last Python 2.7 compatible release. Putting Py2 on its earned
rest, all the code is going to keep Python 3.6 compatibility. In the same time
we are going to stop the testing and building on RHEL 7.

## Packaging
- Bump leapp-framework to 6.0 (oamg#870)
- Bump leapp-framework-dependencies to 6 (oamg#870)
- Require PyAML (on RHEL 7) and python3-PyYAML (on RHEL 8) packages (oamg#870)
- Introduce /etc/leapp/actor_conf.d/ in the leapp rpm (oamg#885)

## Framework
### Fixes
- Increase soft limits on the number of opened file descriptors and maximum
size of manipulated files during initialization (oamg#887)

### Enhancements
- [Tech preview] Introduce configurability for leapp actors (oamg#870)

## Snactor
### Enhancements
- snactor(run): allow using an existing execution context in used leapp.db (oamg#873)

## stdlib
### Enhancements
- [Tech preview] Introduce `api.retrieve_config` function to obtain configuration for the actor based on the specified configuration schema (oamg#870)
@pirat89 pirat89 mentioned this pull request Feb 14, 2025
pirat89 added a commit to pirat89/leapp that referenced this pull request Feb 14, 2025
## Announce
This is the last Python 2.7 compatible release. Putting Py2 on its earned
rest, all the code is going to keep Python 3.6 compatibility. In the same time
we are going to stop the testing and building on RHEL 7.

## Packaging
- Bump leapp-framework to 6.0 (oamg#870)
- Bump leapp-framework-dependencies to 6 (oamg#870)
- Require PyAML (on RHEL 7) and python3-PyYAML (on RHEL 8) packages (oamg#870)
- Introduce /etc/leapp/actor_conf.d/ in the leapp rpm (oamg#885)

## Framework
### Fixes
- Increase soft limits on the number of opened file descriptors and maximum
size of manipulated files during initialization (oamg#887)

### Enhancements
- [Tech preview] Introduce configurability for leapp actors (oamg#870)

## Snactor
### Enhancements
- snactor(run): allow using an existing execution context in used leapp.db (oamg#873)

## stdlib
### Enhancements
- [Tech preview] Introduce `api.retrieve_config` function to obtain configuration for the actor based on the specified configuration schema (oamg#870)
pirat89 added a commit to pirat89/leapp that referenced this pull request Feb 14, 2025
…rned

rest, all the code is going to keep Python 3.6 compatibility. In the same time
we are going to stop the testing and building on RHEL 7.

- Bump leapp-framework to 6.0 (oamg#870)
- Bump leapp-framework-dependencies to 6 (oamg#870)
- Require PyAML (on RHEL 7) and python3-PyYAML (on RHEL 8) packages (oamg#870)
- Introduce /etc/leapp/actor_conf.d/ in the leapp rpm (oamg#885)

- Increase soft limits on the number of opened file descriptors and maximum
size of manipulated files during initialization (oamg#887)

- [Tech preview] Introduce configurability for leapp actors (oamg#870)

- snactor(run): allow using an existing execution context in used leapp.db (oamg#873)

- [Tech preview] Introduce `api.retrieve_config` function to obtain configuration for the actor based on the specified configuration schema (oamg#870)
pirat89 added a commit to pirat89/leapp that referenced this pull request Feb 14, 2025
## Announce
This is the last Python 2.7 compatible release. Putting Py2 on its earned
rest, all the code is going to keep Python 3.6 compatibility. In the same time
we are going to stop the testing and building on RHEL 7.

## Packaging
- Bump leapp-framework to 6.0 (oamg#870)
- Bump leapp-framework-dependencies to 6 (oamg#870)
- Require PyAML (on RHEL 7) and python3-PyYAML (on RHEL 8) packages (oamg#870)
- Introduce /etc/leapp/actor_conf.d/ in the leapp rpm (oamg#885)

## Framework
### Fixes
- Increase soft limits on the number of opened file descriptors and maximum
size of manipulated files during initialization (oamg#887)

### Enhancements
- [Tech preview] Introduce configurability for leapp actors (oamg#870)

## Snactor
### Enhancements
- snactor(run): allow using an existing execution context in used leapp.db (oamg#873)

## stdlib
### Enhancements
- [Tech preview] Introduce `api.retrieve_config` function to obtain configuration for the actor based on the specified configuration schema (oamg#870)
pirat89 added a commit that referenced this pull request Feb 14, 2025
## Announce
This is the last Python 2.7 compatible release. Putting Py2 on its earned
rest, all the code is going to keep Python 3.6 compatibility. In the same time
we are going to stop the testing and building on RHEL 7.

## Packaging
- Bump leapp-framework to 6.0 (#870)
- Bump leapp-framework-dependencies to 6 (#870)
- Require PyAML (on RHEL 7) and python3-PyYAML (on RHEL 8) packages (#870)
- Introduce /etc/leapp/actor_conf.d/ in the leapp rpm (#885)

## Framework
### Fixes
- Increase soft limits on the number of opened file descriptors and maximum
size of manipulated files during initialization (#887)

### Enhancements
- [Tech preview] Introduce configurability for leapp actors (#870)

## Snactor
### Enhancements
- snactor(run): allow using an existing execution context in used leapp.db (#873)

## stdlib
### Enhancements
- [Tech preview] Introduce `api.retrieve_config` function to obtain configuration for the actor based on the specified configuration schema (#870)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants