This repository has been archived by the owner on Jul 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Change the update container bridge call to use the modify call instead #391
Merged
katiewasnothere
merged 1 commit into
microsoft:master
from
katiewasnothere:update_to_modify_call
Feb 5, 2021
Merged
Change the update container bridge call to use the modify call instead #391
katiewasnothere
merged 1 commit into
microsoft:master
from
katiewasnothere:update_to_modify_call
Feb 5, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@kevpar FYI :) |
40f82e2
to
6c47381
Compare
anmaxvl
reviewed
Jan 26, 2021
internal/runtime/hcsv2/container.go
Outdated
|
||
func (c *Container) modifyContainerConstraints(ctx context.Context, rt prot.ModifyRequestType, cc *prot.ContainerConstraintsV2) (err error) { | ||
if c.id == "" { | ||
return errors.New("invalid parameter, containerID cannot be empty") |
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.
can this actually happen?
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.
Good point. I'll remove :)
anmaxvl
previously approved these changes
Jan 26, 2021
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.
LGTM
dcantah
reviewed
Feb 3, 2021
default: | ||
return errors.Errorf("the ResourceType \"%s\" is not supported", settings.ResourceType) | ||
return errors.Errorf("the ResourceType \"%s\" is not supported for containers", settings.ResourceType) |
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.
Could use %q and get rid of the quotes
dcantah
previously approved these changes
Feb 3, 2021
6c47381
to
996ea01
Compare
anmaxvl
previously approved these changes
Feb 4, 2021
Signed-off-by: Kathryn Baldauf <[email protected]>
996ea01
to
642f782
Compare
anmaxvl
approved these changes
Feb 5, 2021
dcantah
approved these changes
Feb 5, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates OpenGCS to reuse the
modify
bridge call when issuing a request to update a container. Since the modify call was previously only used if the requested containerID is that of the UVM's pause container (null container ID), this PR additionally updates the code path to allow requests with specific container ID's to issue update calls but prevents them from issuing any host specific settings changes (such as adding a new mapped device in or a VPCI device).Signed-off-by: Kathryn Baldauf [email protected]