• Skip to primary navigation
  • Skip to content

www.open902.com

My own Knowledge Base made public ..

  • Home
  • vRealize Automation 7
    • vRA & vRB 7.2
      • Installation
        • vRA 7.2 – Installation
        • vRA 7.2 – Unattended Enterprise Install
        • vRA 7.2 – Unattended Install Answer File Generator
        • vRB 7.2 – Installation
      • Configuration
        • vRA 7.2 – Initial Configuration
        • vRA 7.2 – Endpoints and AD Integration
        • vRA 7.2 – Fabric and Business Groups
        • vRA 7.2 – Reservations, Reservation Policies and Network Profiles
        • vRA 7.2 – Blueprints and Entitlements
        • vRA 7.2 – Email Config and Approval Policies
      • Advanced Configuration
        • vRA 7.2 – Guest Agent and Software Components
        • vRA 7.2 – Custom Property RegEx
        • vRA 7.2 – Make IP in Network Profile unavailable for deployments
      • Integrations
        • vRA 7.2 – Azure Integration
        • vRA 7.2 – vRB 7.2 Configuration
        • vRB Cloud without vRA by using vIDM
    • vRA 7.0 & 7.1
      • Installation & Configuration
        • vRealize Automation 7 – Simple install
        • vRealize Automation 7 – Enterprise install
        • Upgrade vRealize Automation 7.0 to 7.0.1
        • vRA7 – Initial Configuration
        • vRA7 – Endpoint
        • vRA7 – Business Groups
        • vRA7 – AD Integration
        • vRA7 – Fabric Group
        • vRA7 – Network Profile
        • vRA7 – Reservations
        • vRA7 – IaaS Blueprint
        • vRA7 – Mail and Approvals
      • Advanced Configuration
        • vRA7 – Customize Hostname, VLAN and IP during deployment
        • vRA7 – Custom Property Relationships using Actions
        • vRA7 – vRealize Orchestrator 7
        • vRA7 – VAMI Certificate
        • vRA7 – Gugent on Linux
        • vRA7 – Gugent on Windows
        • vRA7 – Import Unmanaged Virtual Machines from vSphere
      • Integrations
        • vRA7 – NSX 6 Integration
        • Ubiquiti EdgeRouter X, NSX and vRealize Automation in network kinda harmony
        • vRA7 – vRealize Business Standard
        • vRealize Business for Cloud – Change Time zone
        • vRB Cloud without vRA by using vIDM
      • Troubleshooting
        • vRA7 – Delete stuck ‘In Progress’ Deployments
        • vRA 7 – Remove Stuck Approval Process
        • Remove Orphaned Network Profiles
        • vRA7 – Remove Stuck or Orphaned Managed Machines
  • vRA / vCAC 6
    • Installation
      • 1. Requirements
      • 2. Identity Appliance
      • 3. vCAC Appliance
      • 4. IaaS Server
    • Configuration
      • 5. Add a Tenant
      • 6. Agents & Endpoints
      • 7. Resource Allocations
      • 8. Blueprints
      • 9. Services & Catalogs
      • 10. Entitlements & Test
    • Advanced Configuration
      • Enable vCenter Orchestrator in vCAC
      • Configure External vCenter Orchestrator for vCAC
      • vCAC – Create Active Directory Endpoint & Test
      • vCAC – Refresh Inventory
      • vCAC – SMTP Settings
  • NSX
    • Ubiquiti EdgeRouter X, NSX and vRA7 Configuration
    • NSX 6 Integration into vRA7
    • NSX Authentication in Web Client using Sub-Domain users
  • vCloud Director 8.x
    • Install vCloud Director 8.0 for SP
    • NSX 6.2 for vCloud Director 8.0 SP
    • Configure vCloud Director 8.0 for SP – PVDC
    • Configure vCloud Director 8.0 for SP – Organization
    • vCloud Director 8.0 with NSX 6.2 – Final Testing
  • vCloud Director 5.x
    • 1. Installation of vCD 5.5
    • 2. vShield Manager
    • 3. VXLAN Configuration
    • 4. Initial vCloud Config
    • 5. Create a Provider vDC
    • 6.External Network
    • 7. Organization VDC
    • 8. vShield Edge & Organization Network
    • 9. Final Testing
    • 10. Installing an additional vCloud cell
    • Upgrade 1.5 > 5.5
      • 1. vCloud Director Binaries
      • 2. vShield Manager
      • 3. Final Touches
  • Lego NUC vSAN Cluster
  • Vembu
  • About Me

vRA 7 – Remove Stuck Approval Process

DON’T FORGET BACKUPS !!

In my previous post “Approval Policies – Don’t lock yourself out of a request”, I warned about the ability to lock yourself out of an approval policy. Or rather out of a request affected by one.

This happens when you add an Active Directory User-group to the approvers, whilst the members were added to the group AFTER the request has been made.

Adding the users after the request has been made will not have an affect on the request already been made.

When you create a request, a work item is being created with all the relevant information, such as blueprint, requestor, tenant and so on.

Any changes made after the work item has been issued, won’t affect already issued work items. Same applies to changes to blueprints.

Any changes to Blueprints, such as resource allowances etc., will not affect any already deployed virtual machines.

You’d have to either re-create the VM or unregister the VM from vRA and re-import the VM so blueprint changes are being populated.

Anyway, back to stuck Approval Policies. Here an example:

Here Request #176 is Pending Approval

vRA-706

In the Approval Policy I specified the AD Group vRA-Approvers as sole approvers.

vRA-708

Which ‘accidentally’ has no one in it

vRA-705

I now add myself (cloud-admin) to it and re-sync AD.

vRA-709

Yet I am unable to approve or reject this request.

vRA-707

Now when I check the work item of this request – you can see it includes all the relevant information to process this request once approved

vRA-710

So how can you get rid of it again ?

I previously created an article which explains how you can remove a stuck request, however, whilst this would work for the request itself, it won’t work for the approval.

All you’d accomplish is removing the request from the approval. As a result you’d get an error when trying to view the request, making matters rather worse.

You will still need Postgres in order to fix this though.

SSH to your vRA appliance and login with root.

Now open Postgres as user postgres

/opt/vmware/vpostgres/9.4/bin/psql -U postgres

vRA-711

Change to the vRA database

\c vcac

vRA-712

As mentioned previously, the request we want to delete is request number #176, but the approval number is #10

Check the details of workitem #10 to ensure this is the correct approval in question

select * from work_item where workitemnumber =10;

If you cannot really read anything because it is all jumbled around

vRA-713

Use

\x

to enable the expanded view

vRA-714

And check again

vRA-715

Check if the above request matches the approval

vRA-716

If you have more requests during the same time, you might have to look for other proof – like description, requestor, blueprint etc.

vRA-717

I trust that the workitem #10 matches my stuck approval #10

vRA-718

Easiest solution is to cancel the work item. Trying to remove request and approval from the DB can be lengthly – and as mentioned, might not work at all 🙂

So here I cancel workitem #10

update work_item set state=’CANCELLED’ where workitemnumber = 10;

vRA-719

After a UI refresh you can see that the stuck approval is gone (here it stops at #9)

vRA-720

Copyright © 2019 · Genesis Sample on Genesis Framework · WordPress · Log in