Bug 2246923
Summary: | 3.6.0 regression: `stratis key set --capture-key` fails with termios.error: (25, 'Inappropriate ioctl for device') | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Martin Pitt <mpitt> |
Component: | stratis-cli | Assignee: | mulhern <amulhern> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 39 | CC: | amulhern, bgurney, jbaublitz, mvollmer |
Target Milestone: | --- | Keywords: | Regression |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
URL: | https://cockpit-logs.us-east-1.linodeobjects.com/pull-19541-20231028-061240-f17dc026-fedora-39-updates-testing/log.html#234-2 | ||
Whiteboard: | CockpitTest | ||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2024-11-13 12:49:54 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Martin Pitt
2023-10-30 07:01:08 UTC
--keyfile-path /dev/stdin might work. I believe that the only difference between the two versions is that for --capture-key option, the user must enter the password twice in 3.6.0. Please let us know if that is the source of the problem. For your tests, I think switching to, e.g., --keyfile-path option, as suggested, would be the best approach. Indeed sending the password twice works: systemd-run --unit key --wait sh -exc 'echo -e "s3kr1t\ns3kr1t" | stratis key set --capture-key pool1; echo done' So maybe the documentation of --capture-key is misleading then: Either it is not really meant for this noninteractive case, and then it should be documented differently, or it is broken and should be fixed to not touch the tty at all, and just read the password from stdin. Indeed --keyfile-path works better: echo s3kr1t | stratis key set --keyfile-path /dev/stdin pool2 That doesn't need any jumping through hoops to hide the tty. I'll change our tests to use that. However, I keep this open to clarify/fix the --capture-key option. Thank you! > Indeed --keyfile-path works better: Ah no, it doesn't. While the *command* works, it seems to associate the given file path to the key, instead of reading the file and storing the contents as the key. So with /dev/stdin that is broken, see e.g. https://cockpit-logs.us-east-1.linodeobjects.com/pull-19549-20231031-071549-fd5d9d9a-fedora-38-storage/TestStorageStratisNBDE-testBasic-fedora-38-127.0.0.2-2301-FAIL.png . So indeed there is a raison d'être for both --keyfile-path and --capture-key. I'll go back to the latter and just send the passphrase twice. Correction: This does work, it's just picky about *not* having a newline at the end. Adding `-n` fixes it: echo -n s3kr1t | stratis key set --keyfile-path /dev/stdin pool2 This message is a reminder that Fedora Linux 39 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '39'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 39 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. As nobody else complained, let's put this to rest -- we've used --keyfile-path since then. |