Bug 1286996
| Summary: | When running from virt-builder --install it breaks with AttributeError | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | David Caro <dcaroest> |
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 23 | CC: | eedri, jsilhan, mbooth, mluscon, packaging-team-maint, pnemade, ptoscano, rjones, virt-maint, vmukhame |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-12-01 12:17:01 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: | |||
Actually, this is not true, this bug has been addressed on dnf, but the version that the fedora-23 image has installed is not the latest and still has this bug, the commit that solves this is:
commit b7c55d013542ce9e4c7775737bf454d9b10df977
Author: Adam Williamson <awilliam>
Date: Tue Nov 17 15:04:19 2015 -0800
cli: don't crash if y/n and sys.stdin is None (RhBug:1278382)
Per https://bugzilla.redhat.com/show_bug.cgi?id=1278382 , if
sys.stdin is somehow None (which currently seems to be the case
when a dnf command is run in virt-builder) and a dnf command
leads to a y/n question, dnf will crash. This should fix it.
Passing to libguestfs so they update the image
*** This bug has been marked as a duplicate of bug 1280029 *** |
Description of problem: When you run virt-builder to create a new image, and pass the option --install with some packages, dnf breaks with the error: Traceback (most recent call last): File "/bin/dnf", line 35, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 198, in user_main errcode = main(args) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 84, in main return _main(base, args) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 144, in _main ret = resolving(cli, base) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 173, in resolving base.do_transaction(display=displays) File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 220, in do_transaction self.gpgsigcheck(downloadpkgs) File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 251, in gpgsigcheck if not sys.stdin.isatty() and not ay: AttributeError: 'NoneType' object has no attribute 'isatty' Probably trying to see if it should ask for confirmation on the gpg signature or something. Version-Release number of selected component (if applicable): $ rpm -qa dnf dnf-1.1.4-2.fc23.noarch How reproducible: Just try to run virt-builder with the --install option, for example: $ virt-builder -o v1.qcow2 --cache $PWD --format qcow2 --arch x86_64 --install qemu-guest-agent --root-password password:12345 fedora-23 Steps to Reproduce: 1.Just try to run virt-builder with the --install option on fedora-23 os version 2. 3. Actual results: Fails to create the image with dnf error Expected results: Image created and packages installed Additional info: