Project

General

Profile

Bug #10559

On upgrade from 3.1 to 4.1, policy could not be generated any more

Added by Nicolas CHARLES 6 months ago. Updated 5 months ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Target version (plugin):
Severity:
User visibility:
Effort required:
Priority:
0

Description

When upgrading from 3.1 to 4.1, I got the following error at policy generation

[2017-04-06 09:51:19] ERROR com.normation.rudder.batch.AsyncDeploymentAgent$DeployerAgent - Error when updating policy, reason Cannot write configuration node <- Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check' with environment variables: [PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/cfengine/bin] [NLSPATH:/usr/dt/lib/nls/msg/%L/%N.cat] [OLDPWD:/] [TERM:xterm] [XFILESEARCHPATH:/usr/dt/app-defaults/%L/Dt] [PWD:/opt/rudder/jetty7] [SHLVL:1] [_:/sbin/start-stop-daemon] [RUDDER_GENERATION_DATETIME:2017-04-06T09:51:15.348Z] [RUDDER_NODEID:root] [RUDDER_NEXT_POLICIES_DIRECTORY:/var/rudder/cfengine-community/inputs.new] [RUDDER_AGENT_TYPE:cfengine-community]. 
  Stdout: '' 
  Stderr: '/var/rudder/ncf/common/20_cfe_basics/dry_run_lib.cf:62:0: error: Duplicate definition of bundle set_dry_run_mode with type agent
/var/rudder/ncf/common/20_cfe_basics/dry_run_lib.unsupported.cf:32:0: error: Duplicate definition of bundle set_dry_run_mode with type agent
' ; Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check' with environment variables: [PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/cfengine/bin] [NLSPATH:/usr/dt/lib/nls/msg/%L/%N.cat] [OLDPWD:/] [TERM:xterm] [XFILESEARCHPATH:/usr/dt/app-defaults/%L/Dt] [PWD:/opt/rudder/jetty7] [SHLVL:1] [_:/sbin/start-stop-daemon] [RUDDER_GENERATION_DATETIME:2017-04-06T09:51:15.348Z] [RUDDER_NODEID:78d49020-9867-4ab7-a168-7caa6eceeeb6] [RUDDER_NEXT_POLICIES_DIRECTORY:/var/rudder/share/eb3fe6b4-84f4-43dd-a62b-b3d34c5f941a/share/78d49020-9867-4ab7-a168-7caa6eceeeb6/rules.new/cfengine-community] [RUDDER_AGENT_TYPE:cfengine-community]. 
  Stdout: '' 
  Stderr: '/var/rudder/ncf/common/20_cfe_basics/dry_run_lib.cf:62:0: error: Duplicate definition of bundle set_dry_run_mode with type agent
/var/rudder/ncf/common/20_cfe_basics/dry_run_lib.unsupported.cf:32:0: error: Duplicate definition of bundle set_dry_run_mode with type agent
' ; Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check' with environment variables: [PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/cfengine/bin] [NLSPATH:/usr/dt/lib/nls/msg/%L/%N.cat] [OLDPWD:/] [TERM:xterm] [XFILESEARCHPATH:/usr/dt/app-defaults/%L/Dt] [PWD:/opt/rudder/jetty7] [SHLVL:1] [_:/sbin/start-stop-daemon] [RUDDER_GENERATION_DATETIME:2017-04-06T09:51:15.348Z] [RUDDER_NODEID:b69d7f35-6cde-46cf-89eb-1d4b0a542ed6] [RUDDER_NEXT_POLICIES_DIRECTORY:/var/rudder/share/b69d7f35-6cde-46cf-89eb-1d4b0a542ed6/rules.new/cfengine-community] [RUDDER_AGENT_TYPE:cfengine-community]. 

cache stored in /var/rudder/cfengine-community/state/ncf-exclude-cache-3.10.0/var_rudder_ncf_common_20_cfe_basics was invalid , it contained only

-name files.39p.cf -prune -o

Alexis suggested that cache should be purged by rudder agent check if cf-promises failed


Subtasks

Bug #10589: On upgrade from 3.1 to 4.1, policy could not be generated any more - branch 4.0ReleasedAlexis MOUSSET

Associated revisions

Revision 6b11a5be
Added by Nicolas CHARLES 5 months ago

Fixes #10559: On upgrade from 3.1 to 4.1, policy could not be generated any more

History

#1 Updated by Rémi Verchère 5 months ago

Got the same issue. Deleting /var/rudder/cfengine-community/state/ncf-exclude-cache-3.10.0/var_rudder_ncf_common_20_cfe_basics resolved the agent issue.

#2 Updated by Nicolas CHARLES 5 months ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES

#3 Updated by Nicolas CHARLES 5 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Alexis MOUSSET
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/1328

#4 Updated by Nicolas CHARLES 5 months ago

  • Status changed from Pending technical review to Pending release

#5 Updated by Vincent MEMBRÉ 5 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.1.19, 4.0.4 and 4.1.1 which were released today.

Also available in: Atom PDF