Skip to content

voxpupuli-acceptance: Require 4.2 or newer#1251

Merged
bastelfreak merged 3 commits intotheforeman:masterfrom
bastelfreak:vpa
Dec 13, 2025
Merged

voxpupuli-acceptance: Require 4.2 or newer#1251
bastelfreak merged 3 commits intotheforeman:masterfrom
bastelfreak:vpa

Conversation

@bastelfreak
Copy link
Member

@bastelfreak bastelfreak commented Dec 8, 2025

4.2 allows us to set user and password for curl_command in acceptance tests. That will allow us to cleanup some tests.

4.1 is already in foreman-installer-modulesync:

theforeman/foreman-installer-modulesync@d0f38a0

@bastelfreak bastelfreak force-pushed the vpa branch 12 times, most recently from fc06cee to 7d65234 Compare December 12, 2025 11:55
@bastelfreak bastelfreak changed the title voxpupuli-acceptance: Require 4.2 or newer voxpupuli-acceptance: Require 4.1 or newer Dec 12, 2025
@bastelfreak bastelfreak force-pushed the vpa branch 2 times, most recently from 3aa2aef to 99d6936 Compare December 12, 2025 14:41
@bastelfreak bastelfreak marked this pull request as ready for review December 12, 2025 14:58
@bastelfreak bastelfreak enabled auto-merge (rebase) December 12, 2025 15:33
@bastelfreak bastelfreak force-pushed the vpa branch 2 times, most recently from c639961 to 0a7ad6f Compare December 12, 2025 16:06
@evgeni
Copy link
Member

evgeni commented Dec 12, 2025

