perfsonar / pscheduler

The perfSONAR Scheduler
Apache License 2.0
53 stars 32 forks source link

Make it easier to detect RPM %post failures #1430

Closed mfeit-internet2 closed 2 weeks ago

mfeit-internet2 commented 2 months ago

Because RPM doesn't stop when a %post scriptlet fails, there's no easy way to retroactively know if installation of any packages had a failure without scouring the logs.

Write something to wrap the innards of the scriptlets:

# Note that the single quotes prevent substitutions
log-post-failure << 'LOG-FAILURE-EOF'
...Script...
LOG-FAILURE-EOF

Have it write the output of failed installations to a known location, maybe a syslog file.

mfeit-internet2 commented 3 weeks ago

Remaining to-do in the RPM specs for all packages after this one in the build:

Also consider making this available to the rest of the project.

mfeit-internet2 commented 3 weeks ago

This all works; merge it into 5.1.1 after 5.1.0 is out the door.

mfeit-internet2 commented 2 weeks ago

Release Notes:

Installation errors on RPM-based systems that previously happened quietly do to a limitation in RPM are now logged to syslog.