Project:Provision
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:major
Assigned:Unassigned
Status:active

Issue Summary

The backend should be able to provision sites on postgresql server sites. This issue concerns solely the backend, how to extend the current functionality and talk to postgres. It depends on #269520: Move to PDO for all database access. It is *not* related to #548882: PostgreSQL frontend support which concerns only having the frontend drupal be able to run when a pgsql backend. It *will* however require frontend work so that the dbserver nodes can have a type (postgres/mysql/...) that can be changed and everything else...

Comments

#1

for what it's worth, the new backend allows for this to be developed.

i don't know if i want to make a point of it though. The API gets better by having multiple backends, but it increases our testing requirements.

#2

Version:6.x-0.3-rc4»

Fast forward about a year... I thought I'd attach a non-working/semi-working patch.

Start of a pgsql service patch for provision.

It would work much better if the db type didn't get magically changed to mysql halfway through the process. I was able to force things in by brute forcing db_type, db_user, db_passwd, db_host, and db_port in db/db.drush.inc in several class methods of ProvisionService_db and ProvisionService_db_pdo. It still fails on some other assumptions.

Drush command that I'm using:

drush --verbose hostmaster-install --db_host=localhost --db_port=5432 --db_user=aegir --db_passwd=mypassword --version=0.4-alpha12 --master_db=pgsql://aegir:mypassword@localhost:5432 --db_service_type=pgsql --remote_host=localhost

I needed all those options because it defaults to mysql, mysql default port, etc... (I haven't been able to figure out where). Halfway through the process it will default to mysql, mysql default port, and dsn again as mentioned above.

I'm also running into an issue where I need aegir db_user and aegir db created to begin with, but then it wants to create them again later on in the install. This may be some mix up in instructions that I'm not understanding. Any help on those two issues would be appreciated.

Load alias @self                                                                                [notice]
Load alias @server_master                                                                       [notice]
Loading pgsql driver for the db service                                                         [notice]
Loading apache driver for the http service                                                      [notice]
Loading pgsql driver for the db service                                                         [notice]
Aegir domain name [aegir.example.com]: 127.0.0.1
Load alias @self                                                                                [notice]
Load alias @server_master                                                                       [notice]
Loading mysql driver for the db service                                                         [notice]
Loading apache driver for the http service                                                      [notice]
Loading mysql driver for the db service                                                         [notice]
Loading apache driver for the http service                                                      [notice]
AttachmentSize
pgsql_service.inc_.patch 4.73 KB

#3

Oh wait, I see now. It's getting set to mysql in drush_provision_hostmaster_install.

#4

I have it running better now until it explodes. At some point the $_SERVER variable turns up empty and its keys are set to empty values. I'm not sure where but drupal_get_option('db_type') etc... is returning null at some points, but not at others?

#5

Version:» 6.x-2.x-dev
Priority:normal» major

This might be a good headline feature to get into 6.x-2.x, bumping priority.

nobody click here