Google Cloud SDK Compute Instances list filtering problems

625 views
Skip to first unread message

Andrei Ciobanu

unread,
Jun 20, 2016, 2:09:17 PM6/20/16
to gce-discussion

Just a simple question.


Having the following Google Cloud SDK command:

gcloud compute instances list --format=flattened --filter='NOT ((tags.items:special-tag))'

... I encounter one strange situation.


When I run this on my local machine (Ubuntu 16.04), where I have installed the Google Cloud SDK, everything is going well.


The problem appears when I am trying to run this on an instance from Google Cloud which runs Ubuntu 16.04 as well.

ERROR: (gcloud.compute.instances.list) Term expected [NOT *HERE*].


Seems that does not recognize the actual 'query' (tags.items:special-tag). What is strange (as you can see) is that on my local machine is working, but on Compute Engine instance not...

What is even more strange is that on a Debian instance running on Compute Engine it is working..


Does anyone can think about a good explanation?


P.S.: Python, gcloud versions are exactly the same. The configurations are exactly the same.


Thank you.

Paul Nash

unread,
Jun 20, 2016, 4:46:46 PM6/20/16
to Andrei Ciobanu, gce-discussion
Hi Andrei, I'm looking into this a bit. A couple initial questions:

1) Are you running the same shell on both machines? ('echo $0')

2) Could you let us know the output of "gcloud version" so we know which version we're looking at? (we know you said they're identical).

Thanks,
-P

--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/befae67b-26a7-444c-b89a-738b41342c2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Paul R. Nash | Product Manager, Compute Engine | paul...@google.com | 206-876-1620

Andrei Ciobanu

unread,
Jun 20, 2016, 11:08:21 PM6/20/16
to gce-discussion
Hi Paul,

Thank you for your answer. I'm looking desperately for a solution.

1) yes, both machines are running '/bin/bash'. I looked also for not being another bash, because I know that Ubuntu used to make some symlinks from bash to dash or something like this, offering a lightweight implementation, and everything seems to be ok. Real bash is there.

2) The output is the following (for the both machines):
Google Cloud SDK 114.0.0

alpha 2016.06.09
beta 2016.06.09
bq 2.0.24
bq-nix 2.0.24
core 2016.06.09
core-nix 2016.06.09
gcloud 
gsutil 4.19
gsutil-nix 4.19

Paul Nash

unread,
Jun 21, 2016, 12:48:52 AM6/21/16
to Andrei Ciobanu, gce-discussion
Hi Andrei, here's the latest:

1) our engineers are investigating this, but meantime,

2) Another colleague tried to replicate your scenario, and experienced the following when he updated gcloud in his VM:

Update done!


To revert your SDK to the previously installed version, you may run:

  $ gcloud components update --version 111.0.0


WARNING: There are older versions of Google Cloud Platform tools on your system PATH.

Please remove the following to avoid accidentally invoking these old tools:


/usr/bin/git-credential-gcloud.sh

/usr/bin/bq

/usr/bin/gcloud

/usr/bin/gsutil


...and then he says:

So, it looks like this is a conflicting binary issue. I did the following:


$ sudo rm /usr/bin/gcloud
$ sudo ln -s /usr/lib/google-cloud-sdk/bin/gcloud /usr/bin/


...and that seemed to get him past the issue. He says you might encounter some other hiccups around permissions, but he wasn't sure if those were related. This information is in the hands of our engineers, who will likely look at it more closely and will coordinate with Canonical if there's an issue in Ubuntu's config (but maybe not til morning).

Sorry for the trouble, I hope this helps.

--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Andrei Ciobanu

unread,
Jun 21, 2016, 12:49:34 PM6/21/16
to gce-discussion, paul...@google.com
Hi Paul,

Executing those command seems to fix the problem. Thank you very much. I'm looking forward for a fix version. Great job for all of you, guys ;)

Thank you,
Andrei


On Monday, June 20, 2016 at 9:09:17 PM UTC+3, Andrei Ciobanu wrote:
Reply all
Reply to author
Forward
0 new messages