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

Correct COPR repo file generation in Agent container builds (b0.73) #3544

Merged

Conversation

webbnh
Copy link
Member

@webbnh webbnh commented Sep 1, 2023

The build used to produce Agent container images for releases uses RPMs pulled from DNF repositories on COPR. The build generates a .repo file which allows DNF to access the appropriate Agent RPM. The .repo file is constructed by the build from a template. The parameters for the template are provided by a .yml file which the build also generates.

In #3479, the .repo template was modified, and one of the parameters names was changed from name to tag. However, that PR was aimed at Ansible functionality, and the requirements for the Agent release container build were overlooked.

The .repo file is generated with two entries, and, without the related change, both entries end up with the same label. This results in the second entry superseding the first entry, such that the RPM search doesn't reach the Pbench-0.73 repository, and so it doesn't find the Pbench Agent v0.73 RPM. Ideally, this would have resulted in an obvious failure, but, as it happens, the version-independent Pbench repository (which contains RPMs for things like pbench-sysstat, etc.) contains the RPM for Pbench Agent v0.71, and DNF installs that. And, so the result is a "successful" build of the Agent container but it contains the wrong version of the Pbench Agent.

This PR corrects the template for the generation of the .yml file. As a result, the .repo file is generated correctly, which allows DNF to find the correct version of the Pbench Agent RPM, which results in a correctly constructed container image.

@webbnh webbnh added bug Agent Code Infrastructure packaging Issues related to software packaging Containerization Of and relating to the process of setting up and maintaining container images labels Sep 1, 2023
@webbnh webbnh added this to the v0.73 milestone Sep 1, 2023
@webbnh webbnh self-assigned this Sep 1, 2023
@ndokos ndokos self-requested a review September 1, 2023 15:37
@ndokos
Copy link
Member

ndokos commented Sep 1, 2023

Maybe there is a way to have just one template and link it from the two places that need it?

@webbnh
Copy link
Member Author

webbnh commented Sep 1, 2023

Maybe there is a way to have just one template and link it from the two places that need it?

Which template, the .repo.j2 or the .yml.j2? We already share the .repo.j2 template (the container build pulls it from the agent/ansible subtree)...the problem was that the container build's .yml.j2 template no longer contained the right parameters after the shared template was updated.

I.e., the root cause of this problem was that it wasn't obvious from the Ansible side that the .repo template was shared...are you suggesting a change to remedy that? (E.g., move the file to somewhere more central, like agent/templates, perhaps, and then symlink or reference it from there?...what would be the effect on the Ansible support if one of the files were "outside the tree"?)

@webbnh webbnh merged commit e0bc910 into distributed-system-analysis:b0.73 Sep 1, 2023
3 checks passed
@webbnh webbnh deleted the b0.73-fix-copr-repo branch September 1, 2023 16:18
@webbnh
Copy link
Member Author

webbnh commented Sep 1, 2023

Maybe there is a way to have just one template and link it from the two places that need it?

@ndokos, I'm not going to make this change in the b0.73 branch. Let's move this discussion to #3545.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agent bug Code Infrastructure Containerization Of and relating to the process of setting up and maintaining container images packaging Issues related to software packaging
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants