Project

General

Profile

Actions

Bug #17313

closed

Upgrading Rudder from 5.0.18 to 6.1-nightly does not update techniques

Added by Nicolas CHARLES almost 4 years ago. Updated almost 4 years ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:

Description

Techniques were not updated during upgrade, so policy generation fails because sysem techniques are invalid

May be relevant: i did had some error at upgrade that didn't seems blocking

INFO: Scheduling an inventory during next run...
  Updating   : 1398866025:rudder-server-relay-6.1.0.beta2.git202005030257-1.EL.7.x86_64                                                                                                                       2/16 
INFO: Setting Apache httpd as a boot service... Done
INFO: Creating users ... Done
INFO: Configuring systemd services... Done
INFO: Starting services... Done
INFO: rudder-server-relay setup complete.
  Installing : 1398866025:rudder-webapp-6.1.0.beta2.git202005030257-1.EL.7.x86_64                                                                                                                             3/16 
warning: /opt/rudder/etc/logback.xml created as /opt/rudder/etc/logback.xml.rpmnew
warning: /opt/rudder/etc/openldap/slapd.conf created as /opt/rudder/etc/openldap/slapd.conf.rpmnew
warning: /opt/rudder/etc/rudder-users.xml created as /opt/rudder/etc/rudder-users.xml.rpmnew
warning: /opt/rudder/etc/rudder-web.properties created as /opt/rudder/etc/rudder-web.properties.rpmnew
INFO: Creating groups ... Done
INFO: Creating users ... Done
INFO: Removing ncf-api-venv user and group ...userdel: ncf-api-venv mail spool (/var/spool/mail/ncf-api-venv) not found
 Done
INFO: Setting up systemd ...Created symlink from /etc/systemd/system/multi-user.target.wants/rudder-jetty.service to /usr/lib/systemd/system/rudder-jetty.service.
Created symlink from /etc/systemd/system/rudder-server.service.requires/rudder-jetty.service to /usr/lib/systemd/system/rudder-jetty.service.
INFO: Restarting rudder-slapd...Job for rudder-slapd.service failed because the control process exited with error code. See "systemctl status rudder-slapd.service" and "journalctl -xe" for details.
INFO: Applying selinux policy... Done
  Updating   : 1398866025:rudder-reports-6.1.0.beta2.git202005030257-1.EL.7.noarch                                                                                                                            4/16 
INFO: Setting PostgreSQL as a boot service... Done
INFO: Waiting for PostgreSQL to be up... Done
  Updating   : 1398866025:rudder-server-root-6.1.0.beta2.git202005030257-1.EL.7.noarch                                                                                                                        5/16 
  Cleanup    : 1398866025:rudder-server-root-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                         6/16 
  Cleanup    : 1398866025:rudder-webapp-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                              7/16 
  Erasing    : 1398866025:rudder-inventory-endpoint-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                  8/16 
  Erasing    : 1398866025:ncf-api-virtualenv-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                         9/16 
warning: file /var/lib/ncf-api-venv: remove failed: No such file or directory
INFO: Removing ncf-api-virtualenv selinux policy...libsemanage.semanage_direct_remove_key: Removing last ncf-api-virtualenv module (no other ncf-api-virtualenv module exists at another priority).
restorecon:  lstat(/var/lib/ncf-api-venv) failed:  No such file or directory
 Done
  Cleanup    : 1398866025:rudder-server-relay-5.0.18.rc1.git202004260445-1.EL.7.x86_64                                                                                                                       10/16 
  Erasing    : 1398866025:rudder-techniques-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                         11/16 
  Erasing    : 1398866025:ncf-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                                       12/16 
INFO: A back up copy of the /opt/rudder/etc/uuid.hive has been created in /var/backups/rudder
INFO: A back up copy of the /var/rudder/cfengine-community/policy_server.dat has been created in /var/backups/rudder
INFO: A back up copy of the /var/rudder/cfengine-community/ppkeys has been created in /var/backups/rudder
  Cleanup    : 1398866025:rudder-agent-5.0.18.rc1.git202004260445-1.EL.7.x86_64                                                                                                                              13/16 
  Erasing    : 1398866025:rudder-inventory-ldap-5.0.18.rc1.git202004260445-1.EL.7.x86_64                                                                                                                     14/16 
warning: /etc/default/rudder-slapd saved as /etc/default/rudder-slapd.rpmsave
Stopping Jetty: ERROR: no pid found at /var/rudder/run/rudder-jetty.pid
  Erasing    : 1398866025:rudder-jetty-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                              15/16 
  Cleanup    : 1398866025:rudder-reports-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                            16/16 
Job for rudder-slapd.service failed because the control process exited with error code. See "systemctl status rudder-slapd.service" and "journalctl -xe" for details.
  Verifying  : 1398866025:rudder-webapp-6.1.0.beta2.git202005030257-1.EL.7.x86_64                                                                                                                             1/16 
  Verifying  : 1398866025:rudder-server-root-6.1.0.beta2.git202005030257-1.EL.7.noarch                                                                                                                        2/16 
  Verifying  : 1398866025:rudder-server-relay-6.1.0.beta2.git202005030257-1.EL.7.x86_64                                                                                                                       3/16 
  Verifying  : 1398866025:rudder-agent-6.1.0.beta2.git202005030257-1.EL.7.x86_64                                                                                                                              4/16 
  Verifying  : 1398866025:rudder-reports-6.1.0.beta2.git202005030257-1.EL.7.noarch                                                                                                                            5/16 
  Verifying  : 1398866025:rudder-server-root-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                         6/16 
  Verifying  : 1398866025:ncf-api-virtualenv-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                         7/16 
  Verifying  : 1398866025:rudder-webapp-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                              8/16 
  Verifying  : 1398866025:rudder-techniques-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                          9/16 
  Verifying  : 1398866025:rudder-inventory-ldap-5.0.18.rc1.git202004260445-1.EL.7.x86_64                                                                                                                     10/16 
  Verifying  : 1398866025:rudder-server-relay-5.0.18.rc1.git202004260445-1.EL.7.x86_64                                                                                                                       11/16 
  Verifying  : 1398866025:rudder-inventory-endpoint-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                 12/16 
  Verifying  : 1398866025:rudder-jetty-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                              13/16 
  Verifying  : 1398866025:ncf-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                                       14/16 
  Verifying  : 1398866025:rudder-agent-5.0.18.rc1.git202004260445-1.EL.7.x86_64                                                                                                                              15/16 
  Verifying  : 1398866025:rudder-reports-5.0.18.rc1.git202004260445-1.EL.7.noarch                                                                                                                            16/16 

Installed:
  rudder-webapp.x86_64 1398866025:6.1.0.beta2.git202005030257-1.EL.7                                                                                                                                               

Updated:
  rudder-server-root.noarch 1398866025:6.1.0.beta2.git202005030257-1.EL.7                                                                                                                                          

Dependency Updated:
  rudder-agent.x86_64 1398866025:6.1.0.beta2.git202005030257-1.EL.7  rudder-reports.noarch 1398866025:6.1.0.beta2.git202005030257-1.EL.7  rudder-server-relay.x86_64 1398866025:6.1.0.beta2.git202005030257-1.EL.7 

Replaced:
  ncf.noarch 1398866025:5.0.18.rc1.git202004260445-1.EL.7                                                    ncf-api-virtualenv.noarch 1398866025:5.0.18.rc1.git202004260445-1.EL.7                                
  rudder-inventory-endpoint.noarch 1398866025:5.0.18.rc1.git202004260445-1.EL.7                              rudder-inventory-ldap.x86_64 1398866025:5.0.18.rc1.git202004260445-1.EL.7                             
  rudder-jetty.noarch 1398866025:5.0.18.rc1.git202004260445-1.EL.7                                           rudder-techniques.noarch 1398866025:5.0.18.rc1.git202004260445-1.EL.7                                 

Complete!


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #17523: error when a technique with a directive attached change in 6.1 blocks all technique updatesReleasedNicolas CHARLESActions
Actions #1

Updated by Vincent MEMBRÉ almost 4 years ago

  • Target version changed from 6.1.0~beta2 to 6.1.0~beta3
Actions #2

Updated by Vincent MEMBRÉ almost 4 years ago

  • Target version changed from 6.1.0~beta3 to 6.1.0~rc1
Actions #3

Updated by François ARMAND almost 4 years ago

  • Assignee set to Nicolas CHARLES
Actions #4

Updated by Nicolas CHARLES almost 4 years ago

i'm still having the error

[2020-05-26 18:35:51] ERROR techniques.reader - Error with technique at path: '/system/distributePolicy/1.0/metadata.xml', it will be ignored. Error: Accumulated: Parsing: The system variable CMDBENDPOINT is not defined: perhaps the metadata.xml for technique 'distributePolicy/1.0' is not up to date
[2020-05-26 18:36:04] ERROR bootchecks - Flag file '/opt/rudder/etc/force_technique_reload' but Techniques library reload failed, cause is: An error occured while updating <- Error when processing saved modification to log them <- Error when saving Active Technique af3745b9-b4f0-4140-a9bc-18c801a3a6a8 for technque motdConfiguration <- Inconsistency: Can not find directive with id '6e1ae8f7-179a-47d7-9307-4eee5796f4e2' in repository but it is viewed as a child of 'af3745b9-b4f0-4140-a9bc-18c801a3a6a8'. This is likely a bug, please report it.
Actions #5

Updated by Nicolas CHARLES almost 4 years ago

each of the /var/rudder/configuration-repository/techniques/system has a different commit per folder this may cause a race condition in the future

issue here is that technique reader

[2020-05-26 18:35:51] ERROR techniques.reader - Error with technique at path: '/system/distributePolicy/1.0/metadata.xml', it will be ignored. Error: Accumulated: Parsing: The system variable CMDBENDPOINT is not defined: perhaps the metadata.xml for technique 'distributePolicy/1.0' is not up to date

before reload of the techniques
[2020-05-26 18:35:58] INFO  bootchecks - [#7] Check for force reload of Techniques library

Actions #6

Updated by Nicolas CHARLES almost 4 years ago

also when parsing technique, if one technique fails, it should not fail for everything

Actions #7

Updated by Nicolas CHARLES almost 4 years ago

it does resolve itself though

Actions #8

Updated by François ARMAND almost 4 years ago

  • Status changed from New to In progress
  • Assignee changed from Nicolas CHARLES to François ARMAND
Actions #9

Updated by François ARMAND almost 4 years ago

OK, so there is several problems (perhaps):

- 1/ we removed a system variable without waiting one version between remove in technique / remove in scala. So during update, we still have old technique with the variable, but no matching definition. Perhaps we should just warn on missing system variable, since we never have case where it's useful to fail on that.

- 2/ it seems that one error on one technique forbids all update for all techniques

- 3/ the missing directive is fishy. Perhaps it's just because everything is broken, but perhaps not.

Actions #10

Updated by François ARMAND almost 4 years ago

Step to reproduce 1/ and 2/:
- stop webapp,
- add a dummy system variable in distributePolicy metadata, commit, touch /opt/rudder/etc/force_technique_reload
- restart

Step to reproduce 3/:
- find a technique with a directive, say motd
- stop webapp, modify technique, commit, touch /opt/rudder/etc/force_technique_reload, restart.
==> https://issues.rudder.io/issues/17523

Actions #11

Updated by François ARMAND almost 4 years ago

  • Related to Bug #17523: error when a technique with a directive attached change in 6.1 blocks all technique updates added
Actions #12

Updated by François ARMAND almost 4 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder/pull/3010
Actions #13

Updated by François ARMAND almost 4 years ago

I'm not able to reproduce the fact that 1/ implies 2/. It's likelly 3/ implies 2/, in which case it need to be corrected in #17523.

Actions #14

Updated by François ARMAND almost 4 years ago

  • Status changed from Pending technical review to Pending release
Actions #15

Updated by Vincent MEMBRÉ almost 4 years ago

  • Status changed from Pending release to Released

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

Actions

Also available in: Atom PDF