Bug 1430545 - [RFE] Define how to use advanced subscription/pool assignments per role (pre-/post-deployment hooks)
Summary: [RFE] Define how to use advanced subscription/pool assignments per role (pre-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 12.0 (Pike)
Hardware: All
OS: All
high
medium
Target Milestone: Upstream M2
: 14.0 (Rocky)
Assignee: Emilien Macchi
QA Contact: Gurenko Alex
URL:
Whiteboard:
: 1368037 1396351 1408571 1456957 1462084 (view as bug list)
Depends On:
Blocks: 1373538 1400606 1435500 1442136 1462958 1469582 1615694
TreeView+ depends on / blocked
 
Reported: 2017-03-08 21:58 UTC by Jaromir Coufal
Modified: 2023-09-07 18:51 UTC (History)
22 users (show)

Fixed In Version: openstack-tripleo-heat-templates-9.0.0-0.20180710202746.d2994ca.el7ost
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-11 11:47:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-4606 0 None None None 2021-12-10 14:59:07 UTC
Red Hat Product Errata RHEA-2019:0045 0 None None None 2019-01-11 11:47:25 UTC

Description Jaromir Coufal 2017-03-08 21:58:57 UTC
We have several requests on attaching specific subscriptions to specific roles, defining multiple pools, etc.

Instead of re-implementing subscription manager, keep our default way and provide a way on how to achieve advanced use cases (subscription per role, multiple pools, etc). This should be already doable via pre-/post-deployment hooks. If not, please comment and we will need to re-evaluate the scope.

Related BZs will be linked as dependent on this specific RFE.

Procedure will need to be defined by Eng, tested by QE and documented by Docs team.

Comment 2 Jaromir Coufal 2017-03-13 06:09:06 UTC
*** Bug 1396351 has been marked as a duplicate of this bug. ***

Comment 3 Jaromir Coufal 2017-03-13 06:14:27 UTC
*** Bug 1368037 has been marked as a duplicate of this bug. ***

Comment 4 Jaromir Coufal 2017-03-13 06:16:32 UTC
*** Bug 1408571 has been marked as a duplicate of this bug. ***

Comment 6 Jaromir Coufal 2017-06-13 14:08:29 UTC
Keeping in OSP12 since this is best practices / documentation only (of course supported by QE) but no code is involved - no risk on disrupting product delivery.

Comment 8 Emilien Macchi 2017-06-16 12:31:57 UTC
*** Bug 1462084 has been marked as a duplicate of this bug. ***

Comment 20 Emilien Macchi 2017-10-31 16:08:53 UTC
See https://blueprints.launchpad.net/tripleo/+spec/rhsm-integ-ansible where I think this blueprint would help to achieve this RFE.

Comment 21 Gurenko Alex 2017-10-31 17:36:22 UTC
There is an ansible module already existing for these needs: http://docs.ansible.com/ansible/latest/redhat_subscription_module.html we can just document the proceedure and publish some examples for now and build something around it in future releases

Comment 25 Vincent S. Cojot 2017-12-20 16:07:30 UTC
I think I just got this working on OSP10 and without needing to hack into rhel-registration.
rhel-registration is just a pre-config hook. It means it is usually called from your env file in this manner:
​
resource_registry:
 ​[...]
  OS::TripleO::NodeExtraConfig:                 all-pre-config.yaml
​
..which, in turn, points to something like this:
​​
resources:
  RhelRegistrationPreConfig:
    type: all-pre-config/rhel-registration.yaml
    properties:
        server: {get_param: server}

So, in order to override -some- parameters for some node Roles, I split the pre-config hooks this way:
​
resource_registry:
​[...]​
  OS::TripleO::ControllerExtraConfigPre:        controller-pre-config.yaml
  OS::TripleO::ComputeExtraConfigPre:           compute-pre-config.yaml
  OS::TripleO::CephStorageExtraConfigPre:       ​​ceph-pre-config.yaml
  OS::TripleO::NodeExtraConfig:                 all-pre-config.yaml
​

Each of these sub-files looks like this (here, the ceph pre-config file, ​ceph-pre-config.yaml ):
​
$ cat ceph-pre-config.yaml
heat_template_version: 2014-10-16
description: 'Extra Pre-Deployment Config, Ceph'
parameters:
  server:
    type: string
  rhel_reg_repos:
    type: string

resources:
  RhelRegistrationPreConfig:
    type: ​​all-pre-config/​​rhel-registration.yaml
    properties:
        server: {get_param: server}
        ​​rhel_reg_repos: "rhel-7-server-rpms,rhel-7-server-supplementary-rpms,rhel-7-server-optional-rpms,rhel-7-server-extras-rpms,rhel-7-server-openstack-10-rpms,rhel-7-server-openstack-10-tools-rpms,rhel-7-server-openstack-10-optools-rpms,rhel-7-server-openstack-10-devtools-rpms,rhel-7-server-rhceph-2-osd-rpms,rhel-7-server-rhceph-2-mon-rpms,rhel-7-server-rhceph-2-tools-rpms,rhel-7-server-satellite-tools-6.2-rpms"

outputs:
  deploy_stdout:
    value:
      list_join:
      - ''
      - - {get_attr: [RhelRegistrationPreConfig, deploy_stdout]}
​

Here, the '​rhel_reg_repos' parameter is role-dependent and the deployment will re-use the rest of the global parameters found in ​all-pre-config/rhel-registration.yaml before calling the actual script (rhel-registration).
Note, that I used '​rhel_reg_repos' in this example but really any parameter found in ​rhel-registration.yaml [1] can be overridden in this fashion.
Works for me (tm), tested on OSP10z6:

Comment 26 Emilien Macchi 2018-01-08 21:00:51 UTC
*** Bug 1456957 has been marked as a duplicate of this bug. ***

Comment 35 Gurenko Alex 2018-11-29 13:29:45 UTC
Feature test consistently passing downstream CI since puddle 2018-10-17.2

Comment 37 errata-xmlrpc 2019-01-11 11:47:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:0045


Note You need to log in before you can comment on or make changes to this bug.