unknown option "--invoke" causes error on "drush [alias] status" using alias for remote site
looks like --invoke is passed as option to ssh
"drush [alias] ssh" works - so does "drush status"
drush installed on CentOS via pear install drush/drush
$ drush -d @ALIASNAME status
Bootstrap to phase 0. [0 sec, 1.71 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 1.82 MB] [bootstrap]
Loaded alias @ALIASNAME from file [notice]
/usr/share/php/drush/includes/../ALIASNAME.aliases.drushrc.php
[0.01 sec, 1.84 MB]
Cache HIT cid: 5.9-commandfiles-0-f413548c6a1a4a4008c31c36af445cb2 [debug]
[0.02 sec, 1.85 MB]
Begin redispatch via invoke process [0.07 sec, 5.38 MB] [notice]
Backend invoke: ssh -o PasswordAuthentication=no [command]
decibelplaces@IPADDRESS 'drush --invoke --debug
--root=/var/www/html/DRUPALROOT --uri=ALIASNAME.com --verbose status
2>&1' 2>&1 [0.11 sec, 5.4 MB]
executing ssh -o PasswordAuthentication=no decibelplaces@IPADDRESS [notice]
'drush --invoke --debug --root=/var/www/html/DRUPALROOT
--uri=ALIASNAME.com --verbose status 2>&1' 2>&1 [0.11 sec, 5.4 MB]
Calling proc_open(ssh -o PasswordAuthentication=no decibelplaces@IPADDRESS 'drush --invoke --debug --root=/var/www/html/DRUPALROOT --uri=ALIASNAME.com --verbose status 2>&1' 2>&1);
Bootstrap to phase 0. [0 sec, 3.77 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0 sec, 3.97 MB] [bootstrap]
Cache HIT cid: 6.0-commandfiles-0-3c4037859a90f1169bb9ee319aa7f401 [debug]
[0.01 sec, 3.98 MB]
Bootstrap to phase 0. [0.05 sec, 9.28 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.08 sec, [bootstrap]
9.29 MB]
Initialized Drupal 7.19 root directory at /var/www/html/DRUPALROOT [0.09 [notice]
sec, 10.72 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.09 sec, [bootstrap]
10.73 MB]
Initialized Drupal site ALIASNAME.com at sites/default [0.09 sec, [notice]
10.73 MB]
Cache HIT cid: 6.0-install_profile-66ecfeb9791a023150773849f1550c5d [debug]
[0.09 sec, 10.73 MB]
Cache HIT cid: 6.0-commandfiles-2-699657487b88e8b0c2ede2984aa12913 [debug]
[0.09 sec, 10.73 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.09[bootstrap]
sec, 10.73 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.09 sec,[bootstrap]
10.74 MB]
Successfully connected to the Drupal database. [0.09 sec, 10.74 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.1 sec, [bootstrap]
11.44 MB]
Cache HIT cid: 6.0-install_profile-66ecfeb9791a023150773849f1550c5d [debug]
[0.26 sec, 36.88 MB]
Cache HIT cid: 6.0-commandfiles-5-97242229ac4734cb48b9bc49d9929332 [debug]
[0.26 sec, 36.9 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [0.27 sec, [bootstrap]
37.34 MB]
Successfully logged into Drupal as Anonymous (uid=0) [0.27 sec, 38.21[bootstrap]
MB]
Found command: core-status (commandfile=core) [0.27 sec, 38.21 MB] [bootstrap]
Unknown option: --invoke. See `drush help core-status` for available [error]
options. To suppress this error, add the option --strict=0. [0.34
sec, 38.51 MB]
Timer Cum (sec) Count Avg (msec)
page 0.252 1 252.07
Peak memory usage was 40.7 MB [0.34 sec, 38.44 MB] [memory]
Invoke process is complete [2.09 sec, 5.39 MB] [notice]
drush ssh works
drush -d @ALIASNAME ssh
Bootstrap to phase 0. [0 sec, 1.71 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 1.82 MB] [bootstrap]
Loaded alias @ALIASNAME from file [notice]
/usr/share/php/drush/includes/../ALIASNAME.aliases.drushrc.php
[0.01 sec, 1.84 MB]
Cache HIT cid: 5.9-commandfiles-0-f413548c6a1a4a4008c31c36af445cb2 [debug]
[0.02 sec, 1.85 MB]
Bootstrap to phase 0. [0.08 sec, 5.38 MB] [bootstrap]
Bootstrap to phase 0. [0.1 sec, 5.38 MB] [bootstrap]
Found command: site-ssh (commandfile=ssh) [0.1 sec, 5.38 MB] [bootstrap]
Calling proc_open(ssh -o PasswordAuthentication=no decibelplaces@IPADDRESS);
Last login: Sat Aug 17 22:20:08 2013 from [local IP]
drush status when logged in via ssh
drush status
Drupal version : 7.19
Site URI : http://default
Database driver : mysql
Database username : DBUSER
Database name : DBNAME
Database : Connected
Drupal bootstrap : Successful
Drupal user : Anonymous
Default theme : govideo
Administration theme : seven
PHP executable : /usr/bin/php
PHP configuration : /etc/php.ini
PHP OS : Linux
Drush version : 6.0
Drush configuration :
Drush alias files :
Drupal root : /var/www/html/DRUPALROOT
Site path : sites/default
File directory path : sites/default/files
Temporary file directory path : /tmp
Comments
Comment #1
decibel.places commentedjust like the message sez:
drush --strict=0 @ALIASNAME statusworks
and adding strict => '0' to alias works:
so now I know the the fix, but why necessary?
Comment #2
moshe weitzman commentedHow current is your Drush6 on the local side (the remote side doesn't matter in this case)? Please update to 6.0.0 tag or track the new master branch on Github.
It would be ideal if you could report back quickly, since we have not announced the 6.0.0 release and this would be a major bug. I can't reproduce it with latest Drush.
Comment #3
greg.1.anderson commentedThe symptoms in #1 are consistent with using Drush 5 (or an earlier revision from the Drush 6 branch) to execute a remote command on a machine that has Drush 6 installed.
Reopen in https://github.com/drush-ops/drush/issues if necessary, but I think this behaves as intended. If this is viewed as serious, we could always add --invoke as a hidden, do-nothing global option in Drush 6.
Comment #4
moshe weitzman commentedI posted a pull request based on greg's idea in #3. Lets work there.
Comment #5
decibel.places commentedI can confirm that I was using Drush v 5.9 locally - and updating the local version to the new master branch on Github version 6.0 removed the error - so now I guess it's a matter of catching the mismatched versions and giving a meaningful message.
I recently used the pear installer on the remote machine which I guess installed 6.0 there, and had an older version already installed via pear on my local, where drush self-update does not yet update to 6.0 - so I cloned the master head from Github to replace my local drush folder on ubuntu /usr/share/php/drush and copied over the aliases files.
Comment #6
alexborsody commentedI am getting similar error for any command
MacBook-Air:~ user$ drush @mysite.dev status
dev.70a37f8c-b69f-4007-a330-0c@mysite.drush.in's password:
Unknown option: --db-url. See `drush help core-status` for available [error]
options. To suppress this error, add the option --strict=0.
MacBook-Air:~ user$ drush @mysite.dev cc all
dev.70a37f8c-b69f-4007-a330-0c@mysite.drush.in's password:
Unknown option: --db-url. See `drush help cache-clear` for available [error]
options. To suppress this error, add the option --strict=0.
Comment #7
alexborsody commentedI am getting similar error for any command
MacBook-Air:~ user$ drush @mysite.dev status
dev.70a37f8c-b69f-4007-a330-0c@mysite.drush.in's password:
Unknown option: --db-url. See `drush help core-status` for available [error]
options. To suppress this error, add the option --strict=0.
MacBook-Air:~ user$ drush @mysite.dev cc all
dev.70a37f8c-b69f-4007-a330-0c@mysite.drush.in's password:
Unknown option: --db-url. See `drush help cache-clear` for available [error]
options. To suppress this error, add the option --strict=0.
Comment #8
greg.1.anderson commentedYou need to do what the error message told you, and add `--strict=0` to your command when using Drush with Pantheon.