Skip to content

operator-sdk run bundle(-upgrade) subcommands stall #6039

@everettraven

Description

@everettraven

Bug Report

What did you do?

When running operator-sdk run bundle and specifying an index image via the --index-image flag the command will stall when attempting to generate the extra FBC here:

reg, err := containerdregistry.NewRegistry(
containerdregistry.WithLog(fbcutil.NullLogger()),
containerdregistry.SkipTLSVerify(skipTLSVerify),
containerdregistry.WithPlainHTTP(useHTTP))
if err != nil {
return nil, fmt.Errorf("error creating new image registry: %v", err)
}

The same thing occurs when running operator-sdk run bundle-upgrade and it attempts to render the refs for generating an upgraded FBC here:

reg, err := containerdregistry.NewRegistry(
containerdregistry.WithLog(NullLogger()),
containerdregistry.SkipTLSVerify(skipTLSVerify),
containerdregistry.WithPlainHTTP(useHTTP))
if err != nil {
return nil, fmt.Errorf("error creating new image registry: %v", err)
}

The stalling seems to happen due to a file lock not being able to be established and no timeout being specified.

What did you expect to see?

operator-sdk run bundle(-upgrade) commands either fail with a timeout error or succeed and the bundle is installed properly.

What did you see instead? Under which circumstances?

operator-sdk run bundle(-upgrade) commands stall and hang forever

Environment

Operator type:

Kubernetes cluster type:

KinD

$ operator-sdk version

$ go version (if language is Go)

$ kubectl version

Possible Solution

Add a timeout and make the directory used by the containerdregistry being created be unique. The registry should also be properly torn down with the Destroy() function.

Additional context

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions