No cf-execd/cf-serverd running after DEB client auto upgrade to 3.5.x

*** for who running Debian or Ubuntu systems. ***

There was something changed in %postinstall script on 3.5.x DEB packages and it corrupted automatic client upgrade process.

The script tries to restart all CFEngine deamons, cf-execd, cf-serverd and cf-monitord if there is a valid policy under /var/cfengine/inputs causing a race condition in update/update_bins.cf policy, but CFEngine processes promises tries to kill them all.

A policy patched is likely. You may simply add one more class to processes: type promises in update/update_bins.cf

from:

 processes:

  bin_newpkg::

   "$(cf_components)" signals => { "$(stop_signal)" },
                      comment => "Stop cfengine running processes before binary update",
                       handle => "cfe_internal_update_bins_processes_stop_cfengine",
                      classes => u_if_repaired("stopped_cfprocs");

  bin_newpkg.!windows::

   "cf-execd"  signals => { "$(stop_signal)" },
               comment => "Stop cf-execd running process before binary update",
                handle => "cfe_internal_update_bins_processes_stop_cf_execd",
               classes => u_if_repaired("stopped_cfprocs");

to:

 processes:

  bin_newpkg.!bin_update_success::

   "$(cf_components)" signals => { "$(stop_signal)" },
                      comment => "Stop cfengine running processes before binary update",
                       handle => "cfe_internal_update_bins_processes_stop_cfengine",
                      classes => u_if_repaired("stopped_cfprocs");

  bin_newpkg.!bin_update_success.!windows::

   "cf-execd"  signals => { "$(stop_signal)" },
               comment => "Stop cf-execd running process before binary update",
                handle => "cfe_internal_update_bins_processes_stop_cf_execd",
               classes => u_if_repaired("stopped_cfprocs");
Have more questions? Submit a request

Comments

  • Avatar
    Ted Zlatanov

    Is this patch in core/masterfiles for 3.5.x?

    Should it be applied to masterfiles.git?

    Can I share it with customers?

  • Avatar
    Nakarin Phooripoom

    There is no patch for this one.

    Bishwa complained it randomly happened to Debian/Ubuntu systems. So I had a look and caught this one.

    I can summit a patch to 3.5.x:nova/masterifles if you like, but we have to keep in my that this might be purged when we introduce, cf-upgrade binary.

    https://github.com/cfengine/nova/pull/588

  • Avatar
    Nakarin Phooripoom

    I have also uploaded a custom update_bins.cf for 3.5.3 upgrade here.

    https://cfengine.zendesk.com/attachments/token/tmtavpev2fdnvai/?name=update_bins.cf

  • Avatar
    Ted Zlatanov

    Thank you sir, that PR was very nice.  Can you also put this and the other upgrade issues in the 3.5.3 release notes?

Powered by Zendesk