tags 499869 + patch
thanks

On Tue, Sep 23, 2008 at 08:18:07AM +0200, martin f krafft wrote:
> Since the 1.5->1.5.1 upgrade, puppetd now regularly spouts to syslog:
> 
>   puppetd[3815]: Could not retrieve catalog: undefined method
>   `get_interface_value' for Facter::IPAddress:Module
> 
> Since puppet wasn't updated, this must be a bug introduced by facter,
> possibly an API change which needs to be handled a little more gracefully.

Between the 1.5 and 1.5.1 tags of facter, the API did indeed change from:

Facter::IPAddress.get_interface_value_nonbsd
Facter::IPAddress.get_interface_value_bsd

to

Facter::IPAddress.get_interface_value

In this case, puppet could not retrieve its catalog from puppetmaster, so it
will not reconfigure the node with incorrect information, but no updates will
be done until puppetd has been restarted.

A postinst script like this will notify the user that puppetd needs to be
restarted, if it is running.  I don't think an automatic restart of puppetd is
safe in all circumstances:

debian/facter.postinst:
#!/bin/sh
case $1 in
    "configure")
        # Notify the user to restart any running puppetd if facter is being
        # upgraded from 1.5 or lower
        if [ -n "$2" ] && dpkg --compare-versions "$2" '<=' '1.5'; then
            if pgrep -f "ruby.*puppetd" >/dev/null; then
                echo "The facter API has changed, you will need to restart 
puppetd"
            fi
        fi
        ;;
esac


-- 
Stig Sandbeck Mathisen

Attachment: signature.asc
Description: Digital signature

Reply via email to