Comments (6)
hi, thanks for sharing. well, it's a little bit mystery what is exactly the content of /custom-overlay
in this context. Can you describe better how it helped you to resolve the problem?. Adding something like that would require also some documentation (like what to put inside, etc.) and if it should resolve somehow upgrades with LUKS, it would require also some detection that the directory contains expected data I would guess. adding just this, saying "you can set this envar to handle LUKS" is not something what would be helpful to people. I honestly do not know whether it's special terminology around LUKS when speaking about /custom-overlay. I hear about such a dir for the first time, so I expect that you did something more to make it useful for you.
however, adding additional custom files/dirs inside the initramfs is one of things that people can actually do without the need to modify our code, using custom actors. People can just create their custom actor to customize the initramfs content producing UpgradeInitramfsTasks
and TargetUserSpaceUpgradeTasks
messages (see definitions of these classes in models
dir; I tried to describe them in details). The custom actor could look like this (I haven't tried the code, it's possible I did some mistakes when I wrote it now):
from leapp.actors import Actor
from leapp.models import (
CopyFile,
TargetUserSpaceUpgradeTasks,
UpgradeInitramfsTasks
)
from leapp.tags import FactsPhaseTag, IPUWorkflowTag
class CustomizeUpgradeInitramfs(Actor):
name = 'customize_upgrade_initramfs'
consumes = ()
produces = (TargetUserSpaceUpgradeTasks, UpgradeInitramfsTasks)
tags = (IPUWorkflowTag, FactsPhaseTag)
def process(self):
# ... any other code to conditionalize produce of msgs below ... then
self.produce(TargetUserSpaceUpgradeTasks(copy_files=[CopyFile(src="/root/overlay", dst="/custom-overlay")]))
self.produce(UpgradeInitramfsTasks(include_files=['/custom-overlay'']))
OTOH, we expect to create/document templates for custom actors in future. Do you consider such type of template to be helpful? For now, this seems to me like an example we could use for the template. We hope to have restructuralized documentation during summer.
When you are trying to do some customisations, I suggest you to check defined models that contain Task
/ Tasks
substring:
grep -r "Model" models | grep Task
these models are specially created to simplify or make possibly various actions (and customisations) during the upgrade.
from leapp-repository.
@verdverm ah, now I read your comment in #1239 (reply in thread) which is explaining little bit more how the directory helped you. Regarding that, I guess that would be helpful to have something like UpgradeKernelCmdlineArgTasks
- analogy to TargetKernelCmdlineArgTasks
.
from leapp-repository.
for some context, we are modifying the leapp files after installing the leapp packages
- we don't know what/how to modify to get things working, so this is an easy and fast iteration cycle
- applying a few patches is much lower effort than figuring out how to develop / package / install custom actors right now
The idea for the overlay is that a user can specify an arbitrary directory to overlay. It provides flexibility to the situation and doesn't require developing and shipping a custom actor. The ENV var would be super simple from our pov
from leapp-repository.
If there is a way / tutorial on how to drop some files into an existing leapp install that would effectively do the same thing, that would be helpful and ideally better align with how to modify leapp appropriately
from leapp-repository.
Thanks for the feedback. Well I see here two things we can do:
- provide documentation how to customize this using custom actors
- once the frameworks supports configurations for actors, make it possible to configure to configure this by a configuration file so no code is needed at all
I expect we can put it into the documentation this summer. We expect to implement support for configuration files in framework during this summer also, so I expect this case could be potentially covered till Feb.
I am not in favor of another envar so much honestl, as I have the feel that number of envars possible to use in this project is becoming large and the usability would be limitted. So I prefer to stay just with options I mentioned.
@abadger headsup ^ candidate for configuration
@matejmatuska headsup ^ candidate for template
from leapp-repository.
A configuration file would be even better!
I'd be happy to check out the template concept if you have some early docs / examples.
I sort of have a thing for templates, generally speaking... https://github.com/hofstadter-io/hof :]
from leapp-repository.
Related Issues (20)
- Why does Leapp upgrade fails with 'NameError: global name 'dnf' is not defined' ? HOT 1
- NameError: global name 'dnf' is not defined HOT 1
- pes-events.json license HOT 5
- Leapp does not detect qemu64 CPU incompatibility with CentOS-9 HOT 4
- efibootmgr exit code 5 during leapp efi_finalization_fix HOT 2
- Unexpected format of target version: 7 HOT 3
- Enhancement: Support for luks encrypted root and non root filesystems HOT 6
- Leapp fails to detect all the ceph encrypted volumes HOT 1
- Current x86-64 microarchitecture is unsupported even though all flags are present HOT 14
- el8toel9: PostgreSQL upgrade warning even when using PostgreSQL 13 on EL8 HOT 1
- how to excluding a package during the upgrade process. HOT 1
- Package "X" from local repository "Y" has incorrect checksum HOT 5
- sysstat doesn't upgrade generated 7 data files correctly to 8 HOT 2
- Dependency Dashboard
- leapp preupgrade errors on OracleLinux 8 HOT 1
- leapp upgrade does not respect --target version HOT 3
- "Detected custom leapp actors or files" false positive HOT 1
- RHEL8 with EFI after upgrade to 9.x doesn't boot, because of missed GRUB config file HOT 7
- Add a disk space check in pre-upgrade HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leapp-repository.