-
Notifications
You must be signed in to change notification settings - Fork 70
config: Add default_{vcpus, memory} configurations #297
config: Add default_{vcpus, memory} configurations #297
Conversation
Hi @dvoytik - thanks for raising. Travis is failing as you seem to have found a bug/limitation of our checkcommits tool - it currently requires the "Fixes #XXX" comment in column 0 (no indent :) as that is our convention (I'll raise a PR on the tool itself to allow atleast a pure whitespace indent...) More fundamentally, semaphore is unable to launch a hypervisor with this PR. I'm not sure if you've used it, but you can actually |
@jodh-intel thanks for the clarification. I'll try to fix all problems and update the PR. |
Hi @dvoytik - the code looks good, but since you are changing virtcontainers code as well, the way we will need to land this is:
|
Hi @jodh-intel. Got it. I'll do it. |
Follow-up to #297 (comment): I've raised the following PR on |
Hi @jodh-intel, could you please merge containers/virtcontainers#299, so I can proceed. Thank you. |
5d17888
to
6172684
Compare
The PR was rebased and updated: changed default memory size from 512MiB to 2048MiB as @dlespiau suggested. |
Adding tag to ensure we don't inadvertently merge this before containers/virtcontainers#299 lands... |
I was thinking, how to let the sysadmin/ops easily configure the runtime to have by default as many vCPUs as physical cores on the host. What about making default_vcpus as signed integer and have special meaning for -1 - automatically inferring from physical core count. Also since QEMU supoorts no more than 255 cores, we should also limit this setting. |
@dvoytik - that sounds like a good idea. |
@jodh-intel, Ok then. I'll update this PR after containers/virtcontainers#299 is being merged and vendored into runtime repo. |
6172684
to
cfa329b
Compare
Update:
|
Hi @dvoytik Indeed, that was not you breaking the CI - this was a problem we seemed to be seeing last week with Travis. I've not seen one yet this week, so it could have been transient. Something that often fixes it seems to be a rebase and push, or a minor change and push (to get a SHA change, to get a rebuild of the CI). See clearcontainers/tests#136 for a few more details, but we've not bottomed the issue yet. |
Hi @grahamwhaley. OK, thanks for clarifying this. Just please let me know when I should repush this PR to trigger CI tests again, I don't want to spam this PR until. Thank you in advance. |
cfa329b
to
5682afc
Compare
A clean re-base of the PR. It seems that now all CIs passed. |
Hi @dvoytik Just to note, we are not ignoring you ;-) - I think this looks good now. Just waiting for @jodh-intel to come back online, do the review, and drop the DNM tag. That should be early next week I believe. |
@grahamwhaley, thanks! :) |
lgtm |
@jodh-intel could you review it and remove the |
Makefile
Outdated
@@ -92,6 +92,9 @@ PAUSEBINRELPATH := bin/pause | |||
|
|||
GLOBALLOGPATH := $(PKGLIBDIR)/runtime/runtime.log | |||
|
|||
DEFDEFVCPUS := 1 |
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.
I'm not clear on the "double DEF" here. Couldn't this just be DEFAULTVCPUS
and DEFAULTMEMSZ
?
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.
It's a default of default value :) If you insist, a can change it, no problem
Makefile
Outdated
@@ -92,6 +92,9 @@ PAUSEBINRELPATH := bin/pause | |||
|
|||
GLOBALLOGPATH := $(PKGLIBDIR)/runtime/runtime.log | |||
|
|||
DEFDEFVCPUS := 1 | |||
DEFDEFMEMSZ := 2048 |
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.
I'd add a comment to specify the units this variable is using.
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.
OK.
Makefile
Outdated
@@ -178,6 +183,9 @@ const defaultRuntimeRun = "$(PKGRUNDIR)" | |||
const defaultShimPath = "$(SHIMPATH)" | |||
const pauseBinRelativePath = "$(PAUSEBINRELPATH)" | |||
|
|||
const defaultDefaultVCPUs uint32 = $(DEFDEFVCPUS) |
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.
Again, defaultDefault...
looks a little odd to me. Maybe just defaultVCPUs
?
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.
There is already a function called defaultVCPUs(). Wouldn't it be confusing having both with the same name? If not, then I can change as you propose.
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.
Agreed. You could use a name like const defaultVCPUCount
maybe.
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.
Ok. Will do it.
Shortlog since last vendoring: ceb467e hypervisor: Add Default{VCPUs, MemSz} to HypervisorConfig e6862a1 1.0.0-rc.3 release The change is required to fix clearcontainers#164. Signed-off-by: Dmitry Voytik <[email protected]>
5682afc
to
5fd86b4
Compare
Introduce two new configuration settings: * default_vcpus - defines default vCPU number for newly created PODs * default_memory - defines default memory size for newly created PODs Fixes clearcontainers#164. Signed-off-by: Dmitry Voytik <[email protected]>
5fd86b4
to
d14ce99
Compare
Thanks @dvoytik. lgtm. |
hmm, pullapprove is confused again. Let's try the label toggle again... |
Yep - convinced it. |
If error occurs after sandbox network created successfully, we need to rollback to remove the created sandbox network Fixes: clearcontainers#297 Signed-off-by: flyflypeng <[email protected]>
If some errors occur after kata-proxy start, we need to rollback to kill kata-proxy process Fixes: clearcontainers#297 Signed-off-by: flyflypeng <[email protected]>
If some errors occur after qemu process start, then we need to rollback to kill qemu process Fixes: clearcontainers#297 Signed-off-by: flyflypeng <[email protected]>
If kata-agent doesn't start in VM, we need to do some rollback operations to release related resources. add grpc check() to check kata-agent is running or not Fixes: clearcontainers#297 Signed-off-by: flyflypeng <[email protected]>
Introduce two new configuration settings:
Fixes #164.
Signed-off-by: Dmitry Voytik [email protected]