Bug 1414341 - The part/partition and autopart commands are used both in one kickstart file
Summary: The part/partition and autopart commands are used both in one kickstart file
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: preupgrade-assistant
Version: 6.9
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Michal Bocek
QA Contact: Alois Mahdal
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-18 10:20 UTC by Tereza Cerna
Modified: 2017-03-21 12:10 UTC (History)
3 users (show)

Fixed In Version: preupgrade-assistant-2.3.2-1.el6
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2017-03-21 12:10:28 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0819 0 normal SHIPPED_LIVE preupgrade-assistant bug fix and enhancement update 2017-03-21 12:53:47 UTC

Comment 1 Tereza Cerna 2017-01-18 10:21:30 UTC
# rpm -q preupgrade-assistant{,-el5toel7{,-data}}

Comment 2 Tereza Cerna 2017-01-18 10:29:10 UTC
Related problem:

When user runs regeneration of kickstart with command 'preupg-kickstart-generator', it causes traceback and writes error message:
"The part/partition and autopart commands can't be used at the same time"


# preupg

# preupg-kickstart-generator 
Cannot read the system Kickstart at /root/preupgrade/kickstart/anaconda-ks.cfg.
The '/root/preupgrade/postmigrate.d' folder is empty - scripts to be executed after the migration should be placed here.

Do you want to continue with kickstart generation without any postmigration scripts? (Y/n)
The Preupgrade Assistant generates a kickstart file in '/root/preupgrade/kickstart/preupgrade.ks'.
The Kickstart file contains:
- users with UID/GID which you should create on Red Hat Enterprise Linux 7 system.
- the partitioning layout which was used on this system
- the package set which was installed on this system.
- the firewall rules which were enabled on this system.
The Kickstart file is pre-generated from this system and is not to be used directly for 
the installation of Red Hat Enterprise Linux 7.
The Kickstart file needs to be modified by the administator.
These directories exist on the migration system:
- /root/preupgrade/preupg_results-170118044230/cleanconf - configuration files which can be used on the migrated system.
- /root/preupgrade/preupg_results-170118044230/dirtyconf - configuration files which need to be clarified by the administrator.

# preupg-kickstart-generator 
Cannot read the system Kickstart at /root/preupgrade/kickstart/anaconda-ks.cfg.
Traceback (most recent call last):
  File "/usr/bin/preupg-kickstart-generator", line 27, in ?
  File "/usr/bin/preupg-kickstart-generator", line 19, in main
  File "/usr/lib/python2.4/site-packages/preupg/kickstart/application.py", line 255, in main
    dummy_ks = self.generate()
  File "/usr/lib/python2.4/site-packages/preupg/kickstart/application.py", line 231, in generate
    if not self.collect_data():
  File "/usr/lib/python2.4/site-packages/preupg/kickstart/application.py", line 102, in collect_data
    os.path.join(self.dir_name, settings.KS_TEMPLATE))
  File "/usr/lib/python2.4/site-packages/preupg/kickstart/application.py", line 127, in load_or_default
  File "/usr/lib/python2.4/site-packages/preupg_pykickstart/parser.py", line 784, in readKickstart
    self._stateMachine (lambda: fh.readline())
  File "/usr/lib/python2.4/site-packages/preupg_pykickstart/parser.py", line 658, in _stateMachine
    self.handleCommand(lineno, args)
  File "/usr/lib/python2.4/site-packages/preupg_pykickstart/parser.py", line 487, in handleCommand
    retval = self.handler.dispatcher(args, lineno)
  File "/usr/lib/python2.4/site-packages/preupg_pykickstart/base.py", line 396, in dispatcher
    obj = self.commands[cmd].parse(args[1:])
  File "/usr/lib/python2.4/site-packages/preupg_pykickstart/commands/partition.py", line 375, in parse
    raise KickstartParseError, formatErrorMsg(self.lineno, msg=errorMsg)
preupg_pykickstart.errors.KickstartParseError: The following problem occurred on line 38 of the kickstart file:

The part/partition and autopart commands can't be used at the same time

Comment 6 Alois Mahdal 2017-03-10 04:05:41 UTC
I cannot reproduce this.  With new version, only `autopart` is used with old version, only `part commands` are used---but never both.

This was originally found in 2.2.1-1.el5.  On el6 channel, the last version is 2.1.10-6.el6, so my guess is that the problematic code was never released.

Michal, can you please confirm if that is the case?  If so, I would propose dropping this from erratum and closing it (there is nothing to fix from RHEL6 customer POV).  Otherwise, please provide hint how to reproduce this on RHEL6.

(Same situation as with bug 1414344).

Comment 7 Alois Mahdal 2017-03-10 17:58:49 UTC
(In reply to Michal Bocek from bug 1414344 comment #5)
> Alois, to reproduce this in 2.1.10-6.el6, make sure you have "autopart" in
> /root/anaconda-ks.cfg - it serves as a basis for the generated kickstart.
> When generating kickstart the "part" commands were always added no matter
> whether there was "autopart" already or not.

OK, so this reproducer actually works.  Thanks!

With 2.1.10-6.el6, both `part` and `autopart` end up in the resultsing kickstart.
With 2.3.3-1.el6, only `autopart` ends up in the resultsing kickstart.

Comment 9 errata-xmlrpc 2017-03-21 12:10:28 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.


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