Skip to content

Bundle deprecation causing default channel removal #788

@mvalarh

Description

@mvalarh

I am having problem with opm index deprecatetruncate . First adding folowing bundles to index

index add: 
  quay.io/openshift-community-operators/cockroachdb:v2.0.9
  quay.io/openshift-community-operators/cockroachdb:v2.1.1
  quay.io/openshift-community-operators/cockroachdb:v2.1.11
  quay.io/openshift-community-operators/cockroachdb:v3.0.7
  quay.io/openshift-community-operators/cockroachdb:v5.0.3
  quay.io/openshift-community-operators/cockroachdb:v5.0.4

and then doing index deprecatetruncate

index deprecatetruncate: 
  quay.io/openshift-community-operators/cockroachdb:v2.0.9
  quay.io/openshift-community-operators/cockroachdb:v2.1.1
  quay.io/openshift-community-operators/cockroachdb:v2.1.11
  quay.io/openshift-community-operators/cockroachdb:v3.0.7

opm version

Version: version.Version{OpmVersion:"v1.18.0-23-g32224fda", GitCommit:"32224fda", BuildDate:"2021-09-21T15:31:58Z", GoOs:"linux", GoArch:"amd64"}

Error is

TASK [operator_index : Index deprecatetruncate 'cockroachdb' operator to index image quay.io/operator_testing/idx:v4.9] *******************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => changed=true 
  cmd: /home/ubuntu/.op/bin/opm index deprecatetruncate -c docker --bundles quay.io/openshift-community-operators/cockroachdb:v2.0.9,quay.io/openshift-community-operators/cockroachdb:v2.1.1,quay.io/openshift-community-operators/cockroachdb:v2.1.11,quay.io/openshift-community-operators/cockroachdb:v3.0.7 --tag quay.io/operator_testing/idx:v4.9 --from-index quay.io/operator_testing/idx:v4.9
  delta: '0:00:05.814376'
  end: '2021-09-22 06:11:54.076725'
  msg: non-zero return code
  rc: 1
  start: '2021-09-22 06:11:48.262349'
  stderr: |-
    time="2021-09-22T06:11:48Z" level=warning msg="\x1b[1;33mDEPRECATION NOTICE:\nSqlite-based catalogs and their related subcommands are deprecated. Support for\nthem will be removed in a future release. Please migrate your catalog workflows\nto the new file-based catalog format.\x1b[0m"
    time="2021-09-22T06:11:48Z" level=info msg="deprecating bundles from the index" bundles="[quay.io/openshift-community-operators/cockroachdb:v2.0.9 quay.io/openshift-community-operators/cockroachdb:v2.1.1 quay.io/openshift-community-operators/cockroachdb:v2.1.11 quay.io/openshift-community-operators/cockroachdb:v3.0.7]"
    time="2021-09-22T06:11:48Z" level=info msg="Pulling previous image quay.io/operator_testing/idx:v4.9 to get metadata" bundles="[quay.io/openshift-community-operators/cockroachdb:v2.0.9 quay.io/openshift-community-operators/cockroachdb:v2.1.1 quay.io/openshift-community-operators/cockroachdb:v2.1.11 quay.io/openshift-community-operators/cockroachdb:v3.0.7]"
    time="2021-09-22T06:11:48Z" level=info msg="running /usr/bin/docker pull quay.io/operator_testing/idx:v4.9" bundles="[quay.io/openshift-community-operators/cockroachdb:v2.0.9 quay.io/openshift-community-operators/cockroachdb:v2.1.1 quay.io/openshift-community-operators/cockroachdb:v2.1.11 quay.io/openshift-community-operators/cockroachdb:v3.0.7]"
    time="2021-09-22T06:11:50Z" level=info msg="running /usr/bin/docker pull quay.io/operator_testing/idx:v4.9" bundles="[quay.io/openshift-community-operators/cockroachdb:v2.0.9 quay.io/openshift-community-operators/cockroachdb:v2.1.1 quay.io/openshift-community-operators/cockroachdb:v2.1.11 quay.io/openshift-community-operators/cockroachdb:v3.0.7]"
    time="2021-09-22T06:11:51Z" level=info msg="Getting label data from previous image" bundles="[quay.io/openshift-community-operators/cockroachdb:v2.0.9 quay.io/openshift-community-operators/cockroachdb:v2.1.1 quay.io/openshift-community-operators/cockroachdb:v2.1.11 quay.io/openshift-community-operators/cockroachdb:v3.0.7]"
    time="2021-09-22T06:11:51Z" level=info msg="running docker inspect" bundles="[quay.io/openshift-community-operators/cockroachdb:v2.0.9 quay.io/openshift-community-operators/cockroachdb:v2.1.1 quay.io/openshift-community-operators/cockroachdb:v2.1.11 quay.io/openshift-community-operators/cockroachdb:v3.0.7]"
    time="2021-09-22T06:11:51Z" level=info msg="running docker create" bundles="[quay.io/openshift-community-operators/cockroachdb:v2.0.9 quay.io/openshift-community-operators/cockroachdb:v2.1.1 quay.io/openshift-community-operators/cockroachdb:v2.1.11 quay.io/openshift-community-operators/cockroachdb:v3.0.7]"
    time="2021-09-22T06:11:52Z" level=info msg="running docker cp" bundles="[quay.io/openshift-community-operators/cockroachdb:v2.0.9 quay.io/openshift-community-operators/cockroachdb:v2.1.1 quay.io/openshift-community-operators/cockroachdb:v2.1.11 quay.io/openshift-community-operators/cockroachdb:v3.0.7]"
    time="2021-09-22T06:11:52Z" level=info msg="running docker rm" bundles="[quay.io/openshift-community-operators/cockroachdb:v2.0.9 quay.io/openshift-community-operators/cockroachdb:v2.1.1 quay.io/openshift-community-operators/cockroachdb:v2.1.11 quay.io/openshift-community-operators/cockroachdb:v3.0.7]"
    time="2021-09-22T06:11:53Z" level=info msg="deprecating bundles" bundles="[quay.io/openshift-community-operators/cockroachdb:v2.0.9 quay.io/openshift-community-operators/cockroachdb:v2.1.1 quay.io/openshift-community-operators/cockroachdb:v2.1.11 quay.io/openshift-community-operators/cockroachdb:v3.0.7]"
    time="2021-09-22T06:11:54Z" level=error msg="permissive mode disabled" bundles="[quay.io/openshift-community-operators/cockroachdb:v2.0.9 quay.io/openshift-community-operators/cockroachdb:v2.1.1 quay.io/openshift-community-operators/cockroachdb:v2.1.11 quay.io/openshift-community-operators/cockroachdb:v3.0.7]" error="error deprecating bundle quay.io/openshift-community-operators/cockroachdb:v2.1.11: Bundle deprecation causing default channel removal"
    Error: error deprecating bundle quay.io/openshift-community-operators/cockroachdb:v2.1.11: Bundle deprecation causing default channel removal
    Usage:
      opm index deprecatetruncate [flags]
  
    Flags:
          --allow-package-removal   removes the entire package if the heads of all channels in the package are deprecated
      -i, --binary-image opm        container image for on-image opm command
      -u, --build-tool string       tool to build container images. One of: [docker, podman]. Defaults to podman. Overrides part of container-tool.
      -b, --bundles strings         comma separated list of bundles to add
      -c, --container-tool string   tool to interact with container images (save, build, etc.). One of: [docker, podman]
      -f, --from-index string       previous index to add to
          --generate                if enabled, just creates the dockerfile and saves it to local disk
      -h, --help                    help for deprecatetruncate
      -d, --out-dockerfile string   if generating the dockerfile, this flag is used to (optionally) specify a dockerfile name
          --permissive              allow registry load errors
      -p, --pull-tool string        tool to pull container images. One of: [none, docker, podman]. Defaults to none. Overrides part of container-tool.
      -t, --tag string              custom tag for container image being built
  
    Global Flags:
          --skip-tls   skip TLS certificate verification for container image registries while pulling bundles or index
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

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