1
0
mirror of https://github.com/rancher/os.git synced 2025-09-04 08:14:21 +00:00

Working out why linuxkit crashes in bootup by labeling init stages

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-05-03 09:45:58 +10:00
parent 70ea28669a
commit aef937609e
5 changed files with 99 additions and 65 deletions

View File

@@ -101,26 +101,27 @@ func SysInit() error {
}
_, err := config.ChainCfgFuncs(cfg,
loadImages,
func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
p, err := compose.GetProject(cfg, false, true)
if err != nil {
return cfg, err
}
return cfg, p.Up(context.Background(), options.Up{
Create: options.Create{
NoRecreate: true,
},
Log: cfg.Rancher.Log,
})
},
func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
syscall.Sync()
return cfg, nil
},
func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
log.Infof("RancherOS %s started", config.Version)
return cfg, nil
})
[]config.CfgFuncData{
config.CfgFuncData{"loadImages", loadImages},
config.CfgFuncData{"start project", func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
p, err := compose.GetProject(cfg, false, true)
if err != nil {
return cfg, err
}
return cfg, p.Up(context.Background(), options.Up{
Create: options.Create{
NoRecreate: true,
},
Log: cfg.Rancher.Log,
})
}},
config.CfgFuncData{"sync", func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
syscall.Sync()
return cfg, nil
}},
config.CfgFuncData{"banner", func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
log.Infof("RancherOS %s started", config.Version)
return cfg, nil
}}})
return err
}