Project

General

Profile

Bug #10810

rudder agent start fails on sles12

Added by Janos Mattyasovszky 6 months ago. Updated 5 months ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Target version (plugin):
Severity:
Minor - inconvenience | misleading | easy workaround
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
35

Description

On a SLES12 SP2 system after the initial installation of the agent 4.1.3:

vm00049:/home/cloud # rudder agent start
rudder-agent is neither service nor target!?
error: start service rudder-agent failed

This is because /sbin/service rudder-agent start is determined as default to be called by service_action:

if [ -x /usr/sbin/service ]; then
  CMD="service ${service} ${action}" 
elif [ -x /etc/init.d/${service} ]; then
  CMD="/etc/init.d/${service} ${action}" 
elif [ "${action}" = "start" ] && [ -x /usr/bin/startsrc ]; then
  CMD="startsrc -s ${service}" 
elif [ "${action}" = "stop" ] && [ -x /usr/bin/stopsrc ]; then
  CMD="stopsrc -s ${service}" 
fi

However, service does use systemd (at least in sles12 sp2):

vm00049:/home/cloud # bash -x /sbin/service rudder-agent status                      
...
+ is_service rudder-agent
++ systemctl --full --no-legend --no-pager --type=service --property=LoadState show rudder-agent.service
+ local state=LoadState=not-found
+ test LoadState=not-found = LoadState=loaded
+ is_target rudder-agent
++ systemctl --full --no-legend --no-pager --type=target --property=LoadState show rudder-agent.target
+ local state=LoadState=not-found
+ test LoadState=not-found = LoadState=loaded
+ echo 'rudder-agent is neither service nor target!?'
rudder-agent is neither service nor target!?
+ return 1


Related issues

Related to Rudder - Bug #10758: No report on Debian 8 Rejected

Associated revisions

Revision 045a7ff0
Added by Alexis MOUSSET 5 months ago

Fixes #10810: rudder agent start fails on sles12

History

#1 Updated by François ARMAND 6 months ago

  • Related to Bug #10758: No report on Debian 8 added

#2 Updated by François ARMAND 6 months ago

  • User visibility changed from First impressions of Rudder to Getting started - demo | first install | level 1 Techniques
  • Priority changed from 0 to 35

This is the same kind of bug than in #10758 because it is done in bash and not with the service (ncf) method, but the logic seems to be the same.

#3 Updated by Janos Mattyasovszky 6 months ago

The problem is on rudder CLI in /opt/rudder/share/commands/agent-start, not in the techniques.

#4 Updated by Alexis MOUSSET 5 months ago

  • Target version set to 4.0.7

#5 Updated by Alexis MOUSSET 5 months ago

  • Status changed from New to In progress
  • Assignee set to Alexis MOUSSET

#6 Updated by Alexis MOUSSET 5 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis MOUSSET to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/rudder-agent/pull/118

#7 Updated by Alexis MOUSSET 5 months ago

  • Status changed from Pending technical review to Pending release

#8 Updated by Alexis MOUSSET 5 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.0.7 which was released today.

Also available in: Atom PDF