Closed (works as designed)
Project:
Drush
Component:
Core Commands
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Dec 2010 at 14:26 UTC
Updated:
12 Feb 2012 at 16:53 UTC
This is probably trivial, but googling brought nothing.
I moved my aliases for a particular site from the drush/aliases dir to the site root. I am passing this project on and need all resources packaged and functional as a (practically) standalone dist. However, Drush commands all fail now. I tried an rsync, but Drush is having trouble with the aliases. I performed a site-alias and everything look legit.
$ drush site-alias
@self
@base
@dev
@stage
@remote
@prod
default
$ drush -v rsync @dev @stage
Load alias @stage
Load alias @dev
Load alias @stage
Could not evaluate source path @dev.
An error occurred at function : drush_core_rsync
Command dispatch complete
Please advise,
T
Comments
Comment #1
greg.1.anderson commentedProbably a duplicate of #918304: sql-sync cannot use local alias file.
Comment #2
JoeAndrieu commentedI'm having this same problem. I can get rsync to work by itself, but drush rsync is failing miserably. I'm trying to track down where it's failing in the code, with partial success. For some reason site_settings isn't getting set when evaluating the path.
"Could not evaluate source path @dev." That's only one place in the entire codebase and it fails because something in the alias parsing comes back null, despite a lack of parsing errors.
Here's the alias file I'm using :
fwiw, both drush @dev status and drush @live status work great.
also, it is definitely failing preflight, but I haven't figured out if that's where the problems at yet.
Comment #3
greg.1.anderson commentedTry with today's master; just checked in code yesterday that changes this code path. Don't see anything in #2 that looks wrong; not enough info to help here.
Comment #4
JoeAndrieu commentedI'm still having the same problem, even with a fresh git pull.
I'll dive back into the code and see if I can isolate why it is failing.
Comment #5
greg.1.anderson commentedResetting status; there is no patch here, so 'needs work' not appropriate.
Comment #6
JoeAndrieu commentedOk. I haven't been able to find where the problem is, but I do have more information.
With the latest HEAD (9f79815),
drush rsync @dev @liveFails with
Could not evaluate source path @dev.Using the previously posted alias file.
However, the following non-aliased rsync works:
drush rsync /home/user/repository/web/ user@example.com:/home/user/repository/webIn the process I did find and fix a number of permissions errors, most likely from me using sudo when I didn't need to and apparently shouldn't have. With those fixed, the non-aliased version works. But perhaps there are other permissions errors that might be causing this? That's the only lead I have at the moment...
p.s.
apologies about the status mistake. Is "active" the right status when I've provided more information?
Comment #7
greg.1.anderson commentedYes, it is correct to set the status to 'active' when you have provided more information. Unfortunately, there's still not enough information to help. Where are you storing your alias file, and what is its filename called? Can you run
drush sa @devanddrush sa @livesuccessfully? I infer that sa must work, since status does. Are you using today's master, or at least Drush-5RC2?Comment #8
JoeAndrieu commentedThe file is in
sites/all/drushand is namedsitealiases.drushrc.php.Both
drush sa @devanddrush sa @livereturn the expected arrays.I'm using the latest head from git,
Comment #9
JoeAndrieu commentedOk. I got it working.
I'll add some notes for others with this problem in a few minutes. I just want to check a few things to make sure I understand why it works now.
Comment #10
JoeAndrieu commentedThese were mostly newbie issues, but I'll post a few of the problems I ran into so others can find this if they get that error in the future.
First, I definitely had permissions errors trying to rsync. I didn't realize that until I got rsync working on its own, independent of drush. So get the equivalent rsync working first.
Second, getting it to work without the aliases also helped a lot. Do that.
Third, use
drush saoften. I was sure I hadsaworking, but it turns out that for some period of time, it was not. I believe this was because I had the aliases file in a location that worked for drush 4.4 and not for the latest version.Fourth, get the latest drush. In this case, the HEAD is fairly stable (I asked around), but it won't always be. I confirmed by testing my live server that the old drush (4.4) failed when the new drush (HEAD from git) worked.
Finally, be careful when testing to not confuse the live and dev servers. This may be obvioius, but I definitely lost some time thinking I was testing with the latest drush on @dev when in fact, I was still on @live which didn't even have the sitealiases file. Newbie mistake. =)
Much thanks to greg.1.anderson! Your timely help on this was not only on spot, but it also helped keep me motivated to push through rather than getting frustrated that I wasn't getting anywhere. Thanks!
I closed this, as I think the latest rev works as designed.