Project

General

Profile

Actions

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É almost 11 years ago. Updated about 9 years ago.

Status:
Released
Priority:
3
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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)

Actions #1

Updated by Matthieu CERDA almost 11 years ago

  • Status changed from New to In progress
  • Assignee set to Matthieu CERDA

On it.

Actions #2

Updated by Matthieu CERDA almost 11 years ago

  • 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

Pr available

Actions #3

Updated by Nicolas PERRON almost 11 years ago

  • Target version changed from 2.4.6 to 2.4.7
Actions #4

Updated by Nicolas CHARLES almost 11 years ago

  • 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

Actions #5

Updated by Nicolas PERRON over 10 years ago

  • Target version changed from 2.4.7 to 2.4.8
Actions #6

Updated by Nicolas PERRON over 10 years ago

  • Target version changed from 2.4.8 to 2.4.9
Actions #7

Updated by Matthieu CERDA over 10 years ago

  • 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 !

Actions #8

Updated by Jonathan CLARKE over 10 years ago

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

Updated by Matthieu CERDA over 10 years ago

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

PR updated again.

Actions #10

Updated by Matthieu CERDA over 10 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:55a2c1bf68c74cc8fc71fdb99fea0244cc0e85c4.

Actions #11

Updated by Matthieu CERDA over 10 years ago

Applied in changeset commit:6a8d5356b212c684808716709c0f2610822c21ce.

Actions #12

Updated by Nicolas PERRON over 10 years ago

  • 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
Actions #13

Updated by Nicolas PERRON over 10 years ago

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

Actions #14

Updated by Nicolas PERRON over 10 years ago

  • Status changed from Pending release to Released
Actions #15

Updated by Jonathan CLARKE over 10 years ago

  • 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.

Actions #16

Updated by Jonathan CLARKE over 10 years ago

  • 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
Actions #17

Updated by Nicolas CHARLES about 10 years ago

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 !

Actions #18

Updated by Nicolas CHARLES about 10 years ago

  • Status changed from Pending technical review to In progress
  • Assignee changed from Nicolas CHARLES to Jonathan CLARKE
Actions #19

Updated by Jonathan CLARKE about 10 years ago

  • 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.

Actions #20

Updated by Jonathan CLARKE about 10 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:cad662ff55e49b3882a93fc19fe9f83edd39ddaa.

Actions #21

Updated by Vincent MEMBRÉ about 10 years ago

  • Target version changed from 2.6.10 to 2.6.11
Actions #22

Updated by Vincent MEMBRÉ about 10 years ago

  • 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
Actions #23

Updated by Vincent MEMBRÉ about 10 years ago

  • 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
Actions #24

Updated by Vincent MEMBRÉ about 10 years ago

  • Status changed from Pending release to Released

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

Actions #25

Updated by Benoît PECCATTE about 9 years ago

  • Project changed from 24 to Rudder
  • Category changed from Techniques to Techniques
Actions

Also available in: Atom PDF