0235b45982
The HieraPuppet.lookup() function malfunctions when hiera v5 is used. In order to have Hiera v5 working, the function was replaced by the 'puppet lookup' command. Hiera v5 should be used instead of Hiera v3 to avoid the following warning during bootstrap: "/etc/puppet/hiera.yaml: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5" Also replaced the default path in which keystone.rb looks for openstacklib since a custom installation directory is being used. Debian Bullseye tests: PASS: Build & install PASS: Successful Bootstrap Story: 2009964 Task: 45008 Signed-off-by: Matheus Machado Guilhermino <Matheus.MachadoGuilhermino@windriver.com> Change-Id: I570aa6e06448e00b96882629b54882a1467740c5
38 lines
1.5 KiB
Diff
38 lines
1.5 KiB
Diff
From 3140cb1a78235ac6504a97e5e3bd4fe79b455b36 Mon Sep 17 00:00:00 2001
|
|
From: Matheus Machado Guilhermino <matheus.machadoguilhermino@windriver.com>
|
|
Date: Thu, 21 Apr 2022 20:01:21 +0000
|
|
Subject: [PATCH] Replace deprecated hiera function
|
|
|
|
Replaced the deprecated 'HieraPuppet.lookup()' function with the
|
|
'puppet lookup' command.
|
|
|
|
Signed-off-by: Matheus Machado Guilhermino <matheus.machadoguilhermino@windriver.com>
|
|
---
|
|
lib/puppet/provider/keystone.rb | 3 +--
|
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
|
diff --git a/lib/puppet/provider/keystone.rb b/lib/puppet/provider/keystone.rb
|
|
index 6809f7b..2544942 100644
|
|
--- a/lib/puppet/provider/keystone.rb
|
|
+++ b/lib/puppet/provider/keystone.rb
|
|
@@ -3,7 +3,6 @@ require File.join(File.dirname(__FILE__), '..','..','..','..', 'openstacklib/lib
|
|
require File.join(File.dirname(__FILE__), '..','..','..','..', 'openstacklib/lib/puppet/provider/openstack/auth')
|
|
require File.join(File.dirname(__FILE__), '..','..','..','..', 'openstacklib/lib/puppet/provider/openstack/credentials')
|
|
require File.join(File.dirname(__FILE__), '..','..', 'puppet/provider/keystone/util')
|
|
-require 'hiera_puppet'
|
|
|
|
class Puppet::Provider::Keystone < Puppet::Provider::Openstack
|
|
|
|
@@ -228,7 +227,7 @@ class Puppet::Provider::Keystone < Puppet::Provider::Openstack
|
|
### STX Modifications (Start) ###
|
|
|
|
def self.hiera_lookup(key)
|
|
- HieraPuppet.lookup(key, :undef, self, nil, :priority)
|
|
+ %x(sudo puppet lookup #{key})[4...-1]
|
|
end
|
|
|
|
def self.initial_config_primary?
|
|
--
|
|
2.30.2
|
|
|