Affects Version/s: None
Fix Version/s: None
CentOS Linux release 7.3.1611 (Core)
Template:MODULES Bug Template customfield_10700 210545
Method Found:Manual Test
QA Risk Assessment:Needs Assessment
Module Version: 2.0.0
Puppet Version: 4.10.7
SVN Version: 1.7.14 (subversion-1.7.14-10.el7.x86_64)
OS Name/Version: CentOS Linux release 7.3.1611 (Core)
Desired Behavior: With "ensure => present", if path exists, but is not a working copy, vcsrepo should check out from source to path.
Actual Behavior: vcsrepo does not check out, but Puppet run fails with:
(/Vcsrepo[/path/in/question]) Could not evaluate: Execution of '/usr/bin/svn --non-interactive --username USERNAME --password PASSWORD --no-auth-cache info' returned 1: svn: E155007: '/path/in/question' is not a working copy
I dug through the provider and found that in "vcsrepo/lib/puppet/provider/vcsrepo/svn.rb", "def working_copy_exists?" tries to find out if path is a working copy by using "svn status /path/in/question". If it fails (not a working copy), the method returns false, if it succeeds it returns true.
However, "svn status /path/in/question" always returns exit code '0', regardless if it's a working copy or not. Example:
$ svn status /path/in/question; echo $?
svn: warning: '/path/in/question' is not a working copy
Forcing the method to always return 'false' makes the provider function as expected.
This is most likely an issue with "svn status" using exit codes incorrectly, but maybe vcsrepo can be changed to check for "is not a working copy" instead?