-
Notifications
You must be signed in to change notification settings - Fork 71
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
Homogenize how we handle mirrored repositories on salt states #860
Comments
@juliogonzalez @rjmateus that make sense for you guys? I think this will be very benefitial to improve maintainability and readability. |
I don't think this is going to fly as you expect. IIRC FMPOV there's something more urgent than this. We need a refactor of the way we manage the repositories for each OS. Having a single SLS file doesn't scale anymore. Then we can think about simplifying this as well (if possible). |
@juliogonzalez it doesn't matter the path used in the source origin, we can mirror any kind of url on minima, by using the example I provided and will mirror the content with exactly the same path. But what we CAN'T afford is to use different content when we are using a mirror or not using a mirror, this will lead to misunderstandings, problems to maintain, unsync content, etcetera. I would like to clarify something about Minima mirror, this is how I see the Minima mirror usability:
Any repository used in Sumaform must be only temporary, using them to deploy and set up the environment, so none of these repositories must be used by SUMA or clients after the deployments. Also, all the repositories used for Uyuni must be accessible without our internal SUSE network. |
I don't recall exactly why this was done, and do not have time at this moment to research it again, but I seem to remember there was a reason to have this for products that come from "NCC". Please note that this "strange" thing happens only for SLE11 and (IIRC) RES6. Maybe @rjmateus or @mcalmer remember better than me and know if your proposal will work. |
@srbarrios minima will mirror an URL keeping its directory structure intact. If the server we are mirroring from has a different path than the URL served by SCC, then something has to bridge that gap. Currently the gap is bridged in the SLS file, we could also move it to the minima configuration file, but the association still needs to be maintained somewhere. So I would love to have one URL to rule them all and just change the host, but that is fundamentally not possible at least in some cases. I would not be against moving the mapping somewhere else sensible. |
@moio could you please tell me why the proposed change in the description will not work?
Please let me know why we follow a strategy to use a different source of content when we use a mirror and when we don't use a mirror. In my understanding, as I described, we should use the mirror as a kind of proxy-cache, so we serve byte by byte the same content that we would download without the mirror. |
The problem is, that SCC has an "input" URL and an "output" URL which must not be the same. As long as we mirror everything from SCC/updates.suse.com directly, we get the output URL which then should be created also on the mirror. We can have 1 path independend of the mirror or scc used. But if we use an internal mirror or the staging area, we get the "input" url which might be different to what SCC has as output URL. This problem affects mostly SLES11 repos and maybe external repos like nvidia. I would try to use https://updates.suse.de/ . Here you have the chance to get the URLs at the same place as SCC has it as output. |
As I understand, this is not the problem I want that we address in this refactor. This is just another issue we have related to "this mirror that we are using as origin source" in some repos. The refactor aims to simplify the code by using in-line jinja expression and by using always the same URI path with/without mirror. And as far we mirror what we use when we don't use a mirror, via http section of minima.yml, I can't see the technical issue. |
I agree that have it homogenize is a good thing. If what Michael mentioned is not a problem I think this would be great, and code would be simpler. |
@srbarrios I do not disagree with the concept either - we are just warning you it might not be possible to apply it in all cases. We are all on the same page to homogenize to the extent posisble! |
I know I know, I just want to understand where it can not by applied, and the reason about it. If you want, I can make a draft, and we try it, not sure if this sprint, but sometime soon. |
I am not sure I fully understand your idea, but feel free to open a PR. I am in general fine with any PR that makes our life easier, provided it does not negatively impact current sumaform use cases. As long as the sumaform mirror continues to work, feel free to shuffle URLs around to make code more readable. |
First of all, I would like that we agreed on something:
The repository URIs provided when we don't have set up the "mirror" grain, must be identical to the URIs provided when we have a "mirror" grain; differentiating them only by the domain name where sumaform request this content.
If we agree on that assumption, I would like to refactor some Jinja
if
statements, homogenizing the way we handle those mirrored repositories.In my opinion, it will be less error-prone if we use this format:
Instead of this other format, also found in the salt states:
So, ideally, the above snipper could be refactored as:
Having in our minima mirror, on the http section, these lines:
Note that in this example we are using a mirror as source origin, but please just don't pay attention to that detail. The general idea is that we have in our minima mirror exactly what we have as origin source, it doesn't matter for this refactor if it comes from OBS, IBS, or any other source.
The text was updated successfully, but these errors were encountered: