VMware Cloud Community
Ukusic
Enthusiast
Enthusiast

Cloud Client exception with "vra deployment list --requestId" when the total number of requests is above 5000

Hi,

I'm using vra 7.3 and cloud client 4.4.

 

A couple of days ago I started getting this weird error message all of a sudden in my automation pipe I have using Cloud Client.

 

Flow:
1. I do a successful request of a blueprint/deployment through cloud client.


2. I get the requestId back from the successful request I made. I also verified the requestId in the GUI under Requests.

 

3. I then use

   CloudClient>vra deployment list --requestId <the id I got from above here>

4. But I then got

 

com.vmware.cloudclient.exception.CloudClientException: Failed to convert '<id from above>' to type Request for option 'requestId'
Error: Unable to find a Request by the name or id '<id from above>'.


5. The above message is the same as if I wrote a requestId that does not exist, but it did.

 

---

I started to dig deeper...


1. This Business Group has 5000+ requests (5197 something), I could verify this in the GUI

 

2. I then used the same command but instead of writing the requestId I pressed the Tab key, twice.

 

   CloudClient>vra deployment list --requestId

   Display all 5000 possibilites? (y or n)

 

3. Wait a minute... I have more than 5000 requests.

 

4. I compared and tested the following

   CloudClient>vra request list --pagesize 5000
   CloudClient>vra request list --pagesize 5200

 

But still only saw up to 5000 requests.

 

5. I tested to set default pagesize in cloudclient.config above 5000, to like 5200 but then I had to use --page 2 to see the request entries above 5000.

vra request list --page 1 (showed 5000 entrys)
vra request list --page 2 (showed 197 more)

 


---

So my conclusion is that:

1. Cloud Client "vra request list" can only show 5000 entries even when using --pagesize larger than 5000

 

CloudClient>vra request list --pagesize 5200 <-- only shows 5000 entries

 

2. I can see beyond 5000 if I use --page (even if I use default pagesize of 25 and then use like --page 206 or something)

 

CloudClient>vra request list --page X

 

3. The problem is that

CloudClient>vra deployment list --requestId <requestId here>

 

Can only see 5000 request entries, not more, the only respons is the "com.vmware.cloudclient.exception.CloudClientException..." if I enter entries that is above 5000.

 

If I choose a request entry that is above 5000 I get the error message, same as if the requestId does not exist.


If I choose a request entry that is 5000 or below I get a response as usual and its working as it should.

 


---

Can anyone confirm this?
And how can I fix this?


1. How can I remove/delete old requests for a Business Group? Can I clear it some how? There is a "delete" button in the GUI but that only works for "Unsubmitted" requests.
   Is the only option to rebuild the Business Group or hack the database?
2. Is there some setting in Cloud Client that can be modified so vra deployment list --requestId can see beyond 5000 requests?
3. Any other ideas? or SR next 😕

0 Kudos
6 Replies
SimonLynch
VMware Employee
VMware Employee

Hi in 7.3 the maximum page size is 5000 when performing an odata query via the api. If your going direct to the api one way you can avoid pagination is sort descending so your latest 5000 requests are on the first page.

It sounds like cloud client isn’t  handling this scenario correctly, I would raise an SR to get support.

0 Kudos
Ukusic
Enthusiast
Enthusiast

Thanks for the reply Simon!

 

I will create a SR to get this sorted out.

 

1. Have the Cloud Client dev team look at why the command "CloudClient>vra deployment list --requestId" can't see request entries above 5000. And verify that im not crazy.

2. If there is a way to delete say the 4000 oldest requests entries for a specific Business Group. Getting me under 5000 request entries will get it working again I am sure.

 

 

If someone here know how to do number 2, please answer here. Maybe you could do it with some postgres db command, or maybe somehow you could do it in the GUI?
And if I want to clear all requests maybe removing and recreating the Business Group will do it, any ideas?

 

 

I have a test environment where I can test this, so if anyone have an solution please let me know 🙂

I am very keen on getting this up and running asap!

 

/best regards

0 Kudos
Ukusic
Enthusiast
Enthusiast

Update:
I tried to delete and then recreate the entitlement, reservation and lastly the business group but it did not remove the request entries as i thought because I used the same user. I changed to a completely new user and then all request entries was gone. Trying to figure out how to remove the request entries from an existing user now.

 

But Cloud client and "vra deployment list --requestId" still does not handle 5000+ entires correctly it seems, addressing that in my SR. So when we hit 5000+ it will break again.

0 Kudos
joeb_1234
Contributor
Contributor

Did you get this resolved?  We seem to be having a similar issue.

0 Kudos
Ukusic
Enthusiast
Enthusiast

Hi, not yet 😕

What similarities do you see?

I still have a SR open since mars 19 and they have had success in reproducing my issue it seems.

Doing a lot of testing and sending in logs etc atm, back and forth.

I will update here if and when some solution comes out of it.

Please open a SR if you have not done that already and report your findings.


 

0 Kudos
VMpalavsachin27
Contributor
Contributor

Can you please try changing below in cloudclient.config (file in users home directory ./cloudclient)

auto.completion.enable = true

Change to

auto.completion.enable = false

I was working with support on this similar problem and they told us to make this change and it started working.

Thanks to support for helping us.

Thanks

0 Kudos