Bug #6529
closedCan't delete example NCF technique
Description
I just tried to delete the "motd" technique, but got the following error message:
An Error occured! Unknown internal error during technique deletion
Details: Cause: [Errno 2] No such file or directory: '/var/rudder/configuration-repository/ncf/50_techniques/motd' Traceback (most recent call last): File "/usr/share/ncf/api/ncf_api_flask_app/views.py", line 148, in delete_technique ncf.delete_technique(bundle_name,path) File "/usr/share/ncf/tools/ncf.py", line 534, in delete_technique shutil.rmtree(filename) File "/usr/lib64/python2.6/shutil.py", line 204, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/usr/lib64/python2.6/shutil.py", line 202, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '/var/rudder/configuration-repository/ncf/50_techniques/motd'
File isn't there:
ls: cannot access /var/rudder/configuration-repository/ncf/50_techniques/motd: No such file or directory
as far as I get it this is a race?
This one is still there:
/var/rudder/ncf/common/50_techniques/motd
Any ideas?
I hope it's one of the easy problems for once :)
Versions # rpm -aq | grep -e ncf -e rudder
rudder-reports-2.11.7.release-1.SLES.11
rudder-agent-2.11.7.release-1.SLES.11
rudder-jetty-2.11.7.release-1.SLES.11
rudder-techniques-2.11.7.release-1.SLES.11
rudder-webapp-2.11.7.release-1.SLES.11
rudder-server-root-2.11.7.release-1.SLES.11
ncf-0.201503241748-1.SLES.11
rudder-inventory-ldap-2.11.7.release-1.SLES.11
rudder-inventory-endpoint-2.11.7.release-1.SLES.11
rudder-plugin-external-node-information-2.11.4-1
ncf-api-virtualenv-2.11.9.release-1.SLES.11
Oh, yes now that you think about the ncf version - rudder version mismatch...
Yes only ncf was updated due to being update-hungover :)
Updated by Florian Heigl over 9 years ago
This might be a bug with rudderify I had seen (and update-fixed) on a different server a few weeks ago. but i'm not sure.
How to check?
This is shown upon saving technique
An Error occured! Could not write technique 'Test2' from path /var/rudder/configuration-repository/ncf, cause is: Error while running post-hook command [u'/var/rudder/configuration-repository/ncf/ncf-hooks.d/post.write_technique.rudderify.sh', u'/var/rudder/configuration-repository/ncf', u'Test2']
Details: INFO: Alternative source path added: /var/rudder/configuration-repository/ncf
Another attempt at saving then issues:An Error occured! Could not write technique 'Test2' from path /var/rudder/configuration-repository/ncf, cause is: Error while running post-hook command [u'/var/rudder/configuration-repository/ncf/ncf-hooks.d/post.write_technique.commit.sh', u'/var/rudder/configuration-repository/ncf', u'Test2']
Details: directives/applications/apacheReverseProxy/activeTechniqueSettings.xml: Permission denied directives/applications/apacheServer/activeTechniqueSettings.xml: Permission denied directives/applications/aptPackageInstallation/activeTechniqueSettings.xml: Permission denied directives/applications/aptPackageManagerSettings/activeTechniqueSettings.xml: Permission denied directives/applications/category.xml: Permission denied directives/applications/openvpnClient/activeTechniqueSettings.xml: Permission denied directives/applications/rpmPackageInstallation/activeTechniqueSettings.xml: Permission denied directives/applications/zmdPackageManagerSettings/activeTechniqueSettings.xml: Permission denied directives/applications/zypperPackageManagerRepositories/activeTechniqueSettings.xml: Permission denied directives/applications/zypperPackageManagerSettings/activeTechniqueSettings.xml: Permission denied directives/applications/zypperPackageManagerSetup/activeTechniqueSettings.xml: Permission denied directives/category.xml: Permission denied directives/fileConfiguration/category.xml: Permission denied directives/fileConfiguration/fileManagement/activeTechniqueSettings.xml: Permission denied directives/fileConfiguration/fileSecurity/category.xml: Permission denied directives/fileConfiguration/fileSecurity/filesPermissions/activeTechniqueSettings.xml: Permission denied directives/fileDistribution/category.xml: Permission denied directives/fileDistribution/checkGenericFileContent/activeTechniqueSettings.xml: Permission denied directives/fileDistribution/copyGitFile/activeTechniqueSettings.xml: Permission denied directives/fileDistribution/downloadFile/activeTechniqueSettings.xml: Permission denied directives/jobScheduling/category.xml: Permission denied directives/jobScheduling/jobScheduler/activeTechniqueSettings.xml: Permission denied directives/systemSettings/category.xml: Permission denied directives/systemSettings/misc/category.xml: Permission denied directives/systemSettings/misc/clockConfiguration/activeTechniqueSettings.xml: Permission denied directives/systemSettings/misc/genericCommandVariableDefinition/activeTechniqueSettings.xml: Permission denied directives/systemSettings/misc/genericVariableDefinition/activeTechniqueSettings.xml: Permission denied directives/systemSettings/misc/partitionSizeMonitoring/activeTechniqueSettings.xml: Permission denied directives/systemSettings/networking/category.xml: Permission denied directives/systemSettings/networking/dnsConfiguration/activeTechniqueSettings.xml: Permission denied directives/systemSettings/networking/hostsConfiguration/activeTechniqueSettings.xml: Permission denied directives/systemSettings/networking/nfsClient/activeTechniqueSettings.xml: Permission denied directives/systemSettings/networking/nfsServer/activeTechniqueSettings.xml: Permission denied directives/systemSettings/networking/routingManagement/activeTechniqueSettings.xml: Permission denied directives/systemSettings/process/category.xml: Permission denied directives/systemSettings/process/processManagement/activeTechniqueSettings.xml: Permission denied directives/systemSettings/process/servicesManagement/activeTechniqueSettings.xml: Permission denied directives/systemSettings/remoteAccess/category.xml: Permission denied directives/systemSettings/remoteAccess/sshConfiguration/activeTechniqueSettings.xml: Permission denied directives/systemSettings/remoteAccess/sshKeyDistribution/activeTechniqueSettings.xml: Permission denied directives/systemSettings/security/category.xml: Permission denied directives/systemSettings/security/fileAlterationMonitoring/activeTechniqueSettings.xml: Permission denied directives/systemSettings/systemManagement/category.xml: Permission denied directives/systemSettings/systemManagement/cronManagement/activeTechniqueSettings.xml: Permission denied directives/systemSettings/systemManagement/fstabConfiguration/activeTechniqueSettings.xml: Permission denied directives/systemSettings/systemManagement/motdConfiguration/activeTechniqueSettings.xml: Permission denied directives/systemSettings/userManagement/category.xml: Permission denied directives/systemSettings/userManagement/groupManagement/activeTechniqueSettings.xml: Permission denied directives/systemSettings/userManagement/sudoParameters/activeTechniqueSettings.xml: Permission denied directives/systemSettings/userManagement/userManagement/activeTechniqueSettings.xml: Permission denied groups/category.xml: Permission denied parameters/rudder_file_edit_header.xml: Permission denied ruleCategories/category.xml: Permission denied rules/32377fd7-02fd-43d0-aab7-28460a91347b.xml: Permission denied
When I reload ncf builder at that point it'll list the new technique and it can be deleted without error.
Which is nice[tm].
Giving up for tonight.
I think it looks like the recent bug, but the 0.201503241748 feels like the bugfixe'd version.
Updated by Vincent MEMBRÉ over 9 years ago
- Assignee set to Vincent MEMBRÉ
- Priority changed from N/A to 1 (highest)
- Target version set to 0.x
In fact the main problem is that we display techniques from default folder /usr/share/ncf/tree/50_techniques.
This are example techniques and should not be displayed, they should only exists as documentation.
I see two things to improve:
- Remove those examples techniques
- Ignore techniques from /usr/share/ncf/tree techniques when you edit a different path (here we edit /var/rudder/configuration-repository/ncf)
Updated by Matthieu CERDA over 9 years ago
I'm taking care of moving the sample Techniques to another place, I'll let you handle proposal #2 :)
Opening a sub ticket
Updated by Nicolas CHARLES over 9 years ago
- Status changed from New to Rejected
We don't show anymore the demo techniques, so it should not be an issue anymore !
Updated by Alexis Mousset over 2 years ago
- Target version changed from 0.x to ncf-0.x
- Priority set to 0
Updated by Alexis Mousset over 2 years ago
- Project changed from 41 to Rudder
- Category set to Generic methods