Bug 1537766
| Summary: | [RFE] Spacewalk needs a way for the Spacewalk Adminstrator to manage Snapshots | |||
|---|---|---|---|---|
| Product: | [Community] Spacewalk | Reporter: | Grant Gainey <ggainey> | |
| Component: | Server | Assignee: | Grant Gainey <ggainey> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 2.7 | CC: | cshereme, jhutar, ktordeur, tkasparek | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | spacewalk-utils-2.8.14-1 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1554307 (view as bug list) | Environment: | ||
| Last Closed: | 2018-04-20 12:31:52 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1450940, 1554307, 1564160 | |||
|
Description
Grant Gainey
2018-01-23 20:01:42 UTC
spacewalk.github: ab71482551c6bcf72495f11b395476e14ef3ea0e
New command and manpage, spacewalk-manage-snapshots
# spacewalk-manage-snapshots --help
Usage: spacewalk-manage-snapshots [--reports [--interval <INTERVAL>] | --delete-older-than <DAYS>]
Options:
-h, --help show this help message and exit
-b ROWS-PER-COMMIT, --batch-size=ROWS-PER-COMMIT
Number of rows to delete per commit (default is 1000)
-d DAYS, --delete-older-than=DAYS
Snapshots DAYS old or older will be purged from the
database
-i INTERVAL, --interval-older-than=INTERVAL
INTERVAL-in-days period to use for --reports (default
is 90 days)
-r, --reports Report current table-sizes (in rows) for all snapshot-
related tables and report on the last four --interval
periods for snapshots
#
# spacewalk-manage-snapshots -r -i 25
rhnsnapshot : 12277
rhnsnapshotchannel : 18400
rhnsnapshotconfigchannel : 0
rhnsnapshotconfigrevision : 0
rhnsnapshotinvalidreason : 6
rhnsnapshotpackage : 3513699
rhnsnapshotservergroup : 31164
rhnsnapshottag : 0
: Snapshot info, 25-day interval :
: age(days) : systems : snapshots :
: 1-25 : 2 : 6 :
: 26-50 : 2 : 12263 :
: 51-75 : 3 : 3 :
: 76-100 : 1 : 1 :
: >100 : 3 : 4 :
#
# spacewalk-manage-snapshots -d 101 -b 1
Deleting snapshots older than 124 days
12277 snapshots currently
4 snapshots to be deleted, 1 per commit
... 4 snapshots left to purge
... 3 snapshots left to purge
... 2 snapshots left to purge
... 1 snapshots left to purge
12273 snapshots remain
# spacewalk-manage-snapshots -r -i 25
Table name : rows
rhnsnapshot : 12273
rhnsnapshotchannel : 18396
rhnsnapshotconfigchannel : 0
rhnsnapshotconfigrevision : 0
rhnsnapshotinvalidreason : 6
rhnsnapshotpackage : 3512145
rhnsnapshotservergroup : 31159
rhnsnapshottag : 0
: Snapshot info, 25-day interval :
: age(days) : systems : snapshots :
: 1-25 : 2 : 6 :
: 26-50 : 2 : 12263 :
: 51-75 : 3 : 3 :
: 76-100 : 1 : 1 :
#
spacewalk.github: c970f43b9a9d8881b628424609afad16b551c66e Fixed broken postgresql delete *** Bug 1559360 has been marked as a duplicate of this bug. *** *** Bug 1559361 has been marked as a duplicate of this bug. *** Fixes for the associated closed-as-dup BZs: spacewalk.github: 45e672dd135fe6c3efcaee98acf377aab9b6ad0a 1b3efbd11e5543e6ababccbc033f456bad5384d6 1992cdfe33b5cb0cf2be749efacc01c53178f27b Moving ON_QA Spacewalk 2.8 has been released. https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes28 |