Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-10879

oc improperly tell user to use deprecated feature "oc adm registry"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Minor Minor
    • 4.14.0
    • 4.12
    • oc
    • None
    • No
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required

      Description of problem:

      While troubleshooting a problem, oc incorrectly recommended to use a deprecated command "oc admin registry" in the output text.

      Version-Release number of selected component (if applicable):

      $ oc version
      Client Version: 4.12.0-202302280915.p0.gb05f7d4.assembly.stream-b05f7d4
      Kustomize Version: v4.5.7
      Server Version: 4.12.6
      Kubernetes Version: v1.25.4+18eadca
      
      Though this is likely broken in all previous version of openshift4

      How reproducible:

      Only during error conditions where this error message is printed.

      Steps to Reproduce:

      1. have cluster without proper storage configured for the registry
      2. try to build something.
      3. "oc status --suggest" prints message with deprecated "oc admin registry" command.
      

      Actual results:

      $ oc status --suggest
      In project pvctest on server https://api.pelauter-bm01.lab.home.arpa:6443https://my-test-pvctest.apps.pelauter-bm01.lab.home.arpa (redirects) to pod port 8080-tcp (svc/my-test)
        deployment/my-test deploys istag/my-test:latest <-
          bc/my-test source builds https://github.com/sclorg/django-ex.git on openshift/python:3.9-ubi8
            build #1 new for 3 hours (can't push to image)
          deployment #1 running for 3 hours - 0/1 podsErrors:
        * bc/my-test is pushing to istag/my-test:latest, but the administrator has not configured the integrated container image registry.
      
          try: oc adm registry -h
      ^ oc adm regisistry is deprecated in openshift4, this should guide the user to the registry operator.

      Expected results:

      A pointer to the proper feature to manage the registry, like the openshift registry operator.

      Additional info:

      I know my cluster is not set up correctly, but oc should still not give me incorrect information.
      If this version of oc is expected to also work against ocp3 clusters, the fix should take this into account, where that command is still valid.

              aguclu@redhat.com Arda Guclu
              rh_pelauter@redhat.com Peter Lauterbach
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: