Fix fatal error when reconciling bootstrap data

Properly skip restoring bootstrap data for files that don't have a path
set because the feature that would set it isn't enabled.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/5869/head
Brad Davidson 2022-07-07 12:17:25 -07:00 committed by Brad Davidson
parent 84baab59a9
commit 83420ef78e
2 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ func WriteToDiskFromStorage(files PathsDataformat, bootstrap *config.ControlRunt
for pathKey, bsf := range files {
path, ok := paths[pathKey]
if !ok {
if !ok || path == "" {
continue
}

View File

@ -363,7 +363,7 @@ func (c *Cluster) ReconcileBootstrapData(ctx context.Context, buf io.ReadSeeker,
for pk := range files {
p, ok := paths[pk]
if !ok {
if !ok || p == "" {
continue
}
@ -393,7 +393,7 @@ func (c *Cluster) ReconcileBootstrapData(ctx context.Context, buf io.ReadSeeker,
for pk := range files {
p, ok := paths[pk]
if !ok {
if !ok || p == "" {
continue
}