Project

General

Profile

Bug #4110

Upgrading a node with invalid promises to rudder 2.8 fails

Added by Vincent MEMBRÉ over 6 years ago. Updated about 5 years ago.

Status:
Released
Priority:
1
Category:
Packaging
Target version:
Severity:
User visibility:
Effort required:
Priority:

Description

A not accepted node (only applies initial promises). but in latest 2.4.X/2.6 and 2.7 latest promises are not CFEngine 3.5 compliant.

When upgrading that node to 2.8, the node cannot complete the upgrade process because the initial promises are still the one used in 2.4/2.6/2.8

The error message i get when upgrading is:

udder-agent[3713]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[3716]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[3717]: [INFO] Halting CFEngine Community cf-serverd...
rudder-agent[3719]: [OK] CFEngine Community cf-serverd stopped after 1 seconds
rudder-agent[3720]: [INFO] Halting CFEngine Community cf-execd...
rudder-agent[3722]: [OK] CFEngine Community cf-execd stopped after 1 seconds
CFEngine binaries copied to workdir
rudder-agent[3735]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[3738]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[3739]: [INFO] Launching CFEngine Community cf-serverd...
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:306:55: error: syntax error
        "$(index)=$($(tab)[$(sectionName)][$(index)])",
                                                      ^
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:306:55: error: Expected attribute, got ','
        "$(index)=$($(tab)[$(sectionName)][$(index)])",
                                                      ^
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:307:29: error: Expected promiser string, got 'select_region'
                select_region => INI_section("$(sectionName)"),
                            ^
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:307:32: error: Expected ';', got '=>'
                select_region => INI_section("$(sectionName)"),
                               ^
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:307:44: error: Expected promiser string, got 'INI_section'
                select_region => INI_section("$(sectionName)"),
                                           ^
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:307:45: error: Expected ';', got '('
                select_region => INI_section("$(sectionName)"),
                                            ^
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:307:62: error: Expected ';', got ')'
                select_region => INI_section("$(sectionName)"),
                                                             ^
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:307:63: error: Expected promiser string, got ','
                select_region => INI_section("$(sectionName)"),
                                                              ^
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:374:55: error: syntax error
        "$(index)=$($(tab)[$(sectionName)][$(index)])",
                                                      ^
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:374:55: error: Expected attribute, got ','
        "$(index)=$($(tab)[$(sectionName)][$(index)])",
                                                      ^
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:375:29: error: Expected promiser string, got 'select_region'
                select_region => INI_section("$(sectionName)"),
                            ^
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:375:32: error: Expected ';', got '=>'
                select_region => INI_section("$(sectionName)"),
                               ^
/var/rudder/cfengine-community/inputs/common/1.0/cfengine_stdlib.cf:375:44: error: Expected promiser string, got 'INI_section'
                select_region => INI_section("$(sectionName)"),
                                           ^
Too many errors2013-10-28T16:26:14+0000    error: Policy failed validation with command '"/var/rudder/cfengine-community/bin/cf-promises" -c "/var/rudder/cfengine-community/inputs/promises.cf"'

The solution is to repair the initial promises to be CFEngine 3.5 compliant.

A workaround can be to disable agent before upgrading

touch /opt/rudder/etc/disable-agent
# Upgrade
# sudo yum upgrade rudder-agent
# sudo apt-get install rudder-agent
rm /opt/rudder/etc/disable-agent
#1

Updated by Matthieu CERDA over 6 years ago

  • Status changed from New to In progress
#2

Updated by Matthieu CERDA over 6 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Matthieu CERDA to Jonathan CLARKE
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/169

PR ready !

#3

Updated by Matthieu CERDA over 6 years ago

  • Status changed from Pending technical review to New
  • Assignee changed from Jonathan CLARKE to Matthieu CERDA
  • % Done changed from 100 to 0
  • Pull Request deleted (https://github.com/Normation/rudder-packages/pull/169)

Wrong ticket.

#4

Updated by Matthieu CERDA over 6 years ago

  • Target version changed from 2.4.12 to 2.8.0~rc2

This only impacts migrations to 2.8.

#5

Updated by Matthieu CERDA over 6 years ago

  • Status changed from New to Pending technical review
  • Assignee changed from Matthieu CERDA to Jonathan CLARKE
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/170

PR available

#6

Updated by Jonathan CLARKE over 6 years ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from Jonathan CLARKE to Matthieu CERDA
#7

Updated by Matthieu CERDA over 6 years ago

  • Status changed from Discussion to Pending technical review
  • Assignee changed from Matthieu CERDA to Jonathan CLARKE

PR updated according to feedback.

#8

Updated by Jonathan CLARKE over 6 years ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from Jonathan CLARKE to Matthieu CERDA
#9

Updated by Matthieu CERDA over 6 years ago

  • Status changed from Discussion to Pending technical review
  • Assignee changed from Matthieu CERDA to Jonathan CLARKE

PR updated according to feedback (again)

#10

Updated by Matthieu CERDA over 6 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:7bece39897d84ce37134dc98d6ccc022cb5e7da5.

#11

Updated by Jonathan CLARKE over 6 years ago

Applied in changeset commit:9225f11da69f31897d21d217bdb31ec4ca2951a9.

#12

Updated by Vincent MEMBRÉ over 6 years ago

  • Subject changed from Upgrading a not accepted node leads to error while upgrading.it to 2.8, due to invalid initial promises to Upgrading a node with invalid promises to rudder 2.8 fails
#13

Updated by Vincent MEMBRÉ over 6 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.8.0~rc2, which was released today.
Check out:

#14

Updated by Benoît PECCATTE about 5 years ago

  • Project changed from packages to Rudder
  • Category set to Packaging

Also available in: Atom PDF