Project

General

Profile

Bug #12211

Bug #12083: On debian, with systemd rudder-agent services are not enabled during postinst

On debian with systemd, rudder-agent install fails with failed to read file: /var/rudder/cfengine-community/policy_server.dat

Added by François ARMAND about 2 years ago. Updated about 2 years ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
94

Description

After installation, cf-* services are not started. If I execute by hand rudder-agent postinst, everything is ok:

root@server:/home/vagrant# /opt/rudder/share/package-scripts/rudder-agent-postinst "true" "deb" "true" 
Created symlink from /etc/systemd/system/multi-user.target.wants/rudder-agent.service to /lib/systemd/system/rudder-agent.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/rudder-cf-execd.service to /lib/systemd/system/rudder-cf-execd.service.
Created symlink from /etc/systemd/system/rudder-agent.service.requires/rudder-cf-execd.service to /lib/systemd/system/rudder-cf-execd.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/rudder-cf-serverd.service to /lib/systemd/system/rudder-cf-serverd.service.
Created symlink from /etc/systemd/system/rudder-agent.service.wants/rudder-cf-serverd.service to /lib/systemd/system/rudder-cf-serverd.service.
ok: Rudder agent is now disabled.
ok: stop service rudder-agent succeeded
INFO: Ensuring correct permissions on the keys directory... Done.
ok: Rudder agent has been enabled but not started, wait for next cron run.
root@server:/home/vagrant# ps aux | grep cf
ncf-api+ 17314  0.1  1.8 388920 27836 ?        Sl   17:00   0:00 /usr/sbin/apache2 -k start
root     18681  2.7  0.6  39544 10704 ?        Ss   17:03   0:00 /var/rudder/cfengine-community/bin/cf-serverd --no-fork
root     18682  1.8  0.5  36896  8496 ?        Ss   17:03   0:00 /var/rudder/cfengine-community/bin/cf-execd --no-fork
root     22138  0.0  0.1  12732  2104 pts/0    S+   17:03   0:00 grep --color=auto cf

Rudder installation logs `/var/log/rudder/install/rudder-agent.log` contains:

Tue Mar 13 16:58:23 UTC 2018 - Starting rudder-agent pre installation script
Tue Mar 13 16:58:56 UTC 2018 - Starting rudder-agent post installation script
slibclean: not found
CFEngine binaries copied to workdir
Making a key pair for CFEngine, please wait, this could take a minute...
INFO: Creating a new UUID for Rudder as the existing one is invalid... Done.
/opt/rudder/share/commands/agent-check: 255: /opt/rudder/share/commands/agent-check: check_and_fix_specific_rudder_agent_file: not found
WARNING: No disable file detected and no agent executor process either. Restarting agent service...ok: stop service rudder-agent succeeded
ok: start service rudder-agent succeeded
 Done
   error: Function 'readfile' failed to read file: /var/rudder/cfengine-community/policy_server.dat
   error: Function 'readfile' failed to read file: /var/rudder/cfengine-community/policy_server.dat
   error: Function 'readfile' failed to read file: /var/rudder/cfengine-community/policy_server.dat
   error: Function 'readfile' failed to read file: /var/rudder/cfengine-community/policy_server.dat
   error: Function 'readfile' failed to read file: /var/rudder/cfengine-community/policy_server.dat
   error: Function 'readfile' failed to read file: /var/rudder/cfengine-community/policy_server.dat
   error: Function 'readfile' failed to read file: /var/rudder/cfengine-community/policy_server.dat
   error: Function 'readfile' failed to read file: /var/rudder/cfengine-community/policy_server.dat
   error: Function 'readfile' failed to read file: /var/rudder/cfengine-community/policy_server.dat
   error: Function 'readfile' failed to read file: /var/rudder/cfengine-community/policy_server.dat
   error: Function 'readfile' failed to read file: /var/rudder/cfengine-community/policy_server.dat
   error: Function 'readfile' failed to read file: /var/rudder/cfengine-community/policy_server.dat
ok: Rudder agent check ran without errors.
Tue Mar 13 17:03:05 UTC 2018 - Starting rudder-agent post installation script
slibclean: not found
CFEngine binaries copied to workdir
setfacl is /usr/bin/setfacl
/opt/rudder/share/commands/agent-check: 255: /opt/rudder/share/commands/agent-check: check_and_fix_specific_rudder_agent_file: not found
WARNING: No disable file detected and no agent executor process either. Restarting agent service...ok: stop service rudder-agent succeeded
ok: start service rudder-agent succeeded
 Done
ok: Rudder agent check ran without errors.

#1

Updated by Vincent MEMBRÉ about 2 years ago

  • Status changed from New to In progress
  • Assignee set to Vincent MEMBRÉ
#2

Updated by Vincent MEMBRÉ about 2 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to Alexis MOUSSET
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/1521
#3

Updated by Rudder Quality Assistant about 2 years ago

  • Assignee changed from Alexis MOUSSET to Vincent MEMBRÉ
#4

Updated by Vincent MEMBRÉ about 2 years ago

  • Status changed from Pending technical review to Pending release
#5

Updated by Vincent MEMBRÉ about 2 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.3.0~rc1 which was released today.

Also available in: Atom PDF