-
Notifications
You must be signed in to change notification settings - Fork 114
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
osbuild does not produce images with populated dnf state database #455
Comments
Thanks for trying out osbuild and for providing feedback. First a minor correction: we split the regular DNF transaction in three: depsolving (libdnf), fetching (curl/librepo) and installing (rpm).
We discussed this with the I certainly do not agree that the wrong thing will always happen. Do you have some examples of behaviour you think shows that
Let's not get carried away. |
That seems flawed in practice. It only works as long as all the content you used always remains available. Within the Red Hat ecosystem, this isn't true on Fedora or CentOS. It's technically not true on RHEL either if you work with the default repositories. The SUSE ecosystem is a bit better with how they handle service pack/point release updates for SLE and openSUSE Leap, but this still eventually becomes a problem there. And of course openSUSE Tumbleweed is rolling, so...
So, there's a few issues with this: if packages were explicitly requested by the user (which could be a library package that also ships a tool, since that's common in RH/Fedora), then if another application is uninstalled that required it and DNF considered with no other things requiring it, it gets removed. This has very real consequences. Packages like If you're not willing to use DNF in offline mode to install the requested packages to populate the information correctly, you should at least use
Sorry, I'm just frustrated. This is one of these things that I do a lot of work in, both professionally and personally, and I've explored more than my fair share of tools and methods on doing it. I expected that osbuild would wind up doing this better than lorax did (which I personally disliked because the idea of using an installer for building images just adds a huge new dimension of problems, which thankfully other people finally noticed...). I also note, we still don't have an answer here for modules... |
There is no requirement for osbuild manifests to be valid for longer than necessary. The content-addressed model is used to provide strong guarantees on what data ends up in an image. It is a communication object between osbuild-manifest creators (e.g., Can you elaborate why you think this is "flawed in practice"?
This does not really respond to the situation Tom described, which is that we were told all packages are considered There is an argument to be made in favor of only marking a selected set of initial packages as I would certainly be interested in a concrete example were the current model of osbuild fails.
Can you elaborate which particular problems you see? You mentioned the failsafe mechanism, but we only use the default modules (and none of these have Similar to the |
If manifests are not useful beyond the build process, there is no point in generating them. Full stop. Your existing set of inputs for your build model implies that it's possible to make reproducible image builds. However, you are (correctly) saying that this is functionally impossible in this ticket. The way your inputs work essentially mislead users into thinking it's capable of more than it actually is. If you do not intend to support enforced version locking with reproducible inputs, then don't include a way to make people think that you can do it. Your thought process about manifests is completely the opposite of how every other system treats them, and so should not exist.
This is true up to a point. However, the behavior for
My professional interest in OSBuild is only insofar in that I expect it to support modularity properly. My personal interest is in OSBuild to simplify the Fedora image building processes. In both cases, I need both default and non-default modules to work properly for image builds. And that the resulting images aren't fundamentally broken. Right now, it would be a bad idea to use OSBuild even with default modules, because the resulting image is completely broken for ongoing usage. Because you install software in the wrong way with OSBuild, there is no way I can trust that my image is any good for production use. If I apply configuration management to a long-running instance from this image, or if I provision a bare metal system from an image built by this system, I would expect package management to work. That will definitely not be the case with RHEL, and may not be the case with Fedora. |
Just because you have not understood something does not mean there is no possible reason for it to exist. So at the very least statements like this comes across as overconfident, and takes away from the rest of what you have to say. I think the discussion would be more productive if you could point to practical problems you have found, ideally with instructions on how to reproduce them. |
I understand the value of intermediate artifacts, but I do not believe it makes any sense to expose them to people like you want to. The confusion that it will cause was one thing I did point out, and you don't seem to have an answer for that. |
You are right that the potential for confusion is something we must be aware of. In particular when/if these things are exposed in high-level tools. I'd be happy to discuss high-level design decisions like that, but I don't think this is the right forum. I am much more interested in your expertise on modularity and any issues you can actually point to there. We think we have our bases covered, but issues with reproducers would be very greatly appreciated. |
You have no other forum, so this seems pretty difficult for me to act on. |
Feel free to open dedicated issues :) |
You come here, commenting on a public open-source project, and telling its maintainers that there is no point in the project they do, "Full stop.". I find this rude and appalling and do not appreciate conversation in that tone. If you do not want to listen to arguments from our side ("Full stop."), this argument becomes tedious.
I did not say that. The And, again,
We do intend to support "enforced version locking".
I joined this project because it does not align with the status quo, because it tries something new. I appreciate that. I enjoy thinking out of the box, denying the ordinary, walking where others refuse to go. I completely disagree with the sentiment of your statement.
I am sorry, but this is quite vague. How am I supposed to test a failing dnf database, if I cannot reproduce one? I previously asked you, and I have to repeat: I would certainly be interested in a concrete example were the current model of osbuild fails.
Can you state a single example were a current osbuild manifest with default modules is "completely broken for ongoing usage"? You repeatedly claim complete brokenness and definite unfitness of osbuild, while lacking any concreteness in your descriptions. It makes it hard for me to take this seriously, and makes me wonder what your intention of this inquiry is. I would very much appreciate suggestions what parts to improve, and how. I would appreciate if you link to broken manifests, or broken builds. But if your feedback aims to call |
If you are already intending to support them like lock files, then it's fine to have them. But your answers above seemed to indicate that you insist to generate lock files while you simultaneously know that they don't work the way people expect them. There's being different, and there's breaking people's expectations. Also, it's not just Fedora where this doesn't work. Virtually all distributions have this problem, except for openSUSE Leap and SUSE Linux Enterprise, since those two don't have a rolling repository for the major version that is "reset" when a new point release is made.
What is a "current osbuild manifest"? The ones in your samples? Your samples are fine, and cockpit-composer doesn't expose the ability to install modular content, so you can't hit this problem in either one. Your manifest format is quite complex and hand-crafting one to expose the problem is not straightforward. I can trivially do it with a shell script that emulates
Look, |
I suggest opening up a separate issue if you want to discuss this. Though I'm struggling to see where you are coming from here. It is true that being able to always rebuild manifests would be nice, it is also true that in many cases where we would like that, it is currently not possible. However, that is not the reason we have manifests, and I don't understand what practical problem their existence pose to you. If you see a way to improve on this without breaking the properties we currently have and rely on, I'd be interested in hearing more about it.
If you open up separate issues for each of the concerns you have I think that would lead to a better discussion. Though bear in mind that we have many considerations to bear in mind, so it is unlikely we will be able to give you exactly what you expect and no features you don't care about. |
Just for reference, rpm-ostree has a different model for "user installed" type data, xref https://blog.verbum.org/2020/08/22/immutable-%E2%86%92-reprovisionable-anti-hysteresis/ Also, rpm-ostree has had a lockfile implementation since this commit (migrated into Rust since then) which I think duplicates the osbuild locking.
In Fedora CoreOS, we ship using lock files, and we added the "archive" repository for exactly this reason. I think there's been some discussion about expanding it beyond FCOS (because really, having exactly one version on mirrors makes no sense in a world of object stores and CDNs). |
Right, so generally the lockfile in either osbuild or rpm-ostree is useless if you don't have something like the archive repository. And archive repositories are not going to be common because that requires a lot of money to maintain, which is unreasonable for most distributions or people to expect to have. |
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems.
It's been a while but I'll be diving into marking packages in the DNF state database as this needs to be resolved for the Fedora installer(s). I'll likely be marking user requested packages (the top level packages in It also seems that modularity is proposed for removal in f39 which might simplify some things down the road. |
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems.
Sorry, this comment was blatantly wrong (if you got an email about it); I was mixing up VM images before being sufficiently caffeinated. Comment used to say that there are no Still figuring out groups. |
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems. This stage conditionally selects `dnf5` or `dnf` semantics.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems. This stage conditionally selects `dnf5` or `dnf` semantics.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems. This stage conditionally selects `dnf5` or `dnf` semantics.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems. Two stages are provided, one for dnf-3 and one for dnf5.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems. Two stages are provided, one for dnf-3 and one for dnf5.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems. Two stages are provided, one for dnf-3 and one for dnf5.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems. Two stages are provided, one for dnf-3 and one for dnf5.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems. Two stages are provided, one for dnf-3 and one for dnf5.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems. Two stages are provided, one for dnf-3 and one for dnf5.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See osbuild#455. This ensures that packages don't get removed during `autoremove` leading to broken systems.
This adjustment allows the definition of the mark with the RPMs and runs DNF after installing the RPMs to put the proper markings in the DNF state database. See #455. This ensures that packages don't get removed during `autoremove` leading to broken systems.
Putting @richm's post here in full since it's also related:
|
This makes me wonder if it really is the same issue. I'm not 100% clear on what's happening with the ansible module, so maybe @richm can check my assumptions here, but the way the issue is described makes me think that there's an ansible step that's doing (the equivalent of) For example, on a fresh system built by osbuild, running It sounds to me that even with the dnf metadata, without repo metadata (or with repo metadata older than the |
I believe this is how the ansible module is working. Which means it isn't an Ansible or Ansible So is the issue that |
It is currently not used at all. I'm working on some modularity related work recently which might mean I'll revisit the idea of having metadata available during and after build time again (and it might lead to this issues being solved). |
Package fetching and installation happens outside the operating system tree that's being built, so repository metadata is only available on the host that's generating the manifest (as a side effect of the depsolve). It would be technically possible to seed the new system with repository metadata, but I think that would be a strange choice. It would essentially be pre-loading caches on a cold system, caches that have a relatively short expiration even, meaning you'd probably want to refresh them on first boot anyway. |
The rpm repo metadata cache discussion is quite off topic from the original issue here however. Perhaps we should move this discussion back to the original issue if we want to keep talking about it. |
Since #328, osbuild has split its software installation into two stages:
sources
for fetching content using DNF, andrpm
for installing them into the target image environment. This would be fine, except... therpm
stage doesn't use DNF to install.This is actually a problem, since it means that the generated images now lack the DNF state database information that is used later for providing information to make intelligent decisions with the system software in future transactions. For example, the lack of any state information means that
dnf autoremove
is fundamentally broken and will always do the wrong thing, since we don't have packages installed via DNF so that things are marked asuser-installed
ordep-installed
accordingly.Additionally, if modular content is installed this way, we now have a situation where DNF is broken in the target image because the failsafe mechanism that was requested for RHEL modules will cause DNF to choke since there will be a situation where you have "modular" packages installed without the corresponding module metadata.
Of course, if you're producing images with no package manager, then this isn't a problem. Or if you aren't using modular content, then the damage is limited. But if you're building custom RHEL 8 images, then this is a problem.
Now, reading back through the history of why this happened, it looks like the goal was to avoid requiring network access for the build stages, presumably to provide a mechanism in which all the inputs could be archived and replayed to generate the same image reproducibly. This is definitely an admirable goal.
My suggestion would be to do the following:
sources
stage, depsolve for the content you need, and fetch it. Then generate a rpm-md repository.module_hotfixes=1
so modular packages install), and use it to install software as requested, rather than taking the pile of RPMs and doing the installation by hand.This strategy is actually how offline appliance-tools/livecd-tools and kiwi image builds are often done. You can just make that process automatic with osbuild.
Now this doesn't solve all the problems, since there's still the pesky issue of dealing with modular packages. One possible option would be to reposync the module out and merge that into your local repository's metadata. That would allow it to function the same way it does on a normal system, and have the correct tracking information so that the package manager works properly.
I'm open to ideas here, but the current way osbuild installs software into an image leads to images that potentially won't work as users expect them to.
The text was updated successfully, but these errors were encountered: