Feature #4937

Database toolset enhancements

Added by Ruben S. Montero over 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:11/22/2016
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:Core & System
Target version:Release 5.4
Resolution:fixed Pull request:

Description

This feature is to include several enhancements to the database tool:
  • Purge database contents
  • Purge history records of running VMs
  • Ability for raw update of XML objects
  • Better structure to fsck tests

Related issues

Related to Feature #3239: Add VM history archive option to onedb upgrade Closed 10/13/2014
Related to Feature #150: one.db clean up Closed 09/10/2009

Associated revisions

Revision 5be92e32
Added by Javi Fontan about 4 years ago

F #4937: reorganize fsck code

This contains all these changes

  • Use IMAGE_STATES array from OCA
  • Including OpenNebula breaks fsck
  • Extract check_pool_control and check_users_groups
  • Extract check_clusters
  • Extract check_datastores
  • Move schema definitions to a hash
  • Move counter initialization to its own methods
  • Add comments to sections

To see them use:

grep -E '(DATA|FIX|TODO):' fsck.rb
  • More fsck comments
  • Move image checks to its own file
  • Move marketplace/app checks to it's own file
  • Take out do_ prefix from functions
  • Move pool_control checks
  • Move user and group checks
  • Split check_clusters to external functions

There are still functions that regenerate the whole table. This should
be fixed later. Look for functions called check_fix_*.

Look also for use of REXML instead of Nokogiri. This can be found
searching for "Document.new".

Some searches are done using plain SQL statements. These can be
changed to sequel functions.

  • Split check_datastores
  • Move VM checks
  • Move cluster_vnc_bitmap checks
  • Move history check
  • Move vrouter check
  • Move host checks
  • Move network checks
  • Move quota checks
  • Move template checks
  • Reorganize quota check code
  • Calculate quota for datastores with target SELF
  • Add fsck directory to install.sh
  • Bug in fsck quota code

Revision 38cb96ed
Added by Javi Fontan about 4 years ago

F #4937: Change schema code to database backend

Revision 631abcdd
Added by Ruben S. Montero about 4 years ago

F #4937: Adds XML-RPC method to execute & replicate SQL commands

Revision 4ebc52a0
Added by Javi Fontan about 4 years ago

F #4937: add purge-history to onedb

Revision effd1ea5
Added by Javi Fontan about 4 years ago

F #4937: add purge-history to onedb

Revision a64e69d4
Added by Javi Fontan about 4 years ago

F #4937: add purge-done action to onedb

Revision d6a5b63c
Added by Javi Fontan about 4 years ago

F #4937: move live actions to onedb_live.rb

Revision a3f7088e
Added by Javi Fontan about 4 years ago

F #4937: add database helpers, delete history table

Revision b2eb3049
Added by Javi Fontan about 4 years ago

F #4937: add start/end time and progress info

Revision 4bf338cf
Added by Javi Fontan about 4 years ago

F #4937: renum history records and add update

Revision c03fcc70
Added by Javi Fontan about 4 years ago

F #4937: add change_body action to onedb

Revision 3e375847
Added by Javi Fontan about 4 years ago

F #4937: add purge-history to onedb

Revision fcb3f442
Added by Javi Fontan about 4 years ago

F #4937: add purge-done action to onedb

Revision 36906272
Added by Javi Fontan about 4 years ago

F #4937: move live actions to onedb_live.rb

Revision 138e75f9
Added by Javi Fontan about 4 years ago

F #4937: add database helpers, delete history table

Revision 62edeebb
Added by Javi Fontan about 4 years ago

F #4937: add start/end time and progress info

Revision 267afe29
Added by Javi Fontan about 4 years ago

F #4937: renum history records and add update

Revision f9d9220f
Added by Javi Fontan about 4 years ago

F #4937: add change_body action to onedb

Revision 1710c921
Added by Javi Fontan about 4 years ago

F #4937: add examples to onedb change-body

Revision 7326ce22
Added by Javi Fontan about 4 years ago

F #4937: renumerate VM history records

Revision d4fb4df5
Added by Javi Fontan about 4 years ago

F #4937: live actions do not have backup option

Revision 4e9d9e5d
Added by Javi Fontan about 4 years ago

F #4937: Add warning to onedb live actions

Revision 45bfe9aa
Added by Javi Fontan about 4 years ago

F #4937: add live actions to onedb

  • purge-history
  • purge-done
  • change-body

Some helper functions are also added to onedb_live.rb file.

History

#1 Updated by Ruben S. Montero over 4 years ago

  • Related to Bug #4911: Fix several issues in the migration process from 5.0 to 5.2 added

#2 Updated by Ruben S. Montero over 4 years ago

  • Related to deleted (Bug #4911: Fix several issues in the migration process from 5.0 to 5.2)

#3 Updated by Ruben S. Montero over 4 years ago

  • Related to Feature #3239: Add VM history archive option to onedb upgrade added

#4 Updated by Ruben S. Montero over 4 years ago

#5 Updated by Ruben S. Montero about 4 years ago

  • Assignee set to Javi Fontan

#6 Updated by Ruben S. Montero about 4 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Also available in: Atom PDF