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

default value of option parallelism cannot be parsed to int

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.16.0
    • 4.16.0
    • oc
    • None
    • No
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      default value of option --parallelism cannot be parsed to int

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

          4.16.0-0.nightly-2024-02-02-002725
          

      How reproducible:

          reproduce with cmd copy-to-node
          

      Steps to Reproduce:

          Cmd: "oc --namespace=e2e-test-mco-4zb88 --kubeconfig=/tmp/kubeconfig-3071675436 adm copy-to-node node/ip-10-0-17-85.ec2.internal --copy=/tmp/fetch-w637bgyv=/etc/mco-compressed-test-file",
                  StdErr: "error: --parallelism must be either N or N%: strconv.ParseInt: parsing \"10%%\": invalid syntax",
          

      Actual results:

      default value of --parallelism cannot be parsed 
      
          

      Expected results:

      no error 
          

      Additional info:

      there is a hack code to append % to the default value
      
      ref: https://github.com/openshift/oc/blob/79dc671bdaeafa74b92f14ad9f6d84e344608034/pkg/cli/admin/pernodepod/command.go#L75-L79
      
      https://github.com/openshift/oc/blob/79dc671bdaeafa74b92f14ad9f6d84e344608034/pkg/cli/admin/pernodepod/command.go#L94
      
      err var percentParseErr should be used 
      

            maszulik1@redhat.com Maciej Szulik
            rhn-support-rioliu Rio Liu
            ying zhou ying zhou
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: