Bug 2090391
| Summary: | lvm shell broken for lvmdbusd when using ./configure --enable-editline --disable-readline ... | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Tony Asleson <tasleson> |
| Component: | lvm2 | Assignee: | Tony Asleson <tasleson> |
| lvm2 sub component: | Command-line tools | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | agk, cmarthal, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, thornber, zkabelac |
| Version: | 9.1 | Keywords: | Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.03.16-3.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-15 11:20:43 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
Tony Asleson
2022-05-25 16:20:59 UTC
This might be the cause: https://github.com/troglobit/editline/blob/9fa05ba3841f3a7776b0b3645a3a92f32259d988/src/editline.c#L1571 If the FD doesn't refer to a tty, the prompt appears to be discarded? If that is the case it explains why it works when you use it interactively, but fails when we use it with lvmdbusd, as the FD wouldn't be considered a tty. lvmdbusd should be running with --yes option set in some way. Otherwise with closed 'stdin' means automatically 'no' answer to any prompt. Although it would be 'weird' if 'libreadline' would 'magically' self opening stdin. Also as a daemon process lvmdbusd should be reopening it's own descriptors and detaching from passed ones (and keep standard stdin/out/err only upon option). I have a local change which allows lvmdbusd to work with the lvm shell regardless if we get the "lvm> " prompt or not. Once the change is fully tested I will put out for review and merge. Fixed upstream: https://sourceware.org/git/?p=lvm2.git;a=commit;h=691494268502ddb20da2a14568984c0fa4f29f50 Root cause for hang in test_pv_scan has been identified, a separate bz has been written. Excluding the test_pv_scan unit test we run successfully on QA system, issue can be considered verified. # LVM_DBUSD_TEST_MODE=1 ./lvmdbustest.py -v *** Testing only lvm shell mode *** Testing TMO=0 Successfully changed execution mode to "lvm shell (non-fork)" test_cache_lv_create (__main__.TestDbusService) ... ok test_cache_lv_rename (__main__.TestDbusService) Make sure that if we rename a cache lv that we correctly handle the ... ok test_cache_pool_create (__main__.TestDbusService) ... ok test_external_lv_create (__main__.TestDbusService) ... ok test_external_pv_create (__main__.TestDbusService) ... ok test_external_vg_create (__main__.TestDbusService) ... ok test_invalid_names (__main__.TestDbusService) ... ok test_invalid_tags (__main__.TestDbusService) ... ok test_job_handling (__main__.TestDbusService) ... ok test_job_handling_timer (__main__.TestDbusService) ... ok test_lookup_by_lvm_id (__main__.TestDbusService) ... ok test_lv_activate_deactivate (__main__.TestDbusService) ... ok test_lv_create (__main__.TestDbusService) ... ok test_lv_create_job (__main__.TestDbusService) ... ok test_lv_create_linear (__main__.TestDbusService) ... ok test_lv_create_mirror (__main__.TestDbusService) ... ok test_lv_create_pv_specific (__main__.TestDbusService) ... ok test_lv_create_raid (__main__.TestDbusService) ... ok test_lv_create_rounding (__main__.TestDbusService) ... ok test_lv_create_striped (__main__.TestDbusService) ... ok test_lv_create_thin_pool (__main__.TestDbusService) ... ok test_lv_interface_cache_lv (__main__.TestDbusService) ... ok test_lv_interface_plain_lv (__main__.TestDbusService) ... ok test_lv_interface_thin_pool_lv (__main__.TestDbusService) ... ok test_lv_interface_vdo_lv (__main__.TestDbusService) ... ok test_lv_interface_vdo_pool_lv (__main__.TestDbusService) ... ok test_lv_move (__main__.TestDbusService) ... ok test_lv_on_thin_pool_rename (__main__.TestDbusService) ... ok test_lv_remove (__main__.TestDbusService) ... ok test_lv_rename (__main__.TestDbusService) ... ok test_lv_resize (__main__.TestDbusService) ... ok test_lv_resize_same (__main__.TestDbusService) ... ok test_lv_snapshot (__main__.TestDbusService) ... ok test_lv_tags (__main__.TestDbusService) ... ok test_lv_thinpool_rename (__main__.TestDbusService) ... ok test_meta_lv_data_lv_props (__main__.TestDbusService) ... ok test_move (__main__.TestDbusService) ... ok test_nesting (__main__.TestDbusService) ... ok test_prop_get (__main__.TestDbusService) ... ok test_pv_allocation (__main__.TestDbusService) ... ok test_pv_remove_add (__main__.TestDbusService) ... ok test_pv_resize (__main__.TestDbusService) ... ok test_pv_scan (__main__.TestDbusService) ... skipped 'skipping pv scan test due to known issue' test_pv_symlinks (__main__.TestDbusService) ... ok test_pv_tags (__main__.TestDbusService) ... ok test_refresh (__main__.TestDbusService) ... ok test_snapshot_merge (__main__.TestDbusService) ... ok test_snapshot_merge_thin (__main__.TestDbusService) ... ok test_tag_names (__main__.TestDbusService) ... ok test_tag_regression (__main__.TestDbusService) ... ok test_vdo_pool_compression_deduplication (__main__.TestDbusService) ... ok test_vdo_pool_convert (__main__.TestDbusService) ... ok test_vdo_pool_create (__main__.TestDbusService) ... ok test_version (__main__.TestDbusService) ... ok test_vg_activate_deactivate (__main__.TestDbusService) ... ok test_vg_allocation_policy_set (__main__.TestDbusService) ... ok test_vg_change (__main__.TestDbusService) ... ok test_vg_create (__main__.TestDbusService) ... ok test_vg_delete (__main__.TestDbusService) ... ok test_vg_extend (__main__.TestDbusService) ... ok test_vg_max_lv (__main__.TestDbusService) ... ok test_vg_max_pv (__main__.TestDbusService) ... ok test_vg_reduce (__main__.TestDbusService) ... ok test_vg_rename (__main__.TestDbusService) ... ok test_vg_rename_with_thin_pool (__main__.TestDbusService) ... ok test_vg_tags (__main__.TestDbusService) ... ok test_vg_uuid_gen (__main__.TestDbusService) ... ok test_writecache_lv (__main__.TestDbusService) ... ok ---------------------------------------------------------------------- Ran 68 tests in 185.404s OK (skipped=1) Testing TMO=15 Successfully changed execution mode to "lvm shell (non-fork)" test_cache_lv_create (__main__.TestDbusService) ... ok test_cache_lv_rename (__main__.TestDbusService) Make sure that if we rename a cache lv that we correctly handle the ... ok test_cache_pool_create (__main__.TestDbusService) ... ok test_external_lv_create (__main__.TestDbusService) ... ok test_external_pv_create (__main__.TestDbusService) ... ok test_external_vg_create (__main__.TestDbusService) ... ok test_invalid_names (__main__.TestDbusService) ... ok test_invalid_tags (__main__.TestDbusService) ... ok test_job_handling (__main__.TestDbusService) ... ok test_job_handling_timer (__main__.TestDbusService) ... ok test_lookup_by_lvm_id (__main__.TestDbusService) ... ok test_lv_activate_deactivate (__main__.TestDbusService) ... ok test_lv_create (__main__.TestDbusService) ... ok test_lv_create_job (__main__.TestDbusService) ... ok test_lv_create_linear (__main__.TestDbusService) ... ok test_lv_create_mirror (__main__.TestDbusService) ... ok test_lv_create_pv_specific (__main__.TestDbusService) ... ok test_lv_create_raid (__main__.TestDbusService) ... ok test_lv_create_rounding (__main__.TestDbusService) ... ok test_lv_create_striped (__main__.TestDbusService) ... ok test_lv_create_thin_pool (__main__.TestDbusService) ... ok test_lv_interface_cache_lv (__main__.TestDbusService) ... ok test_lv_interface_plain_lv (__main__.TestDbusService) ... ok test_lv_interface_thin_pool_lv (__main__.TestDbusService) ... ok test_lv_interface_vdo_lv (__main__.TestDbusService) ... ok test_lv_interface_vdo_pool_lv (__main__.TestDbusService) ... ok test_lv_move (__main__.TestDbusService) ... ok test_lv_on_thin_pool_rename (__main__.TestDbusService) ... ok test_lv_remove (__main__.TestDbusService) ... ok test_lv_rename (__main__.TestDbusService) ... ok test_lv_resize (__main__.TestDbusService) ... ok test_lv_resize_same (__main__.TestDbusService) ... ok test_lv_snapshot (__main__.TestDbusService) ... ok test_lv_tags (__main__.TestDbusService) ... ok test_lv_thinpool_rename (__main__.TestDbusService) ... ok test_meta_lv_data_lv_props (__main__.TestDbusService) ... ok test_move (__main__.TestDbusService) ... ok test_nesting (__main__.TestDbusService) ... ok test_prop_get (__main__.TestDbusService) ... ok test_pv_allocation (__main__.TestDbusService) ... ok test_pv_remove_add (__main__.TestDbusService) ... ok test_pv_resize (__main__.TestDbusService) ... ok test_pv_scan (__main__.TestDbusService) ... skipped 'skipping pv scan test due to known issue' test_pv_symlinks (__main__.TestDbusService) ... ok test_pv_tags (__main__.TestDbusService) ... ok test_refresh (__main__.TestDbusService) ... ok test_snapshot_merge (__main__.TestDbusService) ... ok test_snapshot_merge_thin (__main__.TestDbusService) ... ok test_tag_names (__main__.TestDbusService) ... ok test_tag_regression (__main__.TestDbusService) ... ok test_vdo_pool_compression_deduplication (__main__.TestDbusService) ... ok test_vdo_pool_convert (__main__.TestDbusService) ... ok test_vdo_pool_create (__main__.TestDbusService) ... ok test_version (__main__.TestDbusService) ... ok test_vg_activate_deactivate (__main__.TestDbusService) ... ok test_vg_allocation_policy_set (__main__.TestDbusService) ... ok test_vg_change (__main__.TestDbusService) ... ok test_vg_create (__main__.TestDbusService) ... ok test_vg_delete (__main__.TestDbusService) ... ok test_vg_extend (__main__.TestDbusService) ... ok test_vg_max_lv (__main__.TestDbusService) ... ok test_vg_max_pv (__main__.TestDbusService) ... ok test_vg_reduce (__main__.TestDbusService) ... ok test_vg_rename (__main__.TestDbusService) ... ok test_vg_rename_with_thin_pool (__main__.TestDbusService) ... ok test_vg_tags (__main__.TestDbusService) ... ok test_vg_uuid_gen (__main__.TestDbusService) ... ok test_writecache_lv (__main__.TestDbusService) ... ok ---------------------------------------------------------------------- Ran 68 tests in 186.173s OK (skipped=1) Marking this Verified:Tested based on the comment #7. kernel-5.14.0-138.el9 BUILT: Sun Jul 31 06:20:38 AM CDT 2022 lvm2-2.03.16-3.el9 BUILT: Mon Aug 1 04:42:35 AM CDT 2022 lvm2-libs-2.03.16-3.el9 BUILT: Mon Aug 1 04:42:35 AM CDT 2022 lvm2-dbusd-2.03.16-3.el9 BUILT: Mon Aug 1 04:41:51 AM CDT 2022 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 (lvm2 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:8358 |