Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 924528

Summary: [RFE] Better to support "edit-node rhev-h-xxx.iso" for edit-node script
Product: Red Hat Enterprise Linux 6 Reporter: haiyang,dong <hadong>
Component: ovirt-nodeAssignee: Joey Boggs <jboggs>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: acathrow, bsarathy, cboyle, cshao, gouyang, hadong, jboggs, leiwang, lnovich, mburns, ovirt-maint, ramon.rnm, ycui
Target Milestone: rcKeywords: FutureFeature
Target Release: ---Flags: cboyle: needinfo+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-node-3.0.0-6.el6 Doc Type: Enhancement
Doc Text:
If 'edit-node' was used without an option it generated failed with a string of Trace-backs. Now if 'edit-node' is used without an option the following message is generated: "A manifest or editing option must be specified, use --help for more information"
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 19:28:24 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 haiyang,dong 2013-03-22 01:55:42 UTC
Description of problem:
edit-node raises a stack traces and fails to edit a node image.

# edit-node rhevh-6.4-20130318.1.el6_4.iso 
rhevh-6.4-20130318.1.el6_4.iso
done
Creating Manifests
Traceback (most recent call last):
  File "/usr/sbin/edit-node", line 1522, in <module>
    sys.exit(main())
  File "/usr/sbin/edit-node", line 1484, in main
    editor._create_manifests(options)
  File "/usr/sbin/edit-node", line 724, in _create_manifests
    cmd = "LC_ALL=C rpm -qa --qf '%%{name}-%%{version}-%%{release}.%%{arch} (%%{SIGPGPgpsig})\n' | sort -u > /manifest-%s-%s-rpm.txt" % (timestamp, pkg)
UnboundLocalError: local variable 'pkg' referenced before assignment


Version-Release number of selected component (if applicable):
ovirt-node-tools-2.5.0-17.el6_4.1.noarch.rpm

How reproducible:
100%

Steps to Reproduce:
1. edit a node image
# edit-node rhevh-6.4-20130318.1.el6_4.iso 
  
Actual results:
edit-node raises a stack traces and fails to edit a node image.

Expected results:
Better to support "edit-node rhev-h-xxx.iso" for edit-node script

Additional info:

Comment 1 Ramon Medeiros 2013-05-13 19:42:30 UTC
Just to confirm,

i've got the same error. To pass this error, i did:

    706     def _create_manifests(self, options):
    707+         pkg = ""
    708         timestamp = date("%Y-%m-%d_%H-%M-%S")
    709         if options.plugin:
    710             pkg = options.plugin
    711         elif options.install_dup:
    712             pkg = options.install_dup
    713         elif options.install:
    714             pkg = options.install
    715         elif options.ssh_keys:
    716             pkg = "ssh-key-edit"
    717         elif options.uidmod:
    718             pkg = "uid-mod"
    719         elif options.gidmod:
    720             pkg = "gid-mod"
    721         elif options.password:
    722             pkg = "password-set"
    723         print "Creating Manifests"
    724         # Create post-image processing manifests
    725         cmd = "LC_ALL=C rpm -qa --qf '%%{name}-%%{version}-%%{release}.%%{arch} (%%{SIGPGP:pgpsig})\n' | sort -u > /manifest-%s-%s-rpm.txt" % (        timestamp, pkg)

Comment 8 haiyang,dong 2013-08-02 06:09:11 UTC
Test version:
ovirt-node-tools-3.0.0-6.1.el6.noarch
rhev-hypervisor6-6.5-20130725.0.el6 

Test steps:
[root@dhcp-11-127 home]# edit-node rhevh-6.5-20130725.0.el6.iso
A manifest or editing option must be specified, use --help for more information

so this bug has been fixed as Joey Boggs mentioned in Comment 2, change the status into "VERIFIED"

Comment 9 haiyang,dong 2013-08-05 13:10:51 UTC
Hey Jboggs,

According to the comment of "https://bugzilla.redhat.com/show_bug.cgi?id=816659#c23",

The customer still want the edit-node tool could give a shell for editing build iso. So it's better to support "edit-node rhev-h-xxx.iso" for edit-node script

Comment 12 Cheryn Tan 2013-11-08 00:27:33 UTC
This bug is currently attached to errata RHBA-2013:15277. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.

Comment 14 errata-xmlrpc 2014-01-21 19:28:24 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.

http://rhn.redhat.com/errata/RHBA-2014-0033.html