Skip to content

UI: fix userdataid or userdata content is passed when userdata append or override is unchecked#7758

Merged
weizhouapache merged 2 commits intoapache:4.18from
weizhouapache:4.18-fix-deployvm-userdataid
Jul 25, 2023
Merged

UI: fix userdataid or userdata content is passed when userdata append or override is unchecked#7758
weizhouapache merged 2 commits intoapache:4.18from
weizhouapache:4.18-fix-deployvm-userdataid

Conversation

@weizhouapache
Copy link
Copy Markdown
Member

@weizhouapache weizhouapache commented Jul 20, 2023

Description

This PR fixes an issue in the deploy vm instance wizard.

(1) register template with userdata and userdatapolicy=APPEND
(2) deploy vm, check the "Userdata append", choose another userdata or input userdata manually
image
(3) uncheck "Userdata append"
(4) create a vm

expected: the additional userdata id or content are NOT passed (as "Userdata append" is unchecked)
actual: the additional userdata id or content are passed
image

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

@harikrishna-patnala
Copy link
Copy Markdown
Member

@blueorangutan ui

@blueorangutan
Copy link
Copy Markdown

@harikrishna-patnala a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/7758 (QA-JID-126)

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 20, 2023

Codecov Report

Merging #7758 (dc6bde6) into 4.18 (f057f4b) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               4.18    #7758   +/-   ##
=========================================
  Coverage     13.02%   13.02%           
  Complexity     9028     9028           
=========================================
  Files          2720     2720           
  Lines        256992   256992           
  Branches      40078    40078           
=========================================
  Hits          33463    33463           
  Misses       219330   219330           
  Partials       4199     4199           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

deployVmData.iothreadsenabled = values.iothreadsenabled
deployVmData.iodriverpolicy = values.iodriverpolicy
if (values.userdata && values.userdata.length > 0) {
const isUserdataAllowed = !this.userdataDefaultOverridePolicy || (this.userdataDefaultOverridePolicy === 'ALLOWOVERRIDE' && this.doUserdataOverride) || (this.userdataDefaultOverridePolicy === 'APPEND' && this.doUserdataAppend)
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.

this could be a boolean method

@github-actions
Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

Copy link
Copy Markdown
Member

@yadvr yadvr left a comment

Choose a reason for hiding this comment

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

LGTM didn't test it though

@weizhouapache
Copy link
Copy Markdown
Member Author

weizhouapache commented Jul 25, 2023

@harikrishna-patnala
can you verify this when you have time ? thanks

Copy link
Copy Markdown
Member

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

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

LGTM,

verified with fix with registered userdata, registered userdata with params also and manual userdata. Worked fine on enabling and disabling the userdata from UI.

@weizhouapache
Copy link
Copy Markdown
Member Author

LGTM,

verified with fix with registered userdata, registered userdata with params also and manual userdata. Worked fine on enabling and disabling the userdata from UI.

thanks a lot @harikrishna-patnala !

@weizhouapache
Copy link
Copy Markdown
Member Author

Merging based on approvals and manually verification

@weizhouapache weizhouapache merged commit 4000fd0 into apache:4.18 Jul 25, 2023
@DaanHoogland DaanHoogland deleted the 4.18-fix-deployvm-userdataid branch July 25, 2023 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants