Skip to content

Instantly share code, notes, and snippets.

@ikurni
Created July 18, 2023 08:10
Show Gist options
  • Select an option

  • Save ikurni/339e962534030b040565d7e22630457f to your computer and use it in GitHub Desktop.

Select an option

Save ikurni/339e962534030b040565d7e22630457f to your computer and use it in GitHub Desktop.

Revisions

  1. ikurni created this gist Jul 18, 2023.
    11 changes: 11 additions & 0 deletions force-remove-rhv-hosts-from-database
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    ### Removal from RHV Manager UI is not possible anymore, remove button has been greyed out
    # SSH to RHV Manager hosts
    su - postgres
    psql -d engine
    SELECT vds_id FROM vds_static WHERE vds_name = 'hostname of the unresponsive hosts';
    # Capture the vds_id
    DELETE FROM vds_dynamic WHERE vds_id = 'vds_id of the unresponsive hosts';
    DELETE FROM vds_statistics WHERE vds_id = 'vds_id of the unresponsive hosts';
    DELETE FROM vds_static WHERE vds_name = 'hostname of the unresponsive hosts';

    # Check again the unresponsive hosts, make sure it has been removed from the hosts lists