I have to verif15:32:25 aegir@bara:~/.drush$ cat platform_drupal62010prod.alias.drushrc.php

<?php
$aliases['platform_drupal62010prod'] = array ( 'context_type' => 'server', 'server' => '@server_master', 'remote_host' => 'localhost', 'aegir_root' => '/var/aegir', 'script_user' => 'aegir', 'ip_addresses' =>  array (
                    ), 'backup_path' => '/var/aegir/backups', 'config_path' => '/var/aegir/config/platform_drupal62010prod', 'include_path' => '/var/aegir/config/includes', 'master_url' => NULL,
 'admn_email' => 'aUdmin@localhost',
);

Notice how the context_type is 'server' (!?). This is the task log from the frontend.

Task starts processing
Running: /usr/share/drush/drush.php --root='/var/aegir/plateformes/drupal-6.20-1.0-prod' provision-save '@platform_drupal62010prod' --backend
Drush bootstrap phase : _drush_bootstrap_drush()
Found command: provision-save (commandfile=provision)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @self
Load alias @server_master
Loading apache driver for the http service
Load alias @platform_drupal62010prod
Template loaded: /var/aegir/.drush/provision/provision_drushrc_alias.tpl.php
Generated config Drush configuration file
Changed permissions of /var/aegir/.drush/platform_drupal62010prod.alias.drushrc.php to 400
Command dispatch complete
Peak memory usage was 7.53 MB
Running: /usr/share/drush/drush.php @platform_drupal62010prod provision-verify --backend
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @platform_drupal62010prod
Found command: provision-verify (commandfile=provision)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_master
Loading apache driver for the http service
Including /var/aegir/.drush/provision/dns/verify.provision.inc
Including /var/aegir/.drush/provision/platform/backupmigrate/verify.provision.inc
Including /var/aegir/.drush/provision/platform/verify.provision.inc
Provision configuration root path /var/aegir/config exists.
Provision configuration root ownership of /var/aegir/config has been changed to aegir.
Provision configuration root permissions of /var/aegir/config have been changed to 711.
Provision configuration root path /var/aegir/config is writable.
Provision configuration path /var/aegir/config/platform_drupal62010prod has been created.
Provision configuration ownership of /var/aegir/config/platform_drupal62010prod has been changed to aegir.
Provision configuration permissions of /var/aegir/config/platform_drupal62010prod have been changed to 711.
Provision configuration path /var/aegir/config/platform_drupal62010prod is writable.
Command dispatch complete
Peak memory usage was 7.5 MB
WD php: Invalid argument supplied for foreach() in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/package/hosting_package.module on line 359.
WD php: array_key_exists(): The second argument should be either an array or an object in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/package/hosting_package.instance.inc on line 28.
WD php: array_key_exists(): The second argument should be either an array or an object in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/package/hosting_package.instance.inc on line 28.
WD php: array_key_exists(): The second argument should be either an array or an object in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/package/hosting_package.instance.inc on line 28.
WD php: array_key_exists(): The second argument should be either an array or an object in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/package/hosting_package.instance.inc on line 28.
WD php: array_key_exists(): The second argument should be either an array or an object in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/package/hosting_package.instance.inc on line 28.
WD php: Invalid argument supplied for foreach() in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/platform/hosting_platform.drush.inc on line 51.
WD php: Invalid argument supplied for foreach() in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/platform/hosting_platform.drush.inc on line 60.
Invalid argument supplied for foreach() in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/package/hosting_package.module on line 359.
array_key_exists(): The second argument should be either an array or an object in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/package/hosting_package.instance.inc on line 28.
array_key_exists(): The second argument should be either an array or an object in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/package/hosting_package.instance.inc on line 28.
array_key_exists(): The second argument should be either an array or an object in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/package/hosting_package.instance.inc on line 28.
array_key_exists(): The second argument should be either an array or an object in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/package/hosting_package.instance.inc on line 28.
array_key_exists(): The second argument should be either an array or an object in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/package/hosting_package.instance.inc on line 28.
Invalid argument supplied for foreach() in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/platform/hosting_platform.drush.inc on line 51.
Invalid argument supplied for foreach() in /var/aegir/hostmaster-0.4-beta1/profiles/hostmaster/modules/hosting/platform/hosting_platform.drush.inc on line 60.
Command dispatch complete
Peak memory usage was 20.31 MB

I'm getting inconsistent behaviour trying to reproduce this from the backend. Sometimes it loads the wrong platform alias (it loads an old hostmaster platform).

