1
0
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:
Sven Dowideit 2017-09-13 16:20:55 +10:00 committed by GitHub
commit af000395b4
4 changed files with 4 additions and 14 deletions

View File

@ -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 {

View File

@ -27,13 +27,6 @@ func Main() {
}
app.Commands = []cli.Command{
{
Name: "bootstrap",
Hidden: true,
HideHelp: true,
SkipFlagParsing: true,
Action: bootstrapAction,
},
{
Name: "config",
ShortName: "c",

View File

@ -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,

View File

@ -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