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

Introduce a new redhat-cloud-client-configuration-cdn binary package #15

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ptoscano
Copy link
Contributor

@ptoscano ptoscano commented Nov 11, 2024

The existing redhat-cloud-client-configuration binary package has a well-defined behaviour when used in cloud images:

  • enable the subscription-manager automatic registration
  • ensure that there is no content available by default from subscription repositories (and thus keep RHUI as source)

Since soon a different behaviour will be needed, then create a new redhat-cloud-client-configuration-cdn binary package to represent that behaviour separately:

  • keep enabling the automatic registration
  • do not disable the subscription repositories
  • ensure to disable the non-public RHEL RHUI repositories:
    • use a "flag file" that soon will be introduced in the RHUI client packages for this
    • use a firstboot script that will disable the repositories; it will run in case /etc/rhccc-firstboot-run is there, which will be touch'ed when creating the cloud images with redhat-cloud-client-configuration-cdn

See the messages of the individual commits for more details.

Card ID: CCT-701

@ptoscano ptoscano force-pushed the ptoscano/cdn-subpkg branch from a1c4c63 to c37b149 Compare January 6, 2025 15:03
@ptoscano
Copy link
Contributor Author

ptoscano commented Jan 6, 2025

/packit build

@ptoscano ptoscano force-pushed the ptoscano/cdn-subpkg branch from c37b149 to 66a9430 Compare January 7, 2025 15:28
@ptoscano
Copy link
Contributor Author

ptoscano commented Jan 7, 2025

/packit build

@ptoscano ptoscano force-pushed the ptoscano/cdn-subpkg branch from 66a9430 to da9dfd9 Compare January 7, 2025 16:26
@ptoscano
Copy link
Contributor Author

ptoscano commented Jan 7, 2025

/packit build

Copy link

@m-horky m-horky left a comment

Choose a reason for hiding this comment

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

In general, the patch looks good. I'd like a clarification on rhcd/yggdrasil handling.

redhat-cloud-client-configuration.spec Show resolved Hide resolved
redhat-cloud-client-configuration.spec Outdated Show resolved Hide resolved
redhat-cloud-client-configuration.spec Show resolved Hide resolved
@ptoscano ptoscano mentioned this pull request Jan 14, 2025
Explicitly lists all the files that are installed as part of the
redhat-cloud-client-configuration binary package: this way, when
new files will be added for other binary packages, they will not be
implicitly installed in redhat-cloud-client-configuration.

There is no behaviour change.

Signed-off-by: Pino Toscano <[email protected]>
Create a new redhat-cloud-client-configuration-cdn binary package
as exact copy of the redhat-cloud-client-configuration binary package.

Since they are supposed to cover different use cases, and thus never
installed together, ensure that each conflicts against the other one.

Signed-off-by: Pino Toscano <[email protected]>
The redhat-cloud-client-configuration-cdn binary package will ensure
that the registered system will fetch the content from the default CDN
configured in subscription-manager. Hence, drop the bits from the
%post and %postun scriptlets of the package that tweak the
"manage_repos" configuration option of subscription-manager.

Signed-off-by: Pino Toscano <[email protected]>
The redhat-cloud-client-configuration-cdn binary package will ensure
that the system does not get content via RHUI by default, in case it is
installed, as that is what the automatic registration of
subscription-manager will provide.

Because of that:
- create /var/lib/rhui/disable-rhui on installation (removing it on
  removal) to tell RHUI to not enable any repository; this happens
  during the upgrade of the RHUI packages
- create a boot systemd service that runs a script which tries to
  disable all the non-public RHUI repositories available (typically the
  RHEL repositories)
  - both the systemd service and the script should work also when RHUI
    is not installed
  - the service will run only once when /etc/rhccc-firstboot-run is
    available

Signed-off-by: Pino Toscano <[email protected]>
@ptoscano ptoscano force-pushed the ptoscano/cdn-subpkg branch from da9dfd9 to 67b5a6d Compare January 14, 2025 16:50
Copy link

@m-horky m-horky left a comment

Choose a reason for hiding this comment

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

LGTM. Let's wait for QE ack before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants