Bug #3581
closed
Technique 'Download a file from the shared folder': Cannot copy a file from the shared-folder on the root server
Added by Vincent MEMBRÉ over 11 years ago.
Updated over 9 years ago.
Description
When I apply the directive copy from shared folder on the root server itself i get an error report
Can't stat /var/rudder/configuration-repository/shared-files/test.txt in files.copyfrom promise
R: @@copyFile@@result_success@@46942b63-888f-4b3a-bfce-64014ec044bf@@7f85f885-6eef-4696-83d3-386cbae651b1@@3@@Copy file@@test.txt@@2013-05-13 13:07:24+02:00##root@#The content of the file(s) is valid
R: @@copyFile@@result_error@@46942b63-888f-4b3a-bfce-64014ec044bf@@7f85f885-6eef-4696-83d3-386cbae651b1@@3@@Copy file@@test.txt@@2013-05-13 13:07:24+02:00##root@#The content or permissions of the file(s) could not have been repaired for some reason
here is the output of cf-server-d
rudder> Filename /var/rudder/configuration-repository/shared-files/test.txt is resolved to /var/rudder/configuration-repository/shared-files/test.txt
rudder> Found a matching rule in access list (/var/rudder/configuration-repository/shared-files/test.txt in /var/rudder/configuration-repository/shared-files)
rudder> Host orchestrateur-1 denied access to /var/rudder/configuration-repository/shared-files/test.txt
rudder> Access control in sync
rudder> From (host=orchestrateur-1,user=root,ip=127.0.1.1)
rudder> REFUSAL of request from connecting host: (SYNCH 1368444920 STAT /var/rudder/configuration-repository/shared-files/test.txt)
rudder> Terminating thread...
This was tested in 2.6, but I suspect it happens in 2.4 too (in 2.3 the directives could not e applied to root server)
- Status changed from New to In progress
- Assignee set to Matthieu CERDA
- Status changed from In progress to Pending technical review
- % Done changed from 0 to 100
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/137
- Target version changed from 2.4.6 to 2.4.7
- Status changed from Pending technical review to In progress
- % Done changed from 100 to 90
Matthieu,
I've made some remarks on the techniques, that I state again here
Shouldn't we use a more generic copy_from body, with same parameters that we use from the scp, except the policy server name, that would:
- copy from the policy server if it's not a policy server
- do a local copy if its the policy server
It would avoid all the code duplication
- Target version changed from 2.4.7 to 2.4.8
- Target version changed from 2.4.8 to 2.4.9
- Status changed from In progress to Pending technical review
- Assignee changed from Matthieu CERDA to Jonathan CLARKE
- % Done changed from 90 to 100
PR updated, awaiting review !
- Status changed from Pending technical review to Discussion
- Assignee changed from Jonathan CLARKE to Matthieu CERDA
- Status changed from Discussion to Pending technical review
- Assignee changed from Matthieu CERDA to Jonathan CLARKE
- Status changed from Pending technical review to Pending release
Applied in changeset commit:55a2c1bf68c74cc8fc71fdb99fea0244cc0e85c4.
Applied in changeset commit:6a8d5356b212c684808716709c0f2610822c21ce.
- Subject changed from 'Copy file from shared folder' is not working on root server to Technique 'Copy file from shared folder': Does not work on root server
This bug has been fixed in Rudder 2.4.9, which was released today.
Check out:
- Status changed from Pending release to Released
- Status changed from Released to In progress
- Target version changed from 2.4.9 to 2.6.10
I'm re-opening this bug, because the fix implemented does not actually work.
It uses the class "is_policy_server" which is never defined. It should be "policy_server":
# This is an evolved version of copy_from scp that uses local copies if we are
# running on a policy server instead of copying from a localhost remote blindly.
body copy_from rudder_copy_from(from, server,compare,trustkey,preserve,purge) {
source => "$(from)";
compare => "$(compare)";
encrypt => "true";
verify => "true";
trustkey => "${trustkey}";
preserve => "${preserve}"; # Preserve the permissions
purge => "${purge}";
copy_backup => "timestamp";
!is_policy_server::
servers => { "${server}" };
community_edition::
portnumber => "&COMMUNITYPORT&";
}
This has therefore never worked, but also didn't make anything else any worse.
- Status changed from In progress to Pending technical review
- Assignee changed from Jonathan CLARKE to Nicolas CHARLES
- Pull Request changed from https://github.com/Normation/rudder-techniques/pull/137 to https://github.com/Normation/rudder-techniques/pull/273
Thank you Jon
However, relay servers copy from the root server, so the class should be "root_server"
And it will simplify a lot of code !
- Status changed from Pending technical review to In progress
- Assignee changed from Nicolas CHARLES to Jonathan CLARKE
- Status changed from In progress to Pending technical review
- Assignee changed from Jonathan CLARKE to Nicolas CHARLES
Nicolas CHARLES wrote:
Thank you Jon
However, relay servers copy from the root server, so the class should be "root_server"
And it will simplify a lot of code !
Agreed. I've updated the PR.
- Status changed from Pending technical review to Pending release
Applied in changeset commit:cad662ff55e49b3882a93fc19fe9f83edd39ddaa.
- Target version changed from 2.6.10 to 2.6.11
- Subject changed from Technique 'Copy file from shared folder': Does not work on root server to Technique 'Copy file from shared folder': Cannot copy a file from the shared-folder on the root server
- Subject changed from Technique 'Copy file from shared folder': Cannot copy a file from the shared-folder on the root server to Technique 'Download a file from the shared folder': Cannot copy a file from the shared-folder on the root server
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.6.11, which was released today.
Check out:
- Project changed from 24 to Rudder
- Category changed from Techniques to Techniques
Also available in: Atom
PDF