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

Apply version restrictions to all packages #996

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

nbarrientos
Copy link
Contributor

As there are packages installed by the module that escape from the version pin that can be set via foreman::version, the following situation might occur:

(Assuming foreman::version set to 2.4.0-1 and that 2.4.1-1 is the latest version available in the configured repositories)

  • Puppet run n

    • Puppet installs foreman-postgresql-2.4.0-1.
    • Puppet installs foreman-service latest (due to ensure => installed)
      • DNF installs foreman-service-2.4.1-1
      • This triggers the update of foreman to foreman-2.4.1-1 to match foreman-service's requirements.
      • This triggers the update of foreman-postgresql to 2.4.1-1 to match foreman-postgresql's dependency on foreman.
    • The Puppet run ends leaving the system in an undesired state.
  • Puppet run n+1:

    • Puppet downgrades foreman-postgresql to 2.4.0-1.
      • This triggers the downgrade of several packages, namely foreman, foreman-service, foreman-dynflow-sideqik, etc. This downgrade operation might or might not succeed :)

By ensuring that all packages are installed with the same version restrictions since the beginning, the unnecessary downgrade and the temporary bad system state explained above can be avoided.

(Internal note: applied locally as 027197f54e704fcab9cc5187193fe2e0009a7510).

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, just one small inline comment.

manifests/install.pp Outdated Show resolved Hide resolved
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all subpackages generated from foreman.spec and the Debian equivalent so 👍 when the tests are green.

@ehelms ehelms mentioned this pull request Oct 24, 2021
4 tasks
@ekohl ekohl merged commit f60a8ba into theforeman:master Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants