Closed (fixed)
Project:
Hostmaster (Aegir)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Jun 2013 at 20:55 UTC
Updated:
6 Jun 2016 at 07:58 UTC
Jump to comment: Most recent
Comments
Comment #1
lieb commentedI have tested, both with Mig5's original module, and with 6.x-2.0-beta1. My testing has been done with a server pack, with 2 remote servers. Here is what I can tell you.
The problem is that the subdirs.d (was stub.d) directory get's created under server_master and not on the server(s) actually hosing the site. I have made it work by manually copying this directory to the remote servers' apache directory, but then it breaks whenever the platform is verified.
In 2.0-beta1 the code that creates the subdirs.d directory is on line 152 of provision/subdirs/subdirs.drush.inc.
$subdirs_path = $context->server->http_app_path . '/subdirs.d';however this is not the problem. Looking at the alias for the site in question, I see
'server' => '@server_master',which is what the code is getting. However to get the right servers you'd have to drill down deeper.
The alias for the platform has
And the alias for the web_server has
So you would have to drill down to get the slave_web_servers to get the correct servers to build the path for the subdirs.d folder.
If you think my thinking is correct here I could try and write a patch to do this. I'm not sure however if this logic would hold up for other multi-server environments without setting those up and testing.
Comment #2
lieb commentedComment #3
cweagansThis sounds like a good approach. I have tested it with the more simple setup of having just one remote web server (not using cluster or pack module), and I can confirm that remote subdirectory sites don't work in that setup either.
Comment #4
anarcat commentedSo the problem here is related to #2020075: Refactor subdirs to use proper Config class(es): the current subdir code doesn't properly "sync()" files to the remote servers. Usually, in other configuration files, there's a special sync() function that gets called at some point to make sure the files get sent to the remote server.
This may be only what is missing here.
Comment #5
lieb commentedSo after beating on this for a while I have now determined that, at least with 2.0-RC2, sub-directory sites even in a single server environment do not work. You can get to the front page, but any path under that, i.e. /user, brings up a 404. So, unless I'm really missing something we are back to square one on this.
I tested on a couple of different servers, but most recently with a new clean install of 2.0-RC2.
Comment #6
anarcat commentedthis issue is specifically about multi-server, how about we open a separate issue about that 404?
Comment #7
anarcat commentedi opened this issue, which i can reproduce, about the 404: #2097689: clean_urls don't work well with subdirectory.
Yet the problem with syncing files here remains - the subdir code doesn't properly sync() files around like the other modules do. It also doesn't properly use the provision_file() primitives, although that is less of a problem.
Comment #8
anarcat commentedTurns out we don't need #2020075: Refactor subdirs to use proper Config class(es) - just need to sync the file names already.
I got this patch that syncs the files, but it puts them in server_master on the remote server, which is not right...
So it doesn't actually work just yet.
Comment #9
anarcat commentedi think this works in the dev-subdir-multiserver branch.
Comment #10
ergonlogicFrom my testing, the symlink on Drupal 6 platforms isn't being created. But it's otherwise working very nicely.
Comment #11
ergonlogicSorry, my testing was only local.
Comment #13
cweagansanarcat, was this merged into 6.x-2.x? Will it be included in rc5?
Comment #14
csalexyiu commentedIs it workable on Aegir3.5?