-
Notifications
You must be signed in to change notification settings - Fork 306
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
CUSTCOM-12 Fixed node configuration in admin UI #4548
Conversation
Jenkins test please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed updating SSH Node connector when moving from password to keyfile and vice-versa
I'm not finding this to be true.
If I enter a password and then try to change it to key file and hit save, when I next go back to the node config it's still showing password.
I deleted my last comment, because when I was testing now, I forgot to press Save button :D |
But I was able to break it again with know exception with unknown cause ... I think it should be in separate issue and at this moment I don't understand what exactly causes it. (unresolved log message is targeted under CUSTCOM-55).
|
I cannot reproduce it any more after the rebase to current master |
Jenkins test please |
Jenkins test please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to build now, but I'm still finding that changing from using password to key file doesn't seem to take effect?
Moment I hit save it switches back to password. I'm unfortunately not in a position to test if that's just a visual thing or not atm.
From a clean domain:
- Open admin console
- New node:
- name = Noddy1
- host = localhost
- auth = Password
- password = passy
- Save
- Edit Noddy1
- auth = Key File
- Save
Aha, that's because you did not provide the key file. The problem is that empty value cannot be replaced by default, because it would go against asadmin command which does not change what is not set (reason why it originally did not work at all). |
Jenkins test please |
Admin GUI seems to work nicely now. It might be worth hiding the new Speaking of which, I see that it clears the key and password config when you switch between them. |
...us/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/UpdateNodeSshCommand.java
Outdated
Show resolved
Hide resolved
...cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/UpdateNodeRemoteCommand.java
Outdated
Show resolved
Hide resolved
...cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/UpdateNodeRemoteCommand.java
Outdated
Show resolved
Hide resolved
I experimented with it, and I even found one use case where it was useful - again - to reconfigure authentication to use defaults keyfile. Otherwise you cannot send null via command line, it is an empty string and it will be saved to domain.xml (and the behavior is same then). Same with password, you can set password, but you have to provide passwordfile. If not, it will use user's private key as a default. Seems it would be possible to use even passphrase again, but that goes behind borders of this issue.
By default those values are clean => it uses system defaults (or trilead defaults? I'm not sure, but it tried to use my private key and in domain.xml was nothing). Example (created node in description of this PR, I updated only the hostname):
And "ping" result:
|
Jenkins test please |
Param.acceptableValues should help with the former if you didn't know about it. |
- removed "random" settings of psSelected/winPsSelected - removed configuration of psSelect from convertNodePswd - created presetNodeAuthSelectBox - enabled autocomplete, without it was configuration hostile except password, which were still remembered by Firefox - fixed nodeButtons.inc - password/keystore gui - fixed UpdateNodeCommand - password/keystore gui, old version used previous version - reimplemented validation - renamed PARAM_REMOTEPASSWORD to PARAM_SSHPASSWORD - ParameterMap - implemented additional methods for better readibility
- report classes have toString now (useful for debugging and logging) - GuiUtil - reduced copy and paste and using sane filtering - RestUtil2 + RestApiHandlers - fixed processing error messages using new method in GuiUtil - expecting JSON, but it will not fail if the response would be unparseable, it would only print error to log.
- created enum SshAuthType (KEY/PASSWORD) to distinguish which variant should be saved if we don't set neither password nor keyfile - new parameter sshauthtype to allow switching with defaults
Jenkins test please |
- seems that when we are updating sshauth element, setSshConnector must be already called
Jenkins test please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌🥳
Description
This is a bug fix for incorrect GUI behavior when configuring Nodes, especially SSH.
fixed logging of errors (did not log anything in some types of failures)
fixed distribution of error messages to the user (I still don't like it's formatting, but that's not a thing of this issue)
fixed updating SSH Node connector when moving from password to keyfile and vice-versa
validation before the update ends with verification that the keyfile exists. It does not test it's content. Originally it merged defaults, existing configuration and new configuration, so finally it ended with several kinds of exceptions (some of them were swallowed, so GUI showed only "See server.log", but there was nothing).
Important Info
Testing
New tests
Testing Performed
Manual
Test suites executed