Bug #21655
closed"foreman-rake foreman_tasks:export_tasks" fails with "missing run_prettify.js" error
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1512562
Description of problem:
According to https://access.redhat.com/solutions/1284813 it is possible to export Satellite 6 tasks using the following command:
$ foreman-rake foreman_tasks:export_tasks
Running it on Satellite 6.3 ends with a Ruby traceback.
Version-Release number of selected component (if applicable):
Satellite 6.3 Snap 24
How reproducible:
always
Steps to Reproduce:
1. Have some tasks on Sat 6.3 server
2. Run "foreman-rake foreman_tasks:export_tasks task_search=all" as described in https://access.redhat.com/solutions/1284813.
Actual results:
$ foreman-rake foreman_tasks:export_tasks task_search=all
Gathering 147697 tasks.
rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/web/assets/vendor/google-code-prettify/run_prettify.js
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6/lib/foreman_tasks/tasks/export_tasks.rake:217:in `block in copy_assets'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6/lib/foreman_tasks/tasks/export_tasks.rake:214:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6/lib/foreman_tasks/tasks/export_tasks.rake:214:in `copy_assets'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6/lib/foreman_tasks/tasks/export_tasks.rake:251:in `block (3 levels) in <top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6/lib/foreman_tasks/tasks/export_tasks.rake:250:in `block (2 levels) in <top (required)>'
Tasks: TOP => foreman_tasks:export_tasks
(See full trace by running task with --trace)
Expected results:
Tasks are exported successfully.
Additional info:
The missing dependency can be found at https://github.com/google/code-prettify. Copying content of https://github.com/google/code-prettify/tree/master/js-modules to manually created /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/web/assets/vendor/google-code-prettify directory resolves the problem.
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Assignee set to Adam Ruzicka
- Pull request https://github.com/theforeman/foreman-tasks/pull/296 added
Updated by Adam Ruzicka over 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 55da47a5286d87ab8a64c389f69f8052bb7d369c.