2025-12-12T16:17:09.0459693Z �[00;00m�[00;33m  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
2025-12-12T16:17:09.0461987Z �[00;00m�[00;33m  Error: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]: invalid byte sequence in US-ASCII

THIS IS THE REAL ERROR BREAKING THINGS AFTER VOX-ACCEPTANCE 4.x

@bastelfreak bastelfreak force-pushed the vpa branch 2 times, most recently from 62b0efe to c533982 Compare December 12, 2025 18:40
@bastelfreak bastelfreak changed the title voxpupuli-acceptance: Require 4.1 or newer voxpupuli-acceptance: Require 4.2 or newer Dec 12, 2025
bastelfreak added a commit to bastelfreak/foreman-installer-modulesync that referenced this pull request Dec 12, 2025
4.2 brings and updated `curl_command` which allows us to configure
client TLS certificates and username/password. We want to use that in
puppet-foreman:

theforeman/puppet-foreman#1251
@bastelfreak
Copy link
Member Author

upstream PR for foreman-installer-modulesync: theforeman/foreman-installer-modulesync#172

@bastelfreak
Copy link
Member Author

THIS IS THE REAL ERROR

we have a fix for that somewhere, I just need to find it again...

4.2 allows us to set user and password for curl_command in acceptance
tests. That will allow us to cleanup some tests.

4.1 is already in foreman-installer-modulesync:

theforeman/foreman-installer-modulesync@d0f38a0
This was added in voxpupuli-acceptance 4.2
@bastelfreak
Copy link
Member Author

from voxpupuli-acceptance 4.2:

debian12-64-puppet8.example.com 21:08:54$ /bin/sh -c env
  MAIL=/var/mail/root
  USER=root
  SSH_CLIENT=10.88.0.2 41758 22
  SHLVL=0
  HOME=/root
  LOGNAME=root
  _=/bin/sh
  PATH=/opt/puppetlabs/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  SHELL=/bin/bash
  ***
  SSH_CONNECTION=10.88.0.2 41758 10.88.0.2 22

debian12-64-puppet8.example.com executed in 0.04 seconds
        is expected to match /***
      exit_status
        is expected to eq 0
    Command "localectl status"
      stdout

debian12-64-puppet8.example.com 21:08:54$ /bin/sh -c localectl\ status
  System Locale: LANG=C.UTF-8
      VC Keymap: (unset)
     X11 Layout: (unset)

from 3.8:

debian12-64-puppet8.example.com 21:09:43$ /bin/sh -c env
  MAIL=/var/mail/root
  USER=root
  SSH_CLIENT=10.88.0.2 43852 22
  SHLVL=0
  HOME=/root
  LOGNAME=root
  _=/bin/sh
  PATH=/opt/puppetlabs/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  LANG=C.UTF-8
  SHELL=/bin/bash
  ***
  SSH_CONNECTION=10.88.0.2 43852 10.88.0.2 22

debian12-64-puppet8.example.com executed in 0.05 seconds
        is expected to match /***
      exit_status
        is expected to eq 0
    Command "localectl status"
      stdout

debian12-64-puppet8.example.com 21:09:43$ /bin/sh -c localectl\ status
  System Locale: LANG=C.UTF-8
      VC Keymap: (unset)
     X11 Layout: (unset)

I don't think the error is caused by the locale. I think systemctl status postgresql contains unicode/binary data. I added logoutput => true to the exec statement:

  exec { "postgresql_reload_${name}":
    path        => '/usr/bin:/usr/sbin:/bin:/sbin',
    command     => $service_reload,
    onlyif      => $service_status,
    refreshonly => true,
    logoutput   => true,
    require     => Postgresql::Server::Instance::Service[$name],
  }

On 3.8, I get:

  Debug: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]: 'systemctl reload postgresql' won't be executed because of failed check 'refreshonly'
  Debug: Exec[postgresql_reload_main](provider=posix): Executing check 'systemctl status postgresql'
  Debug: Executing: 'systemctl status postgresql'
  Debug: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]/onlyif: ● postgresql.service - PostgreSQL RDBMS
  Debug: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]/onlyif:      Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; preset: enabled)
  Debug: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]/onlyif:      Active: active (exited) since Fri 2025-12-12 21:08:11 UTC; 5s ago
  Debug: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]/onlyif:    Main PID: 20828 (code=exited, status=0/SUCCESS)
  Debug: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]/onlyif:         CPU: 1ms
  Debug: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]/onlyif: 
  Debug: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]/onlyif: Dec 12 21:08:11 debian12-64-puppet8.example.com systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...
  Debug: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]/onlyif: Dec 12 21:08:11 debian12-64-puppet8.example.com systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.
  Debug: Exec[postgresql_reload_main](provider=posix): Executing 'systemctl reload postgresql'
  Debug: Executing: 'systemctl reload postgresql'
  Notice: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]: Triggered 'refresh' from 1 event
  Debug: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]: The container Postgresql::Server::Instance::Reload[main] will propagate my refresh event

on the broken 4.2 it's useless:

  Debug: /Stage[main]/Postgresql::Server::Reload/Postgresql::Server::Instance::Reload[main]/Exec[postgresql_reload_main]: 'systemctl reload postgresql' won't be executed because of failed check 'refreshonly'
  Debug: Exec[postgresql_reload_main](provider=posix): Executing check 'systemctl status postgresql'
  Debug: Executing: 'systemctl status postgresql'
  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

@bastelfreak
Copy link
Member Author

systemctl output on the working system:

debian12-64-puppet8.example.com 22:16:27$ /bin/sh -c cat\ /tmp/postgresql.txt\ 2\>\ /dev/null\ \|\|\ echo\ -n
  ● postgresql.service - PostgreSQL RDBMS
       Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; preset: enabled)
       Active: active (exited) since Fri 2025-12-12 22:14:54 UTC; 4s ago
     Main PID: 20828 (code=exited, status=0/SUCCESS)
          CPU: 1ms
  
  Dec 12 22:14:54 debian12-64-puppet8.example.com systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...
  Dec 12 22:14:54 debian12-64-puppet8.example.com systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.

debian12-64-puppet8.example.com executed in 0.04 seconds
        is expected to match /postgresql/

on the broken one:

debian12-64-puppet8.example.com 22:17:46$ /bin/sh -c cat\ /tmp/postgresql.txt\ 2\>\ /dev/null\ \|\|\ echo\ -n
  ● postgresql.service - PostgreSQL RDBMS
       Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; preset: enabled)
       Active: active (exited) since Fri 2025-12-12 22:16:05 UTC; 5s ago
     Main PID: 20828 (code=exited, status=0/SUCCESS)
          CPU: 1ms
  
  Dec 12 22:16:05 debian12-64-puppet8.example.com systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...
  Dec 12 22:16:05 debian12-64-puppet8.example.com systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.

debian12-64-puppet8.example.com executed in 0.04 seconds
        is expected to match /postgresql/

@bastelfreak
Copy link
Member Author

which is incredible unhelpful:

$ git diff --no-index /tmp/works2.txt /tmp/broken2.txt
diff --git a/tmp/works2.txt b/tmp/broken2.txt
index faeeeef..44ebf63 100644
--- a/tmp/works2.txt
+++ b/tmp/broken2.txt
@@ -1,12 +1,12 @@
-debian12-64-puppet8.example.com 22:16:27$ /bin/sh -c cat\ /tmp/postgresql.txt\ 2\>\ /dev/null\ \|\|\ echo\ -n
+debian12-64-puppet8.example.com 22:17:46$ /bin/sh -c cat\ /tmp/postgresql.txt\ 2\>\ /dev/null\ \|\|\ echo\ -n
   ● postgresql.service - PostgreSQL RDBMS
        Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; preset: enabled)
-       Active: active (exited) since Fri 2025-12-12 22:14:54 UTC; 4s ago
+       Active: active (exited) since Fri 2025-12-12 22:16:05 UTC; 5s ago
      Main PID: 20828 (code=exited, status=0/SUCCESS)
           CPU: 1ms

-  Dec 12 22:14:54 debian12-64-puppet8.example.com systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...
-  Dec 12 22:14:54 debian12-64-puppet8.example.com systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.
+  Dec 12 22:16:05 debian12-64-puppet8.example.com systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...
+  Dec 12 22:16:05 debian12-64-puppet8.example.com systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.

 debian12-64-puppet8.example.com executed in 0.04 seconds
         is expected to match /postgresql/

@bastelfreak bastelfreak merged commit 95eb518 into theforeman:master Dec 13, 2025
11 of 19 checks passed
@evgeni
Copy link
Member

evgeni commented Dec 13, 2025

Eh, why was this merged?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants