Project

General

Profile

Actions

Bug #17939

closed

After upgrade from 6.0 to 6.1, deleted technique in editor still present in techniques repos breaks generation

Added by Nicolas Ecarnot over 4 years ago. Updated about 1 year ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Server components
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

When it was in 6.0, the server had a custom directory I created in /var/rudder/configuration-repository/shared-files called sit-rudder.
This sit-rudder directory is itself a clone from a custom git repository from our company. It is changing very often.

Some files from this directory are used in builtin directives "File download (Rudder server)" and are happily pushed towards some nodes.
When we change the files in this sit-rudder directory, and wait enough, we can see them changing on our nodes smoothly.

This was before the 6.0 to 6.1 upgrade.

For the upgrade, as I was a bit lost on what I had to do, I ran :
echo "deb http://repository.rudder.io/apt/6.1/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/rudder.list
apt-get update
apt-get install rudder-server-root
rudder server upgrade-techniques -o
rudder server upgrade-techniques -i
rudder server upgrade-techniques -u

After that, things seemed to work well, until I had to change the content of my sit-rudder custom dir.
At this point, Rudder began to :
- become unable to re-generate its policies : [1]
- show strange warnings in the Techniques editor, showing things not saved though I didn't change anything : [2]

I tried to :
- touch /opt/rudder/etc/force_ncf_technique_update; systemctl restart rudder-jetty
but to no avail
- cd /var/rudder/configuration-repository; git add shared-files/sit-rudder # and commit
This seemed to work at first, but now I know that after the next change in sit-rudder, the issue will arise again.
- I also tried to add shared-files/sit-rudder in /var/rudder/configuration-repository/.gitignore, but Rudder wasn't able to save any change in the web gui.

At present, our server is stuck and no policies are generated.

In the Techniques editor, I never use the "Resource" tab in zero technique.
In the server, the log file /var/log/rudder/core/rudder-webapp.log is telling [3].

I'm saying it again, but : before the 6.1 upgrade, this whole workflow was working fine.

At present, I don't know what can I check or give more info to cope with this.

Nicolas

[1] :


Policy update process was stopped due to an error:
⇨ Policy update error for process '3853' at 2020-07-10 14:24:54 
⇨  Cannot write nodes configuration 
⇨  Accumulated: Unexpected: Error when trying to open template 'TechniqueResourceIdByPath(List(techniques, ncf_techniques, sit___timezone___centos_new, 1.0, resources, shared-files),sit-rudder)'. Check that the file exists with a .st extension and is correctly commited in Git, or that the metadata for the technique are corrects. ; Unexpected: Error when trying to open template 'TechniqueResourceIdByPath(List(techniques, ncf_techniques, sit___timezone___centos_new, 1.0, resources, shared-files),sit-rudder)'. Check that the file exists with a .st extension and is correctly commited in Git, or that the metadata for the technique are corrects. ; Unexpected: Error when trying to open template 'TechniqueResourceIdByPath(List(techniques, ncf_techniques, sit___timezone___centos_new, 1.0, resources, shared-files),sit-rudder)'. Check that the file exists with a .st extension and is correctly commited in Git, or that the metadata for the technique are corrects. ; Unexpected: Error when trying to open template 'TechniqueResourceIdByPath(List(techniques, ncf_techniques, [...]

[2] :

Unsaved changes
Some changes made on Technique 'sit - package vim - centos' were not saved.
If you switch before saving, all your changes will be lost.
Field     Stored value     New value
Resources     []     [{"name":"shared-files/sit-rudder","state":"untouched"}]

[3] :

Jul 10 15:12:19 sit-conf-prd01 rudder[policy.generation.manager]: [ERROR] Error when updating policy, reason was: Cannot write nodes configuration <- Accumulated: Unexpected: Error when trying to open template 'TechniqueResourceIdByPath(List(techniques, ncf_techniques, sit___timezone___centos_new, 1.0, resources, shared-files),sit-rudder)'. Check that the file exists with a .st extension and is correctly commited in Git, or that the metadata for the technique are corrects. ; Unexpected: Error when trying to open template 'TechniqueResourceIdByPath(List(techniques, ncf_techniques, sit___timezone___centos_new, 1.0, resources, shared-files),sit-rudder)'. Check that the file exists with a .st extension and is correctly commited in Git, or that the metadata for the technique are corrects. ; Unexpected: Error when trying to open template 'TechniqueResourceIdByPath(List(techniques, ncf_techniques, sit___timezone___centos_new, 1.0, resources, shared-files),sit-rudder)'. Check that the file exists with a .st extension and is correctly commited in Git, or that the metadata for the technique are corrects. ; Unexpected: Error when trying to open template 'TechniqueResourceIdByPath(List(techniques, ncf_techniques, sit___remote_clock_sync_enabled, 1.0, resources, shared-files),sit-rudder)'. Check that the file exists with a .st extension and is correctly commited in Git, or that the metadata for the technique are corrects. ; Unexpected: Error when trying to open template 'TechniqueResourceIdByPath(List(techniques, ncf_techniques, sit___remote_clock_sync_enabled, 1.0, resources, shared-files),sit-rudder)'. Check that the file exists with a .st extension and is correctly commited in Git, or that the metadata for the technique are corrects. ; Unexpected: Error when trying to open template 'TechniqueResourceIdByPath(List(techniques, ncf_techniques, sit___remote_clock_sync_enabled, 1.0, resources, shared-files),sit-rudder)'. Check that the file exists with a .st extension and is correctly commited in Git, or that the metadata for the technique are corrects.
Jul 10 15:12:19 sit-conf-prd01 rudder[policy.generation.manager]: [INFO] Flag file '/opt/rudder/etc/policy-update-running' successfully removed
Jul 10 15:12:19 sit-conf-prd01 rudder[policy.generation.manager]: [ERROR] Policy update error for process '3854' at 2020-07-10 15:12:19: Cannot write nodes configuration


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #17977: Resource automatically added on newly created technique - since 6.1 upgradeReleasedVincent MEMBRÉActions
Actions

Also available in: Atom PDF