Project

General

Profile

Bug #27857

certs' privkey type doesn't require parent paths

Added by Ewoud Kohl van Wijngaarden 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
Foreman modules
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

puppet-certs' privkey type (and others that inherit from common) have a path parameter and autorequire a file with that path, but don't require the parent. When it tries to write the file without the parent, it fails even it the catalog does include the parent. The log shows this (note the timestamps):

[ERROR 2019-09-14T04:58:09 main] Could not set 'present' on ensure: No such file or directory @ rb_sysopen - /etc/pki/katello/private/katello-apache.key (file: /usr/share/foreman-installer/modules/certs/manifests/keypair.pp, line: 18)
[ WARN 2019-09-14T04:58:25 main] /Stage[main]/Certs::Config/File[/etc/pki/katello/private]/ensure: created

Autorequiring all parents all the way to the root should solve this.

Associated revisions

Revision b467c25c (diff)
Added by Ewoud Kohl van Wijngaarden 4 months ago

Fixes #27857 - autorequire parent paths in types

Before the patch only the path itself was autorequired but this copies
the autorequire from Puppet's file which autorequires all parts of the
path to the root. This ensures that the parent directory exists before
the provider attempts to write the file and fixes errors like:

[ERROR 2019-09-14T04:58:09 main] Could not set 'present' on ensure: No such file or directory @ rb_sysopen - /etc/pki/katello/private/katello-apache.key (file: /usr/share/foreman-installer/modules/certs/manifests/keypair.pp, line: 18)
[ WARN 2019-09-14T04:58:25 main] /Stage[main]/Certs::Config/File[/etc/pki/katello/private]/ensure: created

History

#1 Updated by The Foreman Bot 4 months ago

  • Assignee set to Ewoud Kohl van Wijngaarden
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/puppet-certs/pull/257 added

#2 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases 1.24.0 added

#3 Updated by Ewoud Kohl van Wijngaarden 4 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF