mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #1662 from wanyaoqi/bugfix/wyq/fix-baremetal-init-fsdriver
bugfix: baremetal init fsdriver
This commit is contained in:
@@ -28,6 +28,7 @@ import (
|
||||
app_common "yunion.io/x/onecloud/pkg/cloudcommon/app"
|
||||
common_options "yunion.io/x/onecloud/pkg/cloudcommon/options"
|
||||
"yunion.io/x/onecloud/pkg/cloudcommon/service"
|
||||
"yunion.io/x/onecloud/pkg/hostman/guestfs/fsdriver"
|
||||
)
|
||||
|
||||
type BaremetalService struct {
|
||||
@@ -42,6 +43,7 @@ func (s *BaremetalService) StartService() {
|
||||
common_options.ParseOptions(&o.Options, os.Args, "baremetal.conf", "baremetal")
|
||||
app_common.InitAuth(&o.Options.CommonOptions, s.startAgent)
|
||||
|
||||
fsdriver.Init(nil)
|
||||
app := app_common.InitApp(&o.Options.BaseOptions, false)
|
||||
handler.InitHandlers(app)
|
||||
|
||||
|
||||
@@ -26,8 +26,11 @@ func GetRootfsDrivers() []newRootFsDriverFunc {
|
||||
}
|
||||
|
||||
func Init(initPrivatePrefixes []string) {
|
||||
privatePrefixes = make([]string, len(initPrivatePrefixes))
|
||||
copy(privatePrefixes, initPrivatePrefixes)
|
||||
if len(initPrivatePrefixes) > 0 {
|
||||
privatePrefixes = make([]string, len(initPrivatePrefixes))
|
||||
copy(privatePrefixes, initPrivatePrefixes)
|
||||
}
|
||||
|
||||
linuxFsDrivers := []newRootFsDriverFunc{
|
||||
NewCentosRootFs, NewFedoraRootFs, NewRhelRootFs,
|
||||
NewDebianRootFs, NewCirrosRootFs, NewCirrosNewRootFs, NewUbuntuRootFs,
|
||||
|
||||
@@ -95,7 +95,7 @@ func GuestDescToDeployDesc(guestDesc *jsonutils.JSONDict) (*GuestDesc, error) {
|
||||
|
||||
if jnicsStandby != nil {
|
||||
nicsStandby := make([]*Nic, 0)
|
||||
err := jnicsStandby.Unmarshal(nicsStandby)
|
||||
err := jnicsStandby.Unmarshal(&nicsStandby)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user