Skip to content

Commit 527dc5a leaves config.Namespaces empty when accessed. #1585

@stefanberger

Description

@stefanberger

@Mashimiao : The commit 527dc5a creates a problem with config.Namespaces now being initialized too late.

        config := &configs.Config{
                Rootfs:       rootfsPath,
                NoPivotRoot:  opts.NoPivotRoot,
                Readonlyfs:   spec.Root.Readonly,
                Hostname:     spec.Hostname,
                Labels:       append(labels, fmt.Sprintf("bundle=%s", cwd)),
                NoNewKeyring: opts.NoNewKeyring,
                Rootless:     opts.Rootless,
        }

        exists := false
        if config.Namespaces.Contains(configs.NEWNET) {
                config.Networks = []*configs.Network{
                        {
                                Type: "loopback",
                        },
                }
        }

At the point above configs.NEWNET seems empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions