Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1585010

Summary: [APB] apb refresh return exception when executed against a remotely hosted cluster
Product: OpenShift Container Platform Reporter: sunzhaohua <zhsun>
Component: Service BrokerAssignee: Dylan Murray <dymurray>
Status: CLOSED ERRATA QA Contact: sunzhaohua <zhsun>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.10.0CC: aos-bugs, chezhang, jiazha, jmatthew, zitang
Target Milestone: ---   
Target Release: 3.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:16:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sunzhaohua 2018-06-01 06:51:17 UTC
Description of problem:
If not install kubectl command, apb refresh return exception when executed against a remotely hosted cluster 

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


How reproducible:
Always

Steps to Reproduce:
1. run "apb refresh" remotely
2.
3.

Actual results:

[szh@localhost ~]$ apb refresh 
Deleting clusterserviceclasses
Exception occurred! Command 'kubectl delete clusterserviceclass /bin/sh: kubectl: command not found' returned non-zero exit status 127

Expected results:
run "apb refresh" remotely return successful if not install kubectl command. 

Additional info:

Comment 1 Dylan Murray 2018-06-01 13:56:30 UTC
We did not intend to include this CLI option for the next release so I will simply remove `apb refresh` as a valid option.

Comment 4 sunzhaohua 2018-06-05 02:11:51 UTC
verified successful.

[szh@localhost ~]$ apb version
Version: apb-1.2.12

[szh@localhost ~]$ apb -h
usage: apb [-h] [--debug] [--project BASE_PATH] [--token AUTH_TOKEN]
           
           {relist,run,help,test,prepare,setup,bootstrap,list,remove,init,version,build,push,serviceinstance}
           ...

APB tooling for assisting in building and packaging APBs.

optional arguments:
  -h, --help            show this help message and exit
  --debug               Enable debug output
  --project BASE_PATH, -p BASE_PATH
                        Specify a path to your project. Defaults to CWD.
  --token AUTH_TOKEN    Specify OpenShift auth token to be used

subcommand:
  {relist,run,help,test,prepare,setup,bootstrap,list,remove,init,version,build,push,serviceinstance}
    relist              Relist the APBs available within the Service Catalog
    run                 Run APB
    help                Display this help message
    test                Test the APB
    prepare             Prepare an ansible-container project for APB packaging
    setup               Initialize OpenShift with APB development environment
    bootstrap           Tell Ansible Service Broker to reload APBs from the
                        container repository
    list                List APBs from the target Ansible Service Broker
    remove              Remove APBs from the target Ansible Service Broker
    init                Initialize the directory for APB development
    version             Get current version of APB tool
    build               Build and package APB container
    push                Push local APB spec to an Ansible Service Broker
    serviceinstance     Create a ServiceInstance template based on apb.yaml


[szh@localhost ~]$ apb refresh
usage: apb [-h] [--debug] [--project BASE_PATH] [--token AUTH_TOKEN]
           
           {relist,run,help,test,prepare,setup,bootstrap,list,remove,init,version,build,push,serviceinstance}
           ...
apb: error: argument subcommand: invalid choice: 'refresh' (choose from 'relist', 'run', 'help', 'test', 'prepare', 'setup', 'bootstrap', 'list', 'remove', 'init', 'version', 'build', 'push', 'serviceinstance')

Comment 6 errata-xmlrpc 2018-07-30 19:16:54 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, 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/RHBA-2018:1816