History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: OX-3587
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Monique Szpak
Reporter: andrew.hill
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenX Ad Server

Openads 2.0 PostgreSQL install using sockets will not connect in delivery engine after upgrade

Created: 21/Jul/08 01:02 PM   Updated: 13/Nov/08 10:48 AM
Component/s: OXP: Database Abstraction: PostgreSQL, OXP: Delivery Engine
Affects Version/s: OpenX 2.6.0, OpenX 2.7.8-dev, OpenX 2.7.14-dev, OpenX 2.7.15-dev, OpenX 2.7.27-beta
Fix Version/s: Milestone 24, OpenX 2.6.3, OpenX 2.7.27-beta
Security Level: Public (All users can see these issues)

Time Tracking:
Original Estimate: Not Specified
Remaining Estimate: 7.25h
Time Spent - 2.75h Remaining Estimate - 7.25h
Time Spent: 2.75h
Time Spent - 2.75h Remaining Estimate - 7.25h

File Attachments: 1. Text File sockets_testcases.txt (5 kb)

Issue Links:
Duplicate
 
Reference
 

Passed QA Version/s: OpenX 2.6.3


 Description  « Hide
Create a clean installation of Openads 2.0.11-pr1 for PostgreSQL. When setting up the database details, accept the default "socket-based connection" (that is, where only the database username, password and name are entered).

In the configuration file, you will see:

// Database local connection using sockets
$phpAds_config['dblocal'] = false;
// Database hostname
$phpAds_config['dbhost'] = '';
// Database port
$phpAds_config['dbport'] = 5432;
// Database username
$phpAds_config['dbuser'] = 'dbuser';
// Database password
$phpAds_config['dbpassword'] = 'password';
// Database name
$phpAds_config['dbname'] = 'openads';

Add an advertiser, campaign, and then a SQL banner. The SQL banner is displayed in the UI.

Upgrade to OpenX 2.6.0.

The UI will still work, but the SQL banner will no longer be displayed in the UI.

[database]
type=pgsql
host=
socket=
port=5432
username=db_user
password=password
name=openads
persistent=0
mysql4_compatibility=
protocol=tcp

This results in the following:

  1. The UI can connect to the database, as the method for connections in the UI passes in no hostname to pg_connect, so the default hostname (localhost) is used.
  2. The delivery engine cannot connect to the database, as the mehtod for connections in the PgSQL delivery engine driver passes in an empty hostname to pg_connect.


 All   Comments   Work Log   Change History   FishEye   Crucible   Builds      Sort Order: Ascending order - Click to sort in descending order
Lukasz Wikierski - 24/Jul/08 07:47 AM
As Andrew sugested, before fixing it we need two changes:
"1) Get both the MySQL and the PgSQL delivery engine connection systems to use similar logic, and fix the issue that we set an empty host instead of letting it be the default, if that's the case.
2) Think about defining what configuration file conbimations are valid, and then ensure we test the connection in all 3 places (PgSQL, MySQL and PEAR) using valid conbinations, and also test the config to alert if it's broken?"

Monique Szpak - 15/Oct/08 03:30 PM
After a clean install Openads 2.0.11-pr1 for PostgreSQL using the default socket db setup, my config.inc.php had the following (which differs from that shown above)
// Database local connection using sockets
$phpAds_config['dblocal'] = true;

// Database hostname
$phpAds_config['dbhost'] = 'localhost';

// Database port
$phpAds_config['dbport'] = 5432;

After upgrade, the host.conf.php file contained:

[database]
type=pgsql
host=
socket=
port=
protocol=unix

Monique Szpak - 20/Oct/08 03:53 PM - edited
Attachment sockets_testcases.txt contains details of socket configuration and connection testing for mysql and postgres from both admin and delivery plus 8 upgrade path tests.

Feel free to add more test cases.


Monique Szpak - 20/Oct/08 04:59 PM
Now in 2.8 trunk : refactored socket connectivity (pgsql/mysql) in admin and delivery, database conf settings storage, validation and UI script, conf settings migration for pan and mmm plus added 8 new integration test cases for pan/mmm upgrade class.

See the attachment sockets_testcases.txt for details of test cases and configuration.

Still requires porting to 2.6 trunk


Monique Szpak - 21/Oct/08 10:06 AM
Now ported to 2.6 trunk

Monique Szpak - 21/Oct/08 10:27 AM
Fixed in 2.6.3-rc4 and 2.7.27-beta-rc1

Sue Houghton - 23/Oct/08 10:47 AM
Passed retest in 2.6.3-rc4

Sue Houghton - 03/Nov/08 01:41 PM
Added affects version = 2.7.27-beta for bug triage purposes.

Sue Houghton - 13/Nov/08 10:48 AM
closed in 2.7.27-beta-rc7