mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #8450 from wanyaoqi/bugfix/wyq/misc-host-fix
host increase cpu mem max size
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user