1
0
mirror of https://github.com/rancher/os.git synced 2025-09-03 15:54:24 +00:00

Get RancherOS logging to throw debug logs to a remote syslog server when the kernel netconsole is configured

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-08-12 03:09:47 +10:00
parent 69b54017a9
commit f793518aa6
18 changed files with 401 additions and 217 deletions

View File

@@ -47,7 +47,11 @@ func MountDevice(baseName, device, partition string, raw bool) (string, string,
// Don't use ResolveDevice - it can fail, whereas `blkid -L LABEL` works more often
cfg := config.LoadConfig()
if d, _ := util.Blkid("RANCHER_BOOT"); d != "" {
d, _, err := util.Blkid("RANCHER_BOOT")
if err != nil {
log.Errorf("Failed to run blkid: %s", err)
}
if d != "" {
partition = d
baseName = filepath.Join(baseName, BootDir)
} else {
@@ -55,7 +59,11 @@ func MountDevice(baseName, device, partition string, raw bool) (string, string,
// try the rancher.state.dev setting
partition = dev
} else {
if d, _ := util.Blkid("RANCHER_STATE"); d != "" {
d, _, err := util.Blkid("RANCHER_STATE")
if err != nil {
log.Errorf("Failed to run blkid: %s", err)
}
if d != "" {
partition = d
}
}