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

B #169: fix VM update template #171

Merged
merged 1 commit into from
Nov 19, 2021

Conversation

treywelsh
Copy link
Collaborator

@treywelsh treywelsh commented Oct 15, 2021

PR #145 enabled VM config update with some bad behavior due to a misunderstanding of the ONE API.

@treywelsh treywelsh added the bug label Oct 15, 2021
@treywelsh treywelsh changed the title WIP: B #169: fix VM update template B #169: fix VM update template Oct 22, 2021
@treywelsh treywelsh force-pushed the B-169-fix-vm-config-update branch 2 times, most recently from 42cd775 to f2d42ca Compare November 10, 2021 13:54
tpl := vm.NewTemplate()
for _, name := range []string{"OS", "FEATURES", "INPUT", "GRAPHICS", "RAW", "CONTEXT"} {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why in the following lines you work only on "OS", "GRAPHICS" and "CONTEXT".
Why not "FEATURES", "INPUT" or "RAW" ?

Copy link
Collaborator Author

@treywelsh treywelsh Nov 16, 2021

Choose a reason for hiding this comment

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

I copy these sections only, from the existing VM template, because the method updateconf take them into account:
https://docs.opennebula.io/5.12/integration/system_interfaces/api.html#one-vm-updateconf

If I don't copy one of these fields, it would be erased. See OS deletion problem when updating CONTEXT in #169 .
The RAW field is managed through the template resource, I didn't enabled it in VM resource, here is the original issue about this section: #123
Do we need it in VM resource ?

For other parts FEATURES and INPUT there aren't managed at all.

This is not the goal of this issue, but to manage additional VM sections we could open a new issue (probably better) or just add them to #154

Copy link
Collaborator

Choose a reason for hiding this comment

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

perfect thx

@treywelsh treywelsh linked an issue Nov 16, 2021 that may be closed by this pull request
@treywelsh treywelsh merged commit 8c52d5d into OpenNebula:master Nov 19, 2021
@Th0masL
Copy link
Contributor

Th0masL commented Nov 22, 2021

Thanks guys for your great work ! 👏 👍

@treywelsh treywelsh linked an issue Jan 26, 2022 that may be closed by this pull request
@treywelsh treywelsh removed a link to an issue Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OS section is deleted when updating CONTEXT
3 participants