Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1512562 - "foreman-rake foreman_tasks:export_tasks" fails with "missing run_prettify.js" error [NEEDINFO]
Summary: "foreman-rake foreman_tasks:export_tasks" fails with "missing run_prettify.js...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Tasks Plugin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: Unspecified
Assignee: Adam Ruzicka
QA Contact: Renzo Nuccitelli
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-13 14:20 UTC by Radovan Drazny
Modified: 2019-04-01 20:27 UTC (History)
6 users (show)

Fixed In Version: rubygem-foreman-tasks-0.9.6.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
bbuckingham: needinfo? (mmccune)


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 21655 None None None 2017-11-14 11:03:26 UTC
Red Hat Bugzilla 1462739 None CLOSED /foreman_tasks/dynflow/vendor/google-code-prettify/run_prettify.js points to google 2019-03-24 04:11:34 UTC

Internal Links: 1462739

Description Radovan Drazny 2017-11-13 14:20:06 UTC
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.

Comment 5 Adam Ruzicka 2017-11-14 11:03:24 UTC
Created redmine issue http://projects.theforeman.org/issues/21655 from this bug

Comment 6 Adam Ruzicka 2017-11-14 11:07:29 UTC
Linked BZ removed the prettify js from dynflow. foreman-tasks tried to include the removed js from dynflow into the task export.

Comment 7 pm-sat@redhat.com 2017-11-14 13:13:38 UTC
Upstream bug assigned to aruzicka@redhat.com

Comment 8 pm-sat@redhat.com 2017-11-14 13:13:40 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21655 has been resolved.

Comment 10 Evgeni Golov 2017-11-18 10:36:37 UTC
back to modified, we had to untag this last minute

Comment 11 Evgeni Golov 2017-11-21 15:10:09 UTC
% brew tag-build satellite-6.3.0-rhel-7-candidate tfm-rubygem-foreman-tasks-0.9.6.1-1.fm1_15.el7sat
Created task 14595303
Watching tasks (this may be safely interrupted)...
14595303 tagBuild (noarch): free
14595303 tagBuild (noarch): free -> open (x86-029.build.eng.bos.redhat.com)
14595303 tagBuild (noarch): open (x86-029.build.eng.bos.redhat.com) -> closed
  0 free  0 open  1 done  0 failed

14595303 tagBuild (noarch) completed successfully

Comment 12 Renzo Nuccitelli 2018-01-04 12:34:22 UTC
Worked on Satellite snap 30:

# foreman-rake foreman_tasks:export_tasks
Gathering 4 tasks.
1/4
2/4
3/4
4/4
tar cvzf /tmp/task-export-1515069228.tar.gz /tmp/task-export20180104-8178-17j9rzd > /dev/null
tar: Removing leading `/' from member names
Created /tmp/task-export-1515069228.tar.gz

Comment 13 pm-sat@redhat.com 2018-02-21 16:54:37 UTC
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, 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-2018:0336


Note You need to log in before you can comment on or make changes to this bug.