Skip to content

set save=true when consoleHost changes during VM sync#173

Open
ckeskar23 wants to merge 3 commits into
mainfrom
origin/MORPH-12539-port-from-ui-#4352
Open

set save=true when consoleHost changes during VM sync#173
ckeskar23 wants to merge 3 commits into
mainfrom
origin/MORPH-12539-port-from-ui-#4352

Conversation

@ckeskar23

@ckeskar23 ckeskar23 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

After cloud sync, consoleHost appeared to be set in memory but was silently discarded. Subsequent console connections used a stale or missing host name because the updated value was never written to the database.

In VirtualMachineSync.updateMatchedVirtualMachines, the consoleHost field was assigned when it differed from the current value, but save was not set to true. Because the server is only persisted when save == true, the change was lost on every sync cycle.

morpheus-ui PR: #4352

Source Jira: MORPH-11002

UI commit: 0c7a1a6

@ckeskar23 ckeskar23 marked this pull request as ready for review June 9, 2026 16:43
@ckeskar23 ckeskar23 self-assigned this Jun 10, 2026
@ckeskar23 ckeskar23 requested review from NimbleMike and panigrap June 10, 2026 16:47

@NimbleMike NimbleMike left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@panigrap

Copy link
Copy Markdown
Contributor

how about the other diff in the morpheus-ui PR ?
def rawUsername = server.zone.credentialData?.username ?: server.zone.getConfigProperty('username')
server.consoleUsername = rawUsername?.contains('\') ? rawUsername.tokenize('\')[1] : rawUsername

Plugin has this

def consoleUsername = cloud.accountCredentialData?.username ?: cloud.getConfigProperty('username') ?: 'dunno'
if (consoleUsername.contains('\')) {
consoleUsername = consoleUsername.tokenize('\')[1]
}

we are not defaulting to consoleUsername after tokenize.

@ckeskar23 ckeskar23 closed this Jun 12, 2026
@ckeskar23 ckeskar23 reopened this Jun 12, 2026
@ckeskar23 ckeskar23 force-pushed the origin/MORPH-12539-port-from-ui-#4352 branch from 681c8b3 to de2b9f7 Compare June 12, 2026 16:18
@panigrap

Copy link
Copy Markdown
Contributor

how about the other diff in the morpheus-ui PR ? def rawUsername = server.zone.credentialData?.username ?: server.zone.getConfigProperty('username') server.consoleUsername = rawUsername?.contains('') ? rawUsername.tokenize('')[1] : rawUsername

Plugin has this

def consoleUsername = cloud.accountCredentialData?.username ?: cloud.getConfigProperty('username') ?: 'dunno' if (consoleUsername.contains('')) { consoleUsername = consoleUsername.tokenize('')[1] }

we are not defaulting to consoleUsername after tokenize.

@ckeskar23 Did you get a chance to have a look into this comment ?

@ckeskar23

Copy link
Copy Markdown
Contributor Author

how about the other diff in the morpheus-ui PR ? def rawUsername = server.zone.credentialData?.username ?: server.zone.getConfigProperty('username') server.consoleUsername = rawUsername?.contains('') ? rawUsername.tokenize('')[1] : rawUsername
Plugin has this
def consoleUsername = cloud.accountCredentialData?.username ?: cloud.getConfigProperty('username') ?: 'dunno' if (consoleUsername.contains('')) { consoleUsername = consoleUsername.tokenize('')[1] }
we are not defaulting to consoleUsername after tokenize.

@ckeskar23 Did you get a chance to have a look into this comment ?

Yes, I tried to addressed this in last commit, please let me know if there is any feedback on that, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants