mirror of
https://github.com/rancher/os.git
synced 2025-07-31 14:41:14 +00:00
Merge pull request #2093 from SvenDowideit/bootstrap-logging
Make the bootstrap phase logable
This commit is contained in:
commit
af000395b4
@ -7,16 +7,13 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/log"
|
||||
"github.com/rancher/os/util"
|
||||
)
|
||||
|
||||
func bootstrapAction(c *cli.Context) error {
|
||||
func BootstrapMain() {
|
||||
log.InitLogger()
|
||||
log.Info("Running cloud-init-save")
|
||||
|
||||
log.Debugf("bootstrapAction")
|
||||
if err := UdevSettle(); err != nil {
|
||||
@ -62,8 +59,6 @@ func bootstrapAction(c *cli.Context) error {
|
||||
if err := UdevSettle(); err != nil {
|
||||
log.Errorf("Failed to run udev settle: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func mdadmScan() error {
|
||||
|
@ -27,13 +27,6 @@ func Main() {
|
||||
}
|
||||
|
||||
app.Commands = []cli.Command{
|
||||
{
|
||||
Name: "bootstrap",
|
||||
Hidden: true,
|
||||
HideHelp: true,
|
||||
SkipFlagParsing: true,
|
||||
Action: bootstrapAction,
|
||||
},
|
||||
{
|
||||
Name: "config",
|
||||
ShortName: "c",
|
||||
|
1
main.go
1
main.go
@ -33,6 +33,7 @@ var entrypoints = map[string]func(){
|
||||
"init": osInit.MainInit,
|
||||
"netconf": network.Main,
|
||||
"recovery": control.AutologinMain,
|
||||
"ros-bootstrap": control.BootstrapMain,
|
||||
"ros-sysinit": sysinit.Main,
|
||||
"system-docker": systemdocker.Main,
|
||||
"wait-for-docker": wait.Main,
|
||||
|
@ -21,7 +21,7 @@ rancher:
|
||||
bootstrap:
|
||||
bootstrap:
|
||||
image: {{.OS_REPO}}/os-bootstrap:{{.VERSION}}{{.SUFFIX}}
|
||||
command: ros bootstrap
|
||||
command: ros-bootstrap
|
||||
labels:
|
||||
io.rancher.os.detach: "false"
|
||||
io.rancher.os.scope: system
|
||||
@ -33,6 +33,7 @@ rancher:
|
||||
- /lib/modules:/lib/modules
|
||||
- /lib/firmware:/lib/firmware
|
||||
- /usr/bin/ros:/usr/bin/ros:ro
|
||||
- /usr/bin/ros:/usr/bin/ros-bootstrap:ro
|
||||
- /usr/share/ros:/usr/share/ros:ro
|
||||
- /var/lib/rancher:/var/lib/rancher:ro
|
||||
- /var/log:/var/log
|
||||
|
Loading…
Reference in New Issue
Block a user