Merge pull request #8450 from wanyaoqi/bugfix/wyq/misc-host-fix

host increase cpu mem max size
This commit is contained in:
yunion-ci-robot
2020-10-23 18:18:19 +08:00
committed by GitHub
3 changed files with 7 additions and 4 deletions
+2 -2
View File
@@ -468,10 +468,10 @@ func (s *SKVMGuestInstance) _generateStartScript(data *jsonutils.JSONDict) (stri
cmd += fmt.Sprintf(" -machine %s,accel=%s", s.getMachine(), accel)
cmd += " -k en-us"
// #cmd += " -g 800x600"
cmd += fmt.Sprintf(" -smp %d,maxcpus=128", cpu)
cmd += fmt.Sprintf(" -smp %d,maxcpus=255", cpu)
cmd += fmt.Sprintf(" -name %s", name)
// #cmd += fmt.Sprintf(" -uuid %s", self.desc["uuid"])
cmd += fmt.Sprintf(" -m %dM,slots=4,maxmem=262144M", mem)
cmd += fmt.Sprintf(" -m %dM,slots=4,maxmem=524288M", mem)
if s.manager.host.IsHugepagesEnabled() {
cmd += fmt.Sprintf(" -mem-prealloc -mem-path %s", fmt.Sprintf("/dev/hugepages/%s", uuid))
+3 -1
View File
@@ -1108,8 +1108,10 @@ func (h *SHostInfo) PutHostOffline() {
}
func (h *SHostInfo) PutHostOnline() error {
if len(h.SysError) > 0 {
if len(h.SysError) > 0 && !options.HostOptions.StartHostIgnoreSysError {
log.Fatalf("Can't put host online, unless resolve these problem %v", h.SysError)
} else if len(h.SysError) > 0 && options.HostOptions.StartHostIgnoreSysError {
log.Errorf("Host sys error: %v", h.SysError)
}
if len(h.SysWarning) > 0 {
+2 -1
View File
@@ -134,7 +134,8 @@ type SHostOptions struct {
HostHealthTimeout int `help:"host health timeout" default:"30"`
HostLeaseTimeout int `help:"lease timeout" default:"10"`
SyncStorageInfoDurationSecond int `help:"sync storage size duration, unit is second" default:"60"`
SyncStorageInfoDurationSecond int `help:"sync storage size duration, unit is second" default:"60"`
StartHostIgnoreSysError bool `help:"start host agent ignore sys error" default:"false"`
}
var (