this does work:

drush @cmskurs2.ar dl admin_menu-7.x-3.x-dev -y

Calling system(ssh -p 7822 konzepto@www50.a2hosting.com '/home/konzepto/bin/drush  --debug --yes --root=/home/konzepto/www/clever-systems.net/cmskurs/ar --uri=http://default --verbose dl admin_menu-7.x-3.x-dev  --drush-script=/home/konzepto/bin/drush --dump=/home/konzepto/tmp/cmskurs.ar.drush.sqldump --invoke 2>&1' 2>&1);

(-y needed here as of #1338816: remote confirmation breaks command)

but this breaks

drush @cmskurs2 dl admin_menu-7.x-3.x-dev -y
...
Backend invoke: ssh -p 7822 konzepto@www50.a2hosting.com '/home/konzepto/bin/drush  --php=/usr/bin/php --php-options='\''-d      [command]
error_reporting="E_ALL^E_DEPRECATED" '\'' --debug --yes --reserve-margin=17
--root=/home/konzepto/www/clever-systems.net/cmskurs/ar --verbose dl admin_menu-7.x-3.x-dev --backend=2 2>&1' 2>&1 [3.23 sec, 9.52 MB]
...
@cmskurs2.ar  >> The drush command 'error_reporting="E_ALL^E_DEPRECATED" dl admin_menu-7.x-3.x-dev' could not be found.        [error]

looks like the invoke is messed up...

Comments

greg.1.anderson’s picture

Status: Active » Postponed (maintainer needs more info)

This is working on my machine; it seems from the error_reporting="E_ALL^E_DEPRECATED" output above that you might have some special configuration settings. Could you show your alias definition, and any relevant options from any drushrc.php file that is being used? Perhaps %drush is defined in your alias?

geek-merlin’s picture

Status: Postponed (maintainer needs more info) » Active

i think it's not too special:

[xl@master:~]$ drush sa @cmskurs2.ar

$aliases['cmskurs2.ar'] = array (
  'remote-host' => 'www50.a2hosting.com',
  'remote-user' => 'konzepto',
  'ssh-options' => '-p 7822',
  'path-aliases' => 
  array (
    '%dump' => '/home/konzepto/tmp/cmskurs.ar.drush.sqldump',
    '%drush-script' => '/home/konzepto/bin/drush',
  ),
  'root' => '/home/konzepto/www/clever-systems.net/cmskurs/ar',
);

but an rgrep showed me that there is one option that can only come from an alias that is not(!) used (no, it's inherited nowhere)

'php-options' => '-d error_reporting="E_ALL^E_DEPRECATED"',

so i see 2 issues here:
* with multiple-remote drush seems to use an option from another alias that should not be used
* this option - although valid afaict - produces quoting issues

and to remember: it can't be a "wrong alias" as
* remote drush should behave the same when invoked singe or multiple, meaning
* the commands in the issue summary should work in both cases or break in both cases (which is not the case)

greg.1.anderson’s picture

Status: Active » Postponed (maintainer needs more info)

#2 is interesting, but without information about your "wrong" alias, it's hard to tell why Drush might be applying the php options from that envrionment in your multiple-alias dispatch.

Does your php-options item work correctly when you use the alias it is defined in singly?

geek-merlin’s picture

Status: Postponed (maintainer needs more info) » Active

yew, this option always worked correctly.

here's the alias:

[xl@master:~]$ drush sa @sanago.primel
$aliases['sanago.primel'] = array (
  'uri' => 'default',
  'remote-user' => 'ssh-197313-dev',
  'remote-host' => '[[some.customer.server]]',
  'root' => '/kunden/197313_61440/webseiten/drupal-7.0',
  'php' => '/usr/local/bin/php.5',
  'php-options' => '-d error_reporting="E_ALL^E_DEPRECATED"',
  'path-aliases' => 
  array (
    '%drush' => '/kunden/197313_61440/drush',
    '%drush-script' => '/kunden/197313_61440/drush/drush.php',
    '%site' => '/kunden/197313_61440/webseiten/drupal-7.0',
    '%rsync' => '/kunden/197313_61440/webseiten/drupal-7.0',
    '%dump-dir' => '/kunden/197313_61440/tmp',
  ),
);
greg.1.anderson’s picture

Status: Active » Postponed (maintainer needs more info)

Still not enough info here to see what is wrong or reproduce.

greg.1.anderson’s picture

Hm, although your aliases do not have the same names, #1346518: Drush should not merge together aliases with the same name cleans up a situation where "the wrong alias" is merged in with the right one. Doesn't seem that this is the issue here, but you could give it a try with that patch applied and see if the behavior changed at all.

greg.1.anderson’s picture

Version: » 8.x-6.x-dev
Status: Postponed (maintainer needs more info) » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.