We're also seeing this problem on site verification, which is really odd.

This is an install that was done from scratch (trashed .drush and reinstalled hostmaster and provision beta1) over an existing alpha15 install that was upgraded from alpha5. Alpha15 had the same issues.

To reproduce:

1. drush dl drupal
2. add the platform in the frontend
3. wait for the task to be performed
4. witness the broken alias and unfinished verify (even though it's marked as successful, there are no packages in the platform)
5. trash the alias file
6. rerun the task
7. check the alias, if it's strill broken, goto 5

The 5-7 loop needs to be performed 3 or 4 times before the alias stabilises (!!!).

Really weird shit.

Comments

omega8cc’s picture

omega8cc’s picture

Duplicate! submitting a comment in the issue queue on d.o takes forever.

anarcat’s picture

Status: Active » Closed (duplicate)

Well, I'm not sure, but I'll try to upgrade to latest head to see what happens, thanks!

anarcat’s picture

Status: Closed (duplicate) » Active

Well, this is still an issue on head:

array_keys(): The first argument should be an array                  [warning]
deploy.provision.inc:84
array_merge(): Argument #2 is not an array deploy.provision.inc:88   [warning]
Invalid argument supplied for foreach() deploy.provision.inc:89      [warning]
The external command could not be executed due to an application     [error]
error.
Drush command could not be completed.                                [error]
Output from failed command :                                         [error]

An error occurred at function :                                      [error]
drush_provision_drupal_post_provision_deploy
Output from failed command :                                         [error]

An error occurred at function :                                      [error]
drush_provision_drupal_provision_migrate
Output from failed command :                                         [error]

Output from failed command :                                         [error]

An error occurred at function : drush_provision_hostmaster_migrate   [error]
anarcat’s picture

Also note that the problem here is not that the site/platform alias is incorrect, it's something else:

hostmaster:/var/aegir/.drush# cat hostmaster.alias.drushrc.php
<?php
$aliases['hostmaster'] = array (
  'context_type' => 'site',
  'platform' => '@platform_hostmaster',
  'server' => '@server_master',
  'db_server' => '@server_master',
  'uri' => 'hostmaster.koumbit.net',
  'root' => '/var/aegir/hostmaster-HEAD',
  'site_path' => '/var/aegir/hostmaster-HEAD/sites/hostmaster.koumbit.net',
  'site_enabled' => true,
  'language' => 'en',
  'client_email' => 'anarcat@koumbit.org',
  'aliases' =>
  array (
  ),
  'redirection' => false,
  'profile' => 'hostmaster',
);
hostmaster:/var/aegir/.drush# cat platform_hostmaster.alias.drushrc.php
<?php
$aliases['platform_hostmaster'] = array (
  'context_type' => 'platform',
  'server' => '@server_master',
  'web_server' => '@server_master',
  'root' => '/var/aegir/hostmaster-HEAD',
  'makefile' => '/var/aegir/makefiles/aegir-koumbit.make',
);

Anonymous’s picture

This all seems to tied to your various issues with drush aliases per other tickets ( that i haven't reproduced ).

Not sure what you meant by 'it's something else' in the last comment: that's the hostmaster 'site' alias and the platform alias, that's normal.. unless i'm missing something

anarcat’s picture

That's what i mean: the hostmaster/platform aliases are OK, the problem is elsewhere.

sfyn’s picture

On our problem server I have found this bug occurs only with olds sites that existed prior to the aegir upgrade

guypaddock’s picture

Priority: Major » Critical

I've been trying to nail down this type of issue for the past four or five days now. For me, it happens when I use a custom HTTP service instead of the standard "apache" HTTP service, but I have no idea why.

Upon investigation, I noticed that the provision-verify task is detecting the packages in the base platform and install profiles correctly, but when it flattens its context information to pass it back to the calling process, somehow the array containing the package info is losing one dimension of the data.

I'm not sure how that also relates to the IP addresses going missing, but I also have a multi-homed system here. Perhaps part of the context is being overwritten with info from other contexts during flattening?

Moving this to critical, since I can't even verify a platform right now...

anarcat’s picture

Priority: Critical » Major

Can you confirm this happens with a wholly new site? If so, it's worth a critical, otherwise it's just a major. Note that I haven't seen that ever again in recent times, so I am tempted to mark this as fixed. If you do see this problem, please update the version number to see what is affected, because 0.4-alpha3 is... pretty old.

steven jones’s picture

Status: Active » Fixed

Marking fixed as per #10.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.