Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH Save button stuck after update #6075

Closed
DavidePrincipi opened this issue Mar 2, 2020 · 9 comments
Closed

SSH Save button stuck after update #6075

DavidePrincipi opened this issue Mar 2, 2020 · 9 comments
Labels
bug A defect of the software verified All test cases were verified successfully

Comments

@DavidePrincipi
Copy link
Member

After an update the Save button of Cockpit System > SSH page does not work any more.

Steps to reproduce

  1. install and configure a local LDAP accounts provider (I guess this is not a strict requirement but doesn’t harm)
  2. go to Software Center and update nethserver-cockpit (1.4.4 => 1.4.5) and nethserver-openssh (1.4.0 => 1.4.1)
  3. go immediately to the SSH Cockpit UI and press Save
  4. log out
  5. log in again and go back to SSH Cockpit UI. Save button does not work any more.

Expected behavior

The Save button applies the UI state and runs the *-save event.

Actual behavior

A spinner appears for a while, then nothing else happens. In the browser console:

API exec: system-openssh/validate
$  echo '{"name":"sshd","props":{"PasswordAuthentication":"yes","PermitRootLogin":"yes","TCPPort":"22","AllowGroups":{},"AllowEveryone":""},"type":"service"}' | /usr/bin/sudo /usr/libexec/nethserver/api/system-openssh/validate | jq

In the config DB, after step 3:

[root@vm5 ~]# config show sshd
sshd=service
    AllowEveryone=
    AllowGroups=
    LoginGraceTime=2m
    MaxAuthTries=6
    PasswordAuthentication=yes
    PermitRootLogin=yes
    Protocol=2
    SubsystemSftp=yes
    TCPPort=22
    UsePAM=yes
    access=green,red
    status=enabled

In /var/log/messages:

Mar  2 09:37:45 vm5 /usr/libexec/nethserver/api/system-openssh/update[19875]: /var/lib/nethserver/db/configuration: OLD sshd=service|AllowEveryone|none|AllowGroups||LoginGraceTime|2m|MaxAuthTries|6|PasswordAuthentication|yes|PermitRootLogin|yes|Protocol|2|SubsystemSftp|yes|TCPPort|22|UsePAM|yes|access|green,red|status|enabled
Mar  2 09:37:45 vm5 /usr/libexec/nethserver/api/system-openssh/update[19875]: /var/lib/nethserver/db/configuration: NEW sshd=service|AllowEveryone||AllowGroups||LoginGraceTime|2m|MaxAuthTries|6|PasswordAuthentication|yes|PermitRootLogin|yes|Protocol|2|SubsystemSftp|yes|TCPPort|22|UsePAM|yes|access|green,red|status|enabled

Components

  • nethserver-openssh-1.4.1-1.ns7.noarch
  • nethserver-cockpit-1.4.5-1.ns7.noarch

See also

The bug was initially discovered and analyzed here

https://community.nethserver.org/t/ssh-unable-to-save-changes-from-cockpit-ui/14808


Thanks to @dnutan and @stephdl for their help!

@DavidePrincipi DavidePrincipi added the bug A defect of the software label Mar 2, 2020
@DavidePrincipi DavidePrincipi self-assigned this Mar 2, 2020
@DavidePrincipi DavidePrincipi added this to ✋ Needs review in NethServer 7 via automation Mar 2, 2020
@DavidePrincipi DavidePrincipi moved this from ✋ Needs review to ⚙ Developing in NethServer 7 Mar 2, 2020
DavidePrincipi added a commit to NethServer/nethserver-cockpit that referenced this issue Mar 2, 2020
@DavidePrincipi DavidePrincipi removed their assignment Mar 2, 2020
@DavidePrincipi DavidePrincipi added the testing Packages are available from testing repositories label Mar 2, 2020
@DavidePrincipi
Copy link
Member Author

Workaround

Please see the solution in the community forum post linked above.

@nethbot
Copy link
Member

nethbot commented Mar 2, 2020

in 7.7.1908/testing:

@stephdl
Copy link

stephdl commented Mar 2, 2020

TESTING (Failed ?)

I think I cannot reproduce, at least no error in console and the UI sends the good API, however you protected the props, but I think you missed AllowGroups.

Please check https://community.nethserver.org/t/ssh-unable-to-save-changes-from-cockpit-ui/14808/3 at the beginning the errors came for it, see L42

@DavidePrincipi
Copy link
Member Author

Please see my review comment.

Reproducing the issue is not easy. Did you follow the steps starting from a clean system?

@stephdl
Copy link

stephdl commented Mar 2, 2020

I did a full update on friday, all my VM are already updated to the last nethserver-cockpit & nethserver-openssh

stephdl added a commit to NethServer/nethserver-cockpit that referenced this issue Mar 2, 2020
@nethbot
Copy link
Member

nethbot commented Mar 2, 2020

in 7.7.1908/testing:

@nethbot
Copy link
Member

nethbot commented Mar 2, 2020

in 7.7.1908/testing:

@stephdl
Copy link

stephdl commented Mar 2, 2020

verified

if the UI doesn't send what the API expects, the props are not saved

@stephdl stephdl added verified All test cases were verified successfully and removed testing Packages are available from testing repositories labels Mar 2, 2020
@nethbot
Copy link
Member

nethbot commented Mar 2, 2020

in 7.7.1908/updates:

NethServer 7 automation moved this from ⚙ Developing to 🗑 Done Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect of the software verified All test cases were verified successfully
Projects
No open projects
NethServer 7
🗑 Done
Development

No branches or pull requests

3 participants