Closed (outdated)
Project:
Provision
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2012 at 00:13 UTC
Updated:
26 Feb 2016 at 14:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
anarcat commentedIndeed, only the stuff that is in the drushrc gets imported, so there's actually more to it here.
Comment #2
anarcat commentedIn fact, this could even be in hosting, not provision, after looking at hosting_site.module:333... That function doesn't load the ssl or client settings. The language gets loaded, but there's some weird things going on there ...
Comment #3
anarcat commentedSo uh... that was a lot of fun here, restoring a full aegir site from scratch (basically). I had to use a crazy stupid script to restore data from a *backup* of the drush aliases, which I am attaching here for your perusal.
This script will take a backup of your drush aliases and edit the site nodes with the right information for the aliases, language, client_name, redirection and ssl settings.
Comment #4
anarcat commentedOh and the above script doesn't really work correctly in 1.7 because of this bug: #1493286: SSL certificates not being created. Fun galore.
Comment #5
anarcat commentedupdated version of that hack to deal with ssl, which exhibits the above bug.
Comment #6
Anonymous (not verified) commentedIt seems the act of kicking off an import of a site in the 'post' verify hook of a platform, doesn't load these attributes when it does a node_save. Is that the cause of the issue?
Note also that the database server is forced to be the HOSTING_DEFAULT_DB_SERVER, which is not ideal: it's quite possible that the site's alias, created by hand earlier, might have a remote database server defined as the db_server attribute. Just stumbled upon this.
The result is that the alias in the backend then gets overwritten with these defaults, setting things like db_server to '@server_localhost', which breaks future migrations etc.
Can we load the relevant attributes from the existing site context at this point?
Comment #7
Anonymous (not verified) commentedI have worked around it by using
drush @hostmaster hosting-import @site, which invokes an install task itself, and then I import the platform, which avoids 'importing' the site because the URL already exists in the frontend. It's not a very sane flow of logic, but it resolves my issue.Comment #8
anarcat commentedNote that this is causing #1146014: A user can see sites that don't have a client associated..
Comment #9
anarcat commentedre #6, I think this is a different issue, which happens when a platform is verified. we are talking about a proper provision-import here, a different thing, although I agree that the code mentionned (in platform/hosting_platform.drush.inc) is problematic.
Comment #10
anarcat commentedThis doesn't fix the problem but makes it a little better (and probably fixes #1146014: A user can see sites that don't have a client associated. altogether).
Testing needed.
Comment #11
ergonlogicThe patch attached to #10 does this:
But I don't see anywhere in hosting_import_site() where the
$client_idvariable is set. In fact, it appears as if there's some logic at the beginning of that function that attempts to do the same, no?Comment #12
ergonlogicAlso, I'm not sure whether I'm replicating this bug properly. Here are the steps I'm taking on a (more or less) fresh Aegir install:
I've been running
drush @hostmaster hosting-task <task_nid> --debug --forceso as to see the options passed to the provision-save command. Here's the output of the platform verify (step 5, above); note the errors about undefined variables/properties:By the time the site import is run, the
client_namehas been reset to 'admin', among other things:Comment #13
omega8cc commentedPlease check if patches posted there:
http://drupal.org/node/1146014#comment-6694336
http://drupal.org/node/1146014#comment-6694378
make any difference in debugging this issue.
They should.
Comment #14
anarcat commentedIt seems my patch isn't fixing the actual issue here, which is about provision-import, not hosting-import. I have nevertheless committed it since it's a good safeguard check for #1146014: A user can see sites that don't have a client associated..
Comment #15
helmo commentedThe 6.x-2.x branch will go EOL along with Drupal this week. So I'm closing
this issue. If it remains a confirmed issue in 7.x-3.x, feel free to re-open,
or better yet, create a new issue referencing this one.