Skip to content

postgresql::server::instance::reload fail on RHEL based docker containers #1572

Open
@h-haaks

Description

@h-haaks

Describe the Bug

The onlyif command of the Exec in Postgresql::Server::Instance::Reload failes with

Error: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]: Failed to call refresh: invalid byte sequence in US-ASCII
Error: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]: invalid byte sequence in US-ASCII

I have been seeing this issue in https://github.com/voxpupuli/puppet-jira acceptance test that run on quay.io/centos/centos:centos7
ie https://github.com/voxpupuli/puppet-jira/actions/runs/7570644144/job/20707054752#step:5:402

The problem seems to be the output of systemctl status which is UTF-8 encoded.

I have solved this in https://github.com/voxpupuli/puppet-jira acceptance by declaring

class { 'postgresql::server':
  service_status => 'systemctl status postgresql > /dev/null'
}

https://github.com/voxpupuli/puppet-jira/pull/414/files#diff-1379c6bd5755b4327b5570882a99637ab4538a043ddfb2ea8a3e4abdf2de3697R22

As far as I know neither Exec or Service uses the output from this command, so I wonder if the default in this modules params.pp should be changed the same way I did in https://github.com/voxpupuli/puppet-jira

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions