Red Hat Bugzilla – Bug 924528
[RFE] Better to support "edit-node rhev-h-xxx.iso" for edit-node script
Last modified: 2014-01-21 14:28:24 EST
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:
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)
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"
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
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.
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