fix: print error which causes serverlb to fail starting

Fixes #466
This commit is contained in:
iwilltry42 2021-02-03 12:39:09 +01:00
parent e119326184
commit eaee32e227
No known key found for this signature in database
GPG Key ID: 7BA57AD1CFF16110
2 changed files with 3 additions and 1 deletions

View File

@ -28,6 +28,8 @@
### Fixes ### Fixes
- do not ignore `--no-hostip` flag and don't inject hostip if `--network=host` (#471, @konradmalik) - do not ignore `--no-hostip` flag and don't inject hostip if `--network=host` (#471, @konradmalik)
- fix: `--no-lb` ignored
- fix: print error cause when serverlb fails to start
### Misc ### Misc

View File

@ -863,7 +863,7 @@ func ClusterStart(ctx context.Context, runtime k3drt.Runtime, cluster *k3d.Clust
if !serverlb.State.Running { if !serverlb.State.Running {
log.Debugln("Starting serverlb...") log.Debugln("Starting serverlb...")
if err := runtime.StartNode(ctx, serverlb); err != nil { // FIXME: we could run into a nullpointer exception here if err := runtime.StartNode(ctx, serverlb); err != nil { // FIXME: we could run into a nullpointer exception here
log.Warningf("Failed to start serverlb '%s': Try to start it manually", serverlb.Name) log.Warningf("Failed to start serverlb '%s' (try to start it manually): %+v", serverlb.Name, err)
failed++ failed++
} }
// TODO: avoid `level=fatal msg="starting kubernetes: preparing server: post join: a configuration change is already in progress (5)"` // TODO: avoid `level=fatal msg="starting kubernetes: preparing server: post join: a configuration change is already in progress (5)"`