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 996039 - guestfish does not work due to conflict of remote and interactive mode
Summary: guestfish does not work due to conflict of remote and interactive mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 998513
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-12 09:39 UTC by bfan
Modified: 2013-12-26 00:13 UTC (History)
3 users (show)

Fixed In Version: libguestfs-1.20.10-3.el6
Doc Type: Bug Fix
Doc Text:
Cause: Using guestfish --remote & --add options together. Consequence: This gives unexpected results. Fix: No fix, we have just documented that you're not supposed to use these options together in the guestfish manual.
Clone Of:
: 998513 998750 (view as bug list)
Environment:
Last Closed: 2013-11-21 04:46:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1536 0 normal SHIPPED_LIVE Moderate: libguestfs security, bug fix, and enhancement update 2013-11-21 00:40:55 UTC

Description bfan 2013-08-12 09:39:18 UTC
Description of problem:
guestfish dose not work due to conflict of remote and ineractive mode.

Code of fish/fish.c

  /* Interactive, shell script, or command(s) on the command line? */
  if (optind >= argc) {
    if (is_interactive)
      interactive ();
    else
      shell_script ();
  }
  else
    cmdline (argv, optind, argc);

If gives this command "guestfish --remote --add test.img", guestfish looks like executing in interactive mode, but actually it try to connect the remote server.


Version-Release number of selected component (if applicable):
libguestfs-1.20.10-2.el6.x86_64


How reproducible:
100%


Steps to Reproduce:
1. create a disk
[root@intel-8400-8-2 home]# dd if=/dev/zero of=test.img bs=1M count=50
50+0 records in
50+0 records out
52428800 bytes (52 MB) copied, 0.0447178 s, 1.2 GB/s

2. guestfish remote control
[root@intel-8400-8-2 home]# eval "`guestfish --listen`"
[root@intel-8400-8-2 home]# guestfish --remote --add test.img

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> quit
><fs> quit
guestfish: remote: looks like the server is not running
><fs> quit
guestfish: remote: looks like the server is not running
><fs>

We have to use "ctrl + d" to quit


Actual results:
guestfish does not work because of conflict


Expected results:
guestfish can work well with one method (remote or interactive)


Additional info:
Following is correct
1.
[root@intel-8400-8-2 home]# eval "`guestfish --listen`"
[root@intel-8400-8-2 home]# guestfish --remote -- add test.img

2.[root@intel-8400-8-2 home]# eval "`guestfish --listen`"
[root@intel-8400-8-2 home]# guestfish --remote add test.img

same issue in rhel7, libguestfs-1.22.5-3.el7.x86_64

Comment 1 Richard W.M. Jones 2013-08-19 13:19:41 UTC
Fixed (by documenting the problem) upstream:
https://github.com/libguestfs/libguestfs/commit/7e396954611d827dc236a114ed22a781687c002d

Comment 3 Lingfei Kong 2013-10-17 08:06:10 UTC
Reproduce:
1. Create a raw image:
[host]#dd if=/dev/zero of=test.img bs=1M count=50
2. guestfish remote control
[host]#eval "`guestfish --listen`"
[host]#guestfish --remote --add test.img
Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> quit
><fs> quit
guestfish: remote: looks like the server is not running
><fs> quit
guestfish: remote: looks like the server is not running

3. Check man page:
In man page for libguestfs-1.20.10-2.el6.x86_64 I can not find some thing that prompt you do not use
--remote & --add options together.



Verified:
libguestfs version: libguestfs-1.20.10-3.el6

1. Install libguestfs-1.20.10-3.el6 on RHEL6.5 host
2. [guest]#man guestfish,  I can find the following content in man page:

 REMOTE CONTROL DOES NOT WORK WITH -a ETC. OPTIONS
       Options such as -a, --add, -N, --new etc don’t interact properly with remote
       support.  They are processed locally, and not sent through to the remote
       guestfish.  In particular this won’t do what you expect:

        guestfish --remote --add disk.img

       Don’t use these options.  Use the equivalent commands instead, eg:

        guestfish --remote add-drive disk.img

       or:

        guestfish --remote
        ><fs> add disk.img

Comment 5 errata-xmlrpc 2013-11-21 04:46:25 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/RHSA-2013-1536.html


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