-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add --actor-config to snactor run #627
Conversation
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the Leapp Guidelines, pass tests and linter checks before it can be merged. If you want to re-run tests or request review, you can use following commands as a comment:
|
leapp/snactor/commands/run.py
Outdated
@@ -19,10 +19,18 @@ | |||
''' | |||
|
|||
|
|||
def _get_model(name, repo): | |||
try: | |||
return {model.__name__.lower(): model}[name.lower()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Traceback (most recent call last):
File "/usr/bin/snactor", line 9, in <module>
load_entry_point('leapp==0.10.0', 'console_scripts', 'snactor')()
File "/usr/lib/python2.7/site-packages/leapp/snactor/__init__.py", line 78, in main
cli.command.execute(version=_('snactor version {}').format(VERSION))
File "/usr/lib/python2.7/site-packages/leapp/utils/clicmd.py", line 103, in execute
args.func(args)
File "/usr/lib/python2.7/site-packages/leapp/utils/clicmd.py", line 125, in called
self.target(args)
File "/usr/lib/python2.7/site-packages/leapp/utils/repository.py", line 20, in checker
return f(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/leapp/snactor/context.py", line 32, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/leapp/snactor/commands/run.py", line 46, in cli
config_model = _get_model(args.actor_config, repository) if args.actor_config else None
File "/usr/lib/python2.7/site-packages/leapp/snactor/commands/run.py", line 24, in _get_model
return {model.__name__.lower(): model}[name.lower()]
NameError: global name 'model' is not defined
94287de
to
8669cac
Compare
8669cac
to
5dfd9b0
Compare
@vinzenz is this still WIP? |
eedc9e3
to
37575d3
Compare
Tested, seems to be working fine. @pirat89 any potential comments here? |
@vinzenz I originally thought the failed tests was due to some outage but:
could you please take a look? |
c1bb512
to
3e2f175
Compare
Is the option only meant to be used for |
@drehak It is meant just for "IPUConfig" model as this is used differently then other models. Please note that you still have to run "IPUWorkflowConfig" actor to generate the data, same as to get the messages from other actors, which however do not require any special treatment. HTH. |
@Rezney if it's for and only for IPUConfig, shouldn't the option just be a flag? Being able to specify any model as an argument is kinda pointless, if the argument is going to be IPUConfig anyway. |
@drehak To give a real example. We may (or may not) want to migrate Convert2RHEL to LEAPP. In this case, there would be a new repository, with a new workflow, and a new config model C2RConfig. HTH |
3e2f175
to
5f64afb
Compare
@Rezney Alright, looks good to me then. |
@vinzenz could you please also document this? |
This patch introduces support for specifying a model which the actor should consume for configuration data. Using this feature requires to run an actor before which produces this model and saves the output. Additionally to facilitate the testing needs for this PR `snactor messages add` has been added, which allows injecting messages from the commandline. Jira-Task: OAMG-1092 Signed-off-by: Vinzenz Feenstra <[email protected]>
5f64afb
to
6f55fba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc added. Approved...
## Packaging - Bump required leapp-framework capability to 1.4 (oamg#642) ## Upgrade handling ### Fixes - Fix comparison of the newest installed and booted kernel (oamg#600) - Fix remediation command for ipa-server removal (oamg#617) - Fix crash due to missing network interfaces during upgrade phases (oamg#625) - Fix error with /boot/efi existing on non-EFI systems (oamg#627) - Fix false positive detection of issue in /etc/default/grub that led into GRUB prompt (oamg#587) - Fix syntax error in upgrade script (oamg#619) - Inhibit upgrade with mount options in fstab that break mounting on RHEL 8 (oamg#639) - Inhibit upgrade on s390x machines with /boot on a separate partition (oamg#641) - Inhibit upgrade if multiple kernel-debug pkgs are installed (oamg#599) - Remove the initial-setup package to avoid it asking for EULA acceptance during upgrade (oamg#626) - Remove the *leapp-resume* service after the *FirstBoot* phase to prevent kill of the leapp process on `systemctl daemon-reload` (oamg#611) ### Enhancements - Add upgrade support for SAP HANA (own upgrade path) (oamg#503) - Allow upgrade with SCA enabled manifest (oamg#615) - Add actors to migrate Quagga to FRR (oamg#467) - Add stable uniq Key id for every dialog (oamg#618) - Respect the *kernel-rt* package (oamg#600) ## Additional changes interesting for devels - Add a possibility to overwrite virtualenv name using `$VENVNAME` (oamg#613) - Update product certificates for RHEL 8.3 GA and 8.4 Beta/HTB (oamg#624) Related leapp release: https://github.com/oamg/leapp/releases/tag/v0.12.0
This patch introduces support for specifying a model which the actor
should consume for configuration data.
Using this feature requires to run an actor before which produces this
model and saves the output.
Jira-Task: OAMG-1092
Signed-off-by: Vinzenz Feenstra [email protected]
Fixes #530