Can't get pending VM approval to work

Whenever I set a value (max_cpus, max_memory, max_vms, etc.) in Infrastructue/VM/Provisioning/StateMachines/Default, I can’t approve it in Service/Requests when logged in as the Administrator user (or any other user). The buttons to approve it just aren’t showing up and no emails are sent out to the emails specified in Infrastructue/VM/Provisioning/Email/MiqProvisionRequest_Pending. The state is set to “Pending” and the last message says something like “Request was not auto-approved for the following reasons: (Requested CPUs 2 limit is 1) (Requested Memory 2048MB limit is 1024MB)”. Any ideas would be greatly appreciated. Thanks!

Here is the automation.log from what I think is the entire provisioning phase:

@gmccullough can you review this question from @com6056 and forward to a SME if necessary.

@com6056 This sounds like it might be a UI issue if the Administrator account is not seeing the buttons. What version are you running? I tested on the latest code and Admin can see the buttons.

@dclarizio Any ideas here?

@com6056 This does look like it might be a UI bug. Does this happen for ALL Service requests that this user sees or only when you set those max values? If you can open a github issue with a recipe to recreate, we will look into it.

I am running version “capablanca-2.20160408131902_d083ab5”.

I’ll try to see if I can re-create it on a fresh image. The thing that makes me think it might not be a UI issue is that the email doesn’t get sent out either to the email specified in “(to_email_address)” for the Email class in VM/Provisioning. Emails do get sent out to the user that created the VM though when they make a VM that is under the max_cpu and max_memory limits that I set.

Also, it only happens when I set those max values because when I don’t set them, there is nothing to approve since the requests are auto-approved. The VMs get created just fine and the emails to the user that created them are sent out as well when they are auto-approved.

Here is how I reproduced the problem:

  • Create a test user and add them to the EvmGroup-user_limited_self_service group with the EvmRole-user_limited_self_service role.
  • Create a new domain and copy Infrastructure/VM/Provisioning/StateMachines/ProvisionRequestApproval/Default to it.
  • Change Default max_cpu and max_memory to 1 and 1024.
  • Log in as test user and create a new VM from a template with 2GB RAM and 2 CPUs.
  • Go to Services -> Requests as the Administrator and the buttons to approve the request aren’t there.

Should I go ahead and submit an issue with this info?

Check that you have the /System/Event/RequestEvent/Request/request_pending instance. This was missing in early versions of CFME 5.5 / Capablanca. It’s fixed in CFME but I’m not sure if the same fix got into capablanca-2.

If you don’t have the Instance, just create it in your own domain, and set the rel5 relationship to /System/Policy/request_pending

Hope this helps,

Awesome so that seems to have gotten emails working for pending requests, but I still don’t see any buttons to approve the requests.

Even if you click on the link in the email? When I was researching, the only way I could get the approval button visible is from that email link. Bizarre.


Nope, not even from the email links. I even spun up a new instance and was able to get the copy and delete buttons to the left of the reload button to show up, but still no approve or deny buttons. Any other ideas? Thanks!

The latest code as in nightly or the latest version of capablanca? I can also see the buttons in the nightly version but not in capablanca. Also, @dclarizio I opened up an issue for it with steps to reproduce it. Thanks!