Write software_version in hieradata as a string
When puppet reads a unicode value from hieradata that it believes is a floating number, it automatically converts it to a float. In the case of the software_version, that means a version like '18.10' is converted to 18.1 by puppet. This results in some components and directories using the wrong value for software_version, and certain services fail. In particular, this resulted in sysinv being unable to populate the host inventory data when new nodes were installed in a running system. Queries like host-data-list or host-if-list would return empty data. This update to sysinv writes the software_version to hieradata as a string rather than unicode, ensuring puppet treats it properly. Closes-Bug: 1795400 Change-Id: Ic3ab3aea2f7fc6662f0b523070afb4b3ef7ee282 Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
parent
f8c7b2d830
commit
d2bad43356
@ -75,7 +75,7 @@ class PlatformPuppet(base.BasePuppet):
|
||||
|
||||
def _get_static_software_config(self):
|
||||
return {
|
||||
'platform::params::software_version': tsconfig.SW_VERSION,
|
||||
'platform::params::software_version': self.quoted_str(tsconfig.SW_VERSION),
|
||||
}
|
||||
|
||||
def _get_secure_amqp_config(self):
|
||||
@ -325,7 +325,7 @@ class PlatformPuppet(base.BasePuppet):
|
||||
# required parameters
|
||||
config = {
|
||||
'platform::params::hostname': host.hostname,
|
||||
'platform::params::software_version': host.software_load,
|
||||
'platform::params::software_version': self.quoted_str(host.software_load),
|
||||
}
|
||||
|
||||
# optional parameters
|
||||
|
Loading…
Reference in New Issue
Block a user