Bug 1723751
Summary: | [RFE] Provide a script-like interface to task cleanup, preventing wrong values from being entered | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Steffen Froemer <sfroemer> |
Component: | Tasks Plugin | Assignee: | Adam Ruzicka <aruzicka> |
Status: | CLOSED ERRATA | QA Contact: | Peter Ondrejka <pondrejk> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.5.0 | CC: | ahumbe, apatel, aruzicka, aupadhye, bkearney, bshahu, ehelms, inecas, kgaikwad, mmccune, pcreech, pondrejk, wpinheir |
Target Milestone: | 6.11.0 | Keywords: | FutureFeature, Triaged |
Target Release: | Unused | Flags: | aupadhye:
needinfo-
|
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | tfm-rubygem-foreman-tasks-5.2.1-2 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-07-05 14:27:54 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: |
Description
Steffen Froemer
2019-06-25 09:47:57 UTC
Additional info: Currently, when a unknown option is used, the command will ignore it and use default values. This could have impact if one made a typo Example: $ foreman-rake foreman_tasks:export_tasks TAKS_SEARCH='' Gathering 1500 tasks. 1/1500 [...] Note: TAKS_SEARCH vs. TASKS_SEARCH Changing the title to better match what was discussed in the comments Checked on Satellite 6.11 snap 15, the previous issues have been fixed, scripts are available in path, I successfully executed both foreman-tasks-cleanup and foreman-tasks-export with various combinations of options. However, I found a different issue with foreman-tasks-cleanup by chance. If it is executed from a directory that contains some files, it seems to take the first file in the dir a and use it as a parameter: ~]# foreman-tasks-cleanup -s * -a 10d -v --noop -S failed foreman-rake foreman_tasks:cleanup AFTER=10d NOOP=1 TASK_SEARCH=ssl-build STATES=failed VERBOSE=1 ~]# touch test.csv ~]# foreman-tasks-cleanup -s * -a 10d -v --noop -S failed Unaccepted parameter: test.csv But that's not caused by the script. That's your shell expanding * to a list of files in your current directory. If you properly quote/escape it, it should work as expected. Ah true, it was due to the unescaped queries. Moving to verified on 6.11 snap 15 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5498 |