Bug 1904674
Summary: | remove flag of virsh set-user-sshkeys can not work | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Lili Zhu <lizhu> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
Status: | CLOSED ERRATA | QA Contact: | Lili Zhu <lizhu> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 8.4 | CC: | chhu, demeng, jdenemar, lmen, virt-maint, xuzhang |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | 8.4 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-7.0.0-1.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-05-25 06:45:17 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: | 7.0.0 |
Embargoed: |
Description
Lili Zhu
2020-12-05 14:07:59 UTC
Oops, yes. Patch proposed upstream: https://www.redhat.com/archives/libvir-list/2020-December/msg00486.html Merged upstream as: b9dcaede65 virsh: cmdSetUserSSHKeys: Error early if the file doesn't contain any keys 22e785b8ef virsh: Fix logical error in cmdSetUserSSHKeys() v6.10.0-127-gb9dcaede65 Test this bug with: libvirt-6.10.0-1.fc34.x86_64 qemu-guest-agent-5.2.0-2.module+el8.4.0+9186+ec44380f.x86_64 1. prepare a guest with qemu-guest-agent service started # virsh domtime pc Time: 1609494344 2. check the exsiting authorized ssh keys in guest # virsh get-user-sshkeys pc lizhu ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPaNWKd3/Z6QNIGIgNOCh5yCxbvm1pog5IDGyzNPKz0h root@lizhu-fedorassh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCyZlk72jJqCMorQRlkqk54dPZlhqH1ziCIC5D6U6dnYD70F+syWzCiZnJetYBPrT65QR1kOoMxwd3mM1EtJhZhWD287j4MFPGho5huWlMOQXwOkLq0ZKcOh8sAW4Jlbp22zrKmQmdERFTC53N5AMxfep2DyrTCtRFX0fgSczfX5A3HCe4e0ooulVrF1pe9OwBHAUjlcVlC4ggzNTIP9J9v112ecZnaDxvGf1ZNFBWPfeh10Nf5H7fCGAwxP9iCWq1lHliGEzRnN8QDLJo3082uPEL/9sxWsj8qEK3tYnwYUNXhtmqyHUODip6IPE8PHm32h6gX/nt1115ndnZD4AQnxkncEYZ9CAZdtGdpz1TAAxsfD91tYLTGI/v3o+56lDVIYN6P2840aTy2eW4olg18fSKV08/gUZgRAwd0nAwD+3uaxGK1M2DZRVMNNK+mws5kowqUec4kbweYQIAUedF8fFkkr51/r3HnK65oT0XADLJ4ZQhm4fF+UMkYedGSc0c= tester@lizhu-fedora 3. remove 1 ssh key # virsh set-user-sshkeys pc lizhu --remove /root/.ssh/id_ed25519.pub # virsh get-user-sshkeys pc lizhu ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCyZlk72jJqCMorQRlkqk54dPZlhqH1ziCIC5D6U6dnYD70F+syWzCiZnJetYBPrT65QR1kOoMxwd3mM1EtJhZhWD287j4MFPGho5huWlMOQXwOkLq0ZKcOh8sAW4Jlbp22zrKmQmdERFTC53N5AMxfep2DyrTCtRFX0fgSczfX5A3HCe4e0ooulVrF1pe9OwBHAUjlcVlC4ggzNTIP9J9v112ecZnaDxvGf1ZNFBWPfeh10Nf5H7fCGAwxP9iCWq1lHliGEzRnN8QDLJo3082uPEL/9sxWsj8qEK3tYnwYUNXhtmqyHUODip6IPE8PHm32h6gX/nt1115ndnZD4AQnxkncEYZ9CAZdtGdpz1TAAxsfD91tYLTGI/v3o+56lDVIYN6P2840aTy2eW4olg18fSKV08/gUZgRAwd0nAwD+3uaxGK1M2DZRVMNNK+mws5kowqUec4kbweYQIAUedF8fFkkr51/r3HnK65oT0XADLJ4ZQhm4fF+UMkYedGSc0c= tester@lizhu-fedora removing ssh key successfully. 4. try to remove it again # virsh set-user-sshkeys pc lizhu --remove /root/.ssh/id_ed25519.pub # virsh get-user-sshkeys pc lizhu ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCyZlk72jJqCMorQRlkqk54dPZlhqH1ziCIC5D6U6dnYD70F+syWzCiZnJetYBPrT65QR1kOoMxwd3mM1EtJhZhWD287j4MFPGho5huWlMOQXwOkLq0ZKcOh8sAW4Jlbp22zrKmQmdERFTC53N5AMxfep2DyrTCtRFX0fgSczfX5A3HCe4e0ooulVrF1pe9OwBHAUjlcVlC4ggzNTIP9J9v112ecZnaDxvGf1ZNFBWPfeh10Nf5H7fCGAwxP9iCWq1lHliGEzRnN8QDLJo3082uPEL/9sxWsj8qEK3tYnwYUNXhtmqyHUODip6IPE8PHm32h6gX/nt1115ndnZD4AQnxkncEYZ9CAZdtGdpz1TAAxsfD91tYLTGI/v3o+56lDVIYN6P2840aTy2eW4olg18fSKV08/gUZgRAwd0nAwD+3uaxGK1M2DZRVMNNK+mws5kowqUec4kbweYQIAUedF8fFkkr51/r3HnK65oT0XADLJ4ZQhm4fF+UMkYedGSc0c= tester@lizhu-fedora no change. 5. try to use --remove flag with no files # virsh set-user-sshkeys pc lizhu --remove error: Option --file is required by option --remove Verify this bug with: libvirt-daemon-7.0.0-1.module+el8.4.0+9464+3e71831a.x86_64 qemu-guest-agent-5.2.0-3.module+el8.4.0+9499+42e58f08.x86_64 The testing results are the same with that in Comment #3, mark the bug as verified. 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 (virt:av 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-2021:2098 |