Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vacuum to Job Scheduler #16940

Merged
merged 2 commits into from
Feb 6, 2018
Merged

Add Vacuum to Job Scheduler #16940

merged 2 commits into from
Feb 6, 2018

Conversation

jntullo
Copy link

@jntullo jntullo commented Feb 2, 2018

Add vacuum to job scheduler on a 36 hour schedule. Previously this was done periodically as configured via the appliance console.

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1553772

@miq-bot assign @carbonin
@miq-bot add_label core, enhancement, gaprindashvili/yes

@@ -869,4 +869,8 @@ def vacuum_analyze_table(table)
def vacuum_full_analyze_table(table)
execute("VACUUM FULL ANALYZE #{quote_table_name(table)}")
end

def vacuum_full_table(table)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should probably go with the vacuum_full_analyze_table here. No reason not to really.

def self.vacuum
_log.info("Vacuuming table #{table_name}")
result = connection.vacuum_full_table(table_name)
_log.info("Completed Vacuuming of table #{table_name} with result #{result.result_status}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does result look like when it's logged here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carbonin it's a 1 or a 0 hah

@@ -89,6 +89,31 @@
- Metric
- MiqQueue
- MiqWorker
:vacuum_schedule: "36 * * * *"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this come out to in English? I thought it was weekly. Is this every hour on the 36th minute?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carbonin TBH I put this here and then forgot to update it. What should we put for periodic? Every other day? Every 2 days?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking weekly. Maybe queue it Saturday early AM in case it runs long?

Add vacuum to job scheduler on a 36 hour schedule. Previously this was done periodically as configured via the appliance console.
@@ -89,6 +89,31 @@
- Metric
- MiqQueue
- MiqWorker
:vacuum_schedule: "0 2 * * 6"
:vacuum_tables:
- Vm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we list these alphabetically?

Or you could leave it to @bdunne to do in a followup, he loves stuff like that :trollface:

@miq-bot
Copy link
Member

miq-bot commented Feb 5, 2018

Checked commits jntullo/manageiq@d2db9c2~...bf3d79c with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0
4 files checked, 0 offenses detected
Everything looks fine. 👍

Copy link
Member

@carbonin carbonin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@carbonin carbonin merged commit c2c05d5 into ManageIQ:master Feb 6, 2018
@simaishi
Copy link
Contributor

simaishi commented Mar 7, 2018

@jntullo Please add BZ link.

@jntullo
Copy link
Author

jntullo commented Mar 9, 2018

simaishi pushed a commit that referenced this pull request Mar 9, 2018
@simaishi
Copy link
Contributor

simaishi commented Mar 9, 2018

Gaprindashvili backport details:

$ git log -1
commit 23bd29d183da6428b8c436181ce38453ba508429
Author: Nick Carboni <ncarboni@redhat.com>
Date:   Tue Feb 6 09:08:49 2018 -0500

    Merge pull request #16940 from jntullo/vacuum
    
    Add Vacuum to Job Scheduler
    (cherry picked from commit c2c05d5461cea5333e9f1dae8c9d6f4b54ced3ce)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1553795

jrafanie added a commit to jrafanie/manageiq-appliance_console that referenced this pull request Apr 24, 2018
https://bugzilla.redhat.com/show_bug.cgi?id=1571246

Fixes: translation missing: en.advanced_settings.db_maintenance in
Advanced Settings menu of the appliance console.

The DB maintenance menu was removed in:
ManageIQ#32

It was replaced with:

ManageIQ/manageiq#16929
ManageIQ/manageiq#16940
@agrare agrare added this to the Sprint 79 Ending Feb 12, 2018 milestone Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants