On Ubuntu 14.04.4 LTS, following the Manual Installation or using the Debian package, running the following command as the aegir user:

drush hostmaster-install --client_name=$SUDO_USER --client_email=$SUDO_USER@example.com --http_service_type=nginx --working-copy

...with these settings:

 Aegir frontend URL: dev.example.com
 Master server FQDN: dev.example.com
 Aegir root: /var/local/aegir
 Aegir user: aegir
 Web group: www-data
 Web server: nginx
 Web server port: 80
 Aegir DB host: localhost
 Aegir DB user: root
 Aegir DB password: <prompted>
 Aegir DB port: 3306
 Aegir version: 7.x-3.x
 Aegir platform path: /var/local/aegir/hostmaster-7.x-3.x
 Admin email: colan@example.com
 Aegir makefile: /var/local/aegir/.drush/provision/aegir.make
 Aegir install profile: hostmaster

The following warning can be seen part-way through the process; I added context before and after. The emphasis is mine.

  • ...
  • Platforms path /var/local/aegir/platforms exists. [success]
  • Platforms ownership of /var/local/aegir/platforms has been changed to aegir. [success]
  • Platforms permissions of /var/local/aegir/platforms have been changed to 755. [success]
  • Platforms path /var/local/aegir/platforms is writable. [success]
  • array_flip(): Can only flip STRING and INTEGER values! entity.inc:175 [warning]
  • Changed permissions of sites/dev.example.com to 755 [success]
  • Changed permissions of sites/dev.example.com/themes to 2775 [success]
  • ...

Comments

colan created an issue. See original summary.

colan’s picture

I also see this in the task list:

Import: dev.example.com

  • Context hostmaster has been imported. Updated site node 10.
  • array_flip(): Can only flip STRING and INTEGER values! entity.inc:175
  • array_flip(): Can only flip STRING and INTEGER values! entity.inc:388
  • Trying to get property of non-object hosting.inc:119
  • Returned from hook drush_hosting_post_hosting_task

Verify: dev.example.com

  • Invoking post_hosting_verify_task hooks.
  • array_flip(): Can only flip STRING and INTEGER values! entity.inc:175
  • array_flip(): Can only flip STRING and INTEGER values! entity.inc:388
  • Trying to get property of non-object hosting.inc:119
  • Returned from hook drush_hosting_post_hosting_task
ergonlogic’s picture

What version of Drush are you using? Are you only seeing this on the hostmaster site?

colan’s picture

Good question! Forgot to mention that. Drush version is 8.0.2.

So far it was during the installation on the command line, and then on the site, yes, just the hostmaster site. But I haven't created any other sites yet.

colan’s picture

Issue summary: View changes

Updated description to note that this happens both with the manual installation as well as with the Debian package.

colan’s picture

As I only see this when importing the hostmaster site and verifying the Web server initially, maybe the data isn't there yet. When I re-verify the server, the warnings disappear.

Given the Trying to get property of non-object hosting.inc:119 line, maybe we need to put some validation checking in here:

/**
 * Helper function to get the node ID of the Aegir front-end site.
 */
function hosting_get_hostmaster_site_nid() {
  return db_query('SELECT site.nid
                     FROM hosting_site site
                     JOIN hosting_package_instance pkgi
                       ON pkgi.rid = site.nid
                     JOIN hosting_package pkg
                       ON pkg.nid = pkgi.package_id
                    WHERE pkg.short_name = \'hostmaster\'')->fetchField();
}

/**
 * Helper function to get the node ID of the Aegir platform.
 */
function hosting_get_hostmaster_platform_nid() {
  $hostmaster_site = node_load(hosting_get_hostmaster_site_nid());
  return $hostmaster_site->platform;
}

That last line is definitely trying to return something that doesn't exist.

ergonlogic’s picture

colan’s picture

Status: Active » Fixed

This no longer appears to be an issue; it's gone. Those related code changes must have fixed it.

Status: Fixed » Closed (fixed)

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