Bug 1919862 - The tip information for `oc new-project --skip-config-write` is wrong
Summary: The tip information for `oc new-project --skip-config-write` is wrong
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.7.0
Assignee: Maciej Szulik
QA Contact: RamaKasturi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-25 10:10 UTC by zhou ying
Modified: 2021-02-24 15:56 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:55:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 715 0 None closed Bug 1919862: fix message after oc new-project 2021-02-01 10:18:52 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:56:05 UTC

Description zhou ying 2021-01-25 10:10:47 UTC
Description of problem:
When use ` oc new-project testuser5  --skip-config-write` the tip info is wrong:
To switch to this project and start adding applications, use:

    oc project https://api.xiuwang-shared.qe.devcluster.openshift.com:6443
error when use: `oc project https://api.xiuwang-shared.qe.devcluster.openshift.com:6443` :
[zhouying@dhcp-140-138 ~]$ oc project https://api.xiuwang-shared.qe.devcluster.openshift.com:6443
error: invalid resource name "https://api.xiuwang-shared.qe.devcluster.openshift.com:6443": [may not contain '/']

Version-Release number of selected component (if applicable):
[zhouying@dhcp-140-138 ~]$ oc version --client
Client Version: 4.7.0-0.nightly-2021-01-22-134922

How reproducible:
Always

Steps to Reproduce:
1) Use `oc new-project testuser5  --skip-config-write` to create project;
2) Follow the tip info to switch to the project:
  `oc project https://api.xiuwang-shared.qe.devcluster.openshift.com:6443` 
Actual results:
1) Will prompt tip info:
Project "testuser5" created on server "https://api.xiuwang-shared.qe.devcluster.openshift.com:6443".

To switch to this project and start adding applications, use:

    oc project https://api.xiuwang-shared.qe.devcluster.openshift.com:6443

2) Hit error:
[zhouying@dhcp-140-138 ~]$ oc project https://api.xiuwang-shared.qe.devcluster.openshift.com:6443
error: invalid resource name "https://api.xiuwang-shared.qe.devcluster.openshift.com:6443": [may not contain '/']


Expected results:
1) Show correct tip info for `oc new-project --skip-config-write`


Additional info:

Comment 2 RamaKasturi 2021-02-02 15:54:34 UTC
Verified bug in the payload below and i see that tip information for oc new-project --skip-config-write is correct.

[knarra@knarra openshift-client-linux-4.7.0-0.nightly-2021-02-02-094004]$ ./oc version -o yaml
clientVersion:
  buildDate: "2021-02-01T22:19:09Z"
  compiler: gc
  gitCommit: 16402fe8dbc97e798e7ac577419db629887fe11d
  gitTreeState: clean
  gitVersion: 4.7.0-202102012119.p0-16402fe
  goVersion: go1.15.5
  major: ""
  minor: ""
  platform: linux/amd64
openshiftVersion: 4.7.0-0.nightly-2021-02-01-232332
releaseClientVersion: 4.7.0-0.nightly-2021-02-02-094004
serverVersion:
  buildDate: "2021-01-29T21:19:40Z"
  compiler: gc
  gitCommit: 3b90e69e112acdc11d13fcd9cae6aea58e02aa92
  gitTreeState: clean
  gitVersion: v1.20.0+3b90e69
  goVersion: go1.15.5
  major: "1"
  minor: "20"
  platform: linux/amd64

[knarra@knarra openshift-client-linux-4.7.0-0.nightly-2021-02-02-094004]$ ./oc new-project testuser11  --skip-config-write
Project "testuser11" created on server "https://api.knarrafeb02.qe.devcluster.openshift.com:6443".

To switch to this project and start adding applications, use:

    oc project testuser11

[knarra@knarra openshift-client-linux-4.7.0-0.nightly-2021-02-02-094004]$ ./oc project testuser11
Now using project "testuser11" on server "https://api.knarrafeb02.qe.devcluster.openshift.com:6443".

[knarra@knarra openshift-client-linux-4.7.0-0.nightly-2021-02-02-094004]$ ./oc project
Using project "testuser11" on server "https://api.knarrafeb02.qe.devcluster.openshift.com:6443".

Based on the above moving bug to verified state.

Comment 5 errata-xmlrpc 2021-02-24 15:55:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5633


Note You need to log in before you can comment on or make changes to this bug.