Bug 2042429 - Multivalued options created with wrong syntax
Summary: Multivalued options created with wrong syntax
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: puppet-keystone
Version: 17.0 (Wallaby)
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: beta
: 17.0
Assignee: Douglas Mendizábal
QA Contact: Jeremy Agee
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-19 14:04 UTC by Eric Nothen
Modified: 2022-09-21 12:19 UTC (History)
21 users (show)

Fixed In Version: puppet-keystone-18.5.1-0.20220628111339.2606fdf.el9ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1608389
Environment:
Last Closed: 2022-09-21 12:18:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 847439 0 None stable/wallaby: MERGED puppet-keystone: Add support for MultiStrOpt (I84bb99e1ad746611d31f2e950614be73de4e8f0e) 2022-06-29 15:04:32 UTC
Red Hat Issue Tracker OSP-15974 0 None None None 2022-06-24 10:21:38 UTC
Red Hat Product Errata RHEA-2022:6543 0 None None None 2022-09-21 12:19:15 UTC

Description Eric Nothen 2022-01-19 14:04:08 UTC
+++ This bug was initially created as a clone of Bug #1608389 +++

Description of problem:
The keystone notification driver is a multivalued parameter, i.e. several drivers can be enabled. 

To do this from Director, I'm using the following:

  ControllerExtraConfig:
    keystone::notification_driver:
      - "log"
      - "messagingv2"


This produces the following configuration on /var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf:

[oslo_messaging_notifications]
driver=log,messagingv2

Which causes the following error on /var/log/containers/keystone/keystone.log:

2022-01-19 12:46:11.727 35 WARNING stevedore.named [req-36361896-1650-4275-bdfb-70ab55fd2377 - - - - -] Could not load log,messagingv2


As reported on the original BZ, configuration should be multi-line:

[oslo_messaging_notifications]
driver=log
driver=messagingv2

Comment 2 Eric Nothen 2022-01-20 08:54:12 UTC
Workaround for this issue using a NodeExtraConfigPost, as detailed on [1]


# 1. Environment file required for cadf, with multiple drivers for Keystone:

[stack.lab ~]$ cat templates/keystone.yaml 
parameter_defaults:
  NotificationDriver: "messagingv2"
  KeystoneNotificationTopics: "notifications"
  KeystoneRegion: TESTREGION
  KeystoneNotificationFormat: "cadf"
  ControllerExtraConfig:
    keystone::notification_driver:
      - "log"
      - "messagingv2"
    cinder::ceilometer::notification_driver: "log"
    glance::notify::rabbitmq::notification_driver: "log"
    heat::notification_driver: "log"
    neutron::notification_driver: "log"
    nova::notification_driver: "log"
    keystone::config::keystone_config:
      DEFAULT/notification_opt_out:
        value: "identity.authenticate.pending"


# 2. ConfigPost environment file:

[stack.lab ~]$ cat templates/overcloud-post.yaml 
resource_registry:
  OS::TripleO::NodeExtraConfigPost: /home/stack/post-deploy/keystone-driver-fix.yaml


# 3. Heat template that fixes keystone.conf:

[stack.lab ~]$ cat post-deploy/keystone-driver-fix.yaml 
heat_template_version: rocky

description: >
  Workaround to the [oslo_messaging_notifications]driver issue reported on BZ#2042429

parameters:
  servers:
    type: json
  DeployIdentifier:
    type: string
  EndpointMap:
    default: {}
    type: json

resources:
  CustomExtraConfig:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      config: |
        #!/bin/bash
        set -x
        if [ -f /var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf ] ;then
            sed -i 's/\(^driver\)=\(.*\),\(.*\)$/\1=\2\n\1=\3/' /var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf && \
            systemctl restart tripleo_keystone.service
        fi

  CustomExtraDeployments:
    type: OS::Heat::SoftwareDeploymentGroup
    properties:
      servers:  {get_param: servers}
      config: {get_resource: CustomExtraConfig}
      actions: ['CREATE','UPDATE']
      input_values:
        deploy_identifier: {get_param: DeployIdentifier}

[stack.lab ~]$ 


[1] https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html-single/advanced_overcloud_customization/index#sect-Customizing_Overcloud_PostConfiguration_All

Comment 3 Eric Nothen 2022-03-17 16:36:01 UTC
Hey, not urgent I know, but would it be possible to review this BZ and assign a target milestone, so that I can tell my customer on which Z stream to expect a fix?

Comment 6 Luca Miccini 2022-06-27 05:10:26 UTC
wallaby backport: https://review.opendev.org/c/openstack/puppet-keystone/+/847439

Comment 20 dabarzil 2022-08-30 14:11:16 UTC
verified:
[root@controller-0 ~]# rpm -qa| grep puppet-keystone-18.5.1-0.20220628111339.2606fdf.el9ost
puppet-keystone-18.5.1-0.20220628111339.2606fdf.el9ost.noarch

[root@controller-0 ~]# grep -A 15 'oslo_messaging_notifications' /var/lib/config-data/puppet-generated/keystone/etc/keystone/ -r
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf:[oslo_messaging_notifications]
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf-
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf-#
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf-# From oslo.messaging
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf-#
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf-
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf-# The Drivers(s) to handle sending notifications. Possible values are
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf-# messaging, messagingv2, routing, log, test, noop (multi valued)
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf-# Deprecated group/name - [DEFAULT]/notification_driver
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf-#driver =
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf-driver=log
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf-driver=messagingv2
/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf-

Comment 24 errata-xmlrpc 2022-09-21 12:18:51 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 (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), 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-2022:6543


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