RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1253682 - [RFE] Preupgrade-assistant-tools package should provide preupg-content-creator
Summary: [RFE] Preupgrade-assistant-tools package should provide preupg-content-creator
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: preupgrade-assistant
Version: 6.8
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Petr Hracek
QA Contact: Tereza Cerna
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-14 12:52 UTC by Petr Hracek
Modified: 2016-05-11 08:26 UTC (History)
8 users (show)

Fixed In Version: preupgrade-assistant-2.1.5-3.el6
Doc Type: Enhancement
Doc Text:
Addition of preupg-content-creator to preupgrade-assistant-tools The preupg-content-creator utility is designed to help content developers with kickstarting a new module for preupgrade-assistant. This update makes the utility available in preupgrade-assistant-tools.
Clone Of:
Environment:
Last Closed: 2016-05-11 08:26:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1022 0 normal SHIPPED_LIVE preupgrade-assistant bug fix and enhancement update 2016-05-11 12:23:56 UTC

Description Petr Hracek 2015-08-14 12:52:44 UTC
Description of problem:

Nowadays users who want to create a content from scratch doesn't have a information how to do it.

It would be good to create preupg-content-creator script which will prepare a content with all needed stuff like INI file, basic check script, solution file, etc.

This script should be a part of preupgrade-assistant-tools package.

Also preupgrade-assistant-tools package could provide a set of templates and guide how to pack a content or even set of contents.

Comment 2 Petr Hracek 2015-10-07 10:24:37 UTC
Upstream finally provided a preupg-content-creator which is able to generate a content based on input.

Upstream commit is: https://github.com/phracek/preupgrade-assistant/commit/486b56091979c3f5ff9f43860a2f3530aecfd93e

Sentences which are used by preupg-content-creator are:
Specify a group name which content belongs to (like database):
Specify a module name which will be created (like mysql):
Specify a script name which will be used for assessment:
Specify a solution file which will be shown in report:
Specify a content title:
Would you like to specify a content description?
Write down a content description:
Specify a upgrade path (like RHEL6_7) where a content will be stored:
preupg-content-creator generates these files which should be updated:
- content was created in directory %s.
- ini file which defines a content is %s.
- check script which does an assessment is %s. Update it before an usage
- solution text which informs about incompatilibies is %s. Update it before an usage
File %s already exists. Do you want to replace the file?

Comment 3 Petr Hracek 2015-10-07 10:25:33 UTC
Would you please review texts mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1253682#c2

Comment 9 Tereza Cerna 2016-03-08 13:38:02 UTC
Thank you for fixing mistakes from comment#7.

1] Manual pages for preupg, preupg-content-creator and preupgrade-assistant-api are existing.

# rpm -ql preupgrade-assistant{,-tools} | grep man/
/usr/share/man/man1/preupg.1.gz
/usr/share/man/man1/preupg-content-creator.1.gz
/usr/share/man/man1/preupgrade-assistant-api.1.gz

2] Directory with content, which was stopped during creation, was deleted. There is no zombie content. Thanks.

# preupg-content-creator
Specify a upgrade path (like RHEL6_7) where a content will be stored: RHEL6_7
Path RHEL6_7 already exists.
Do you want to create a content there? ([y]/n)? y
Specify a group name which content belongs to (like database): networking
Specify a module name which will be created (like mysql): nfs
Specify a script name which will be used for assessment : (check.sh) check.sh
Specify a solution file which will be shown in report: (solution.txt) ^C
Content creation was interrupted by user.

# find RHEL6_7/
RHEL6_7/
RHEL6_7/networking

3] There are message which helps to user with testing and running newly created content.

# preupg-content-creator
...
For testing content run these two commands:
- preupg-create-group-xml RHEL6_7/networking/nfs to create XML file
- preupg -c RHEL6_7-results/networking/nfs/all-xccdf.xml

Comment 10 Tereza Cerna 2016-03-09 13:28:47 UTC
Manual test: PASS
-----------------

# rpm -q preupgrade-assistant
preupgrade-assistant-2.1.5-3.el6.noarch

CREATE NEW CONTENT

# preupg-content-creator 
Specify a upgrade path (like RHEL6_7) where a content will be stored: RHEL6_7
Specify a group name which content belongs to (like database): database
Specify a module name which will be created (like mysql): test-module
Specify a script name which will be used for assessment : (check.sh) check.sh
Specify a solution file which will be shown in report: (solution.txt) solution.txt
Specify a content title: test-module
Would you like to specify a content description? ([y]/n)? y
Write down a content description: test module to test BZ#1253682

preupg-content-creator generates these files which should be updated:
- content was created in directory /root/RHEL6_7/database/test-module.
- ini file which defines a content is RHEL6_7/database/test-module/test-module.ini.
- check script which does an assessment is RHEL6_7/database/test-module/check.sh. Update it before an usage
- solution text which informs about incompatilibies is RHEL6_7/database/test-module/solution.txt. Update it before an usage

For testing content run these two commands:
- preupg-create-group-xml RHEL6_7/database/test-module to create XML file
- preupg -c RHEL6_7-results/database/test-module/all-xccdf.xml

# find RHEL6_7
RHEL6_7
RHEL6_7/database
RHEL6_7/database/test-module
RHEL6_7/database/test-module/solution.txt
RHEL6_7/database/test-module/test-module.ini
RHEL6_7/database/test-module/check.sh
RHEL6_7/database/group.ini

FILL SOMETHING INTO SCRIPT CHECK.SH

# echo "exit_pass" >> RHEL6_7/database/test-module/check.sh 

CREATE XML FILE

# preupg-create-group-xml RHEL6_7/database/test-module
Generated report file for preupgrade-assistant is: RHEL6_7-results/database/test-module/all-xccdf.xml

RUN AND TEST NEW CONTENT

# preupg --help | grep "\-\-contents"
  -c CONTENTS, --contents=CONTENTS

# preupg -c RHEL6_7-results/database/test-module/all-xccdf.xml
...
Assessment of the system, running checks / SCE scripts:
001/001 ...done    (test-module)
Assessment finished (time 00:01s)
Result table with checks and their results for main contents:
--------------------------
|test-module      |pass  |
--------------------------
Tarball with results is stored here /root/preupgrade-results/preupg_results-160309043310.tar.gz .
The latest assessment is stored in directory /root/preupgrade .
Upload results to UI by command:
e.g. preupg -u http://127.0.0.1:8099/submit/ -r /root/preupgrade-results/preupg_results-160309043310.tar.gz .

-->> PASS <<--

Comment 11 Tereza Cerna 2016-04-08 13:39:32 UTC
Automated test /CoreOS/preupgrade-assistant/6to7/assistant/creation-of-new-content was created.
It tests:
 - creation of new content
 - run this content with `preupg -c`
 - copy this content to /usr/share/preupgrade/RHEL6_7 and run this content in real run

Result: PASS

# rpm -q preupgrade-assistant
preupgrade-assistant-2.1.5-1.el6.noarch

Comment 13 errata-xmlrpc 2016-05-11 08:26:12 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://rhn.redhat.com/errata/RHBA-2016-1022.html